From 3f73fdd20480094914a64483f0eccd1975577d0a Mon Sep 17 00:00:00 2001 From: graehl Date: Fri, 16 Jul 2010 20:42:45 +0000 Subject: cmdline parsing git-svn-id: https://ws10smt.googlecode.com/svn/trunk@293 ec762483-ff6d-05da-a07a-a48fb63a330f --- vest/line_mediator.pl | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/vest/line_mediator.pl b/vest/line_mediator.pl index 87a73590..acb9a036 100755 --- a/vest/line_mediator.pl +++ b/vest/line_mediator.pl @@ -19,7 +19,7 @@ my @c1; if (scalar @ARGV) { do { push @c1,shift - } while $c1[$#c1] ne '--'; + } while scalar @ARGV && $c1[$#c1] ne '--'; } pop @c1; my @c2=@ARGV; @@ -54,12 +54,10 @@ if ($serial || $snake) { } else { while(<$R1>) { info("1:",$_); - select $W2; - $|=1; - print $_; + lineto($W2,$_); last unless defined ($_=<$R2>); info("2:",$_); - print $W1 $_; + lineto($W1,$_); } } } else { -- cgit v1.2.3