diff options
author | etienne | 2002-09-20 08:22:03 +0000 |
---|---|---|
committer | etienne | 2002-09-20 08:22:03 +0000 |
commit | 4159141904cc5f5a516787501222667b8f4f24c0 (patch) | |
tree | fea819cc7a256f7a14c2500716d01e37657cd653 | |
parent | 833e1a3d0f5e0ddb91fef2683059616d5065ff36 (diff) | |
download | ivymon-4159141904cc5f5a516787501222667b8f4f24c0.zip ivymon-4159141904cc5f5a516787501222667b8f4f24c0.tar.gz ivymon-4159141904cc5f5a516787501222667b8f4f24c0.tar.bz2 ivymon-4159141904cc5f5a516787501222667b8f4f24c0.tar.xz |
L'option -bus est supportée
Il n'y a plus de vérification du format de l'adresse réseau.
-rwxr-xr-x | src/ivymon | 21 |
1 files changed, 8 insertions, 13 deletions
@@ -14,7 +14,7 @@ use Carp; use strict 'vars'; use Getopt::Long; use Tk::CmdLine; -use vars qw/$opt_help $opt_b $opt_history @opt_bind @opt_send/; +use vars qw/$opt_help $opt_b $opt_bus $opt_history @opt_bind @opt_send/; # geometry my $minW = 1050; @@ -86,13 +86,6 @@ my @send_def; # Rejeu available (not effective) bindings array my @bind_def; -#for (@bind_def) { - # s/\=\s+/\=\.\* /g; - # s/\=\s*$/=\.\*/g; - # s/^(.*)$/\(^$1\)/; -# -#} - # Effective bindings array my @effectivebind; @@ -104,9 +97,9 @@ my @effectivebind; Tk::CmdLine::SetArguments(-font => '7x14'); Tk::CmdLine::SetArguments(); -if (not GetOptions('-help', '-history=s', '-b=s', '-bind=s@', +if (not GetOptions('-help', '-history=s', '-b=s', '-bus=s', '-bind=s@', '-send=s@') or $opt_help) { - print "Usage: ivymon [-b bus] [-help] [-history length]\n"; + print "Usage: ivymon [-b[us] bus] [-help] [-history length]\n"; print " [-bind regexp1] ... [-bind regexpN] \n"; print " [-send message1] ... [-send messageN] \n"; print " [standard X11 options...]\n"; @@ -121,9 +114,11 @@ if (not GetOptions('-help', '-history=s', '-b=s', '-bind=s@', exit ; } - -$ivy_port = $opt_b if $opt_b and - $opt_b =~ /^(\d+\.\d+\.\d+\.\d+)?(,\d+\.\d+\.\d+\.\d+)*:\d+/; +if ($opt_bus) { + $ivy_port = $opt_bus; +} elsif ($opt_b) { + $ivy_port = $opt_b; +} $history = $opt_history if $opt_history; my $title; if ($ivy_port) { |