From 4159141904cc5f5a516787501222667b8f4f24c0 Mon Sep 17 00:00:00 2001 From: etienne Date: Fri, 20 Sep 2002 08:22:03 +0000 Subject: L'option -bus est supportée Il n'y a plus de vérification du format de l'adresse réseau. --- src/ivymon | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/src/ivymon b/src/ivymon index 90b5435..24ce804 100755 --- a/src/ivymon +++ b/src/ivymon @@ -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) { -- cgit v1.1