diff options
author | graehl <graehl@ec762483-ff6d-05da-a07a-a48fb63a330f> | 2010-07-16 20:42:45 +0000 |
---|---|---|
committer | graehl <graehl@ec762483-ff6d-05da-a07a-a48fb63a330f> | 2010-07-16 20:42:45 +0000 |
commit | 3f73fdd20480094914a64483f0eccd1975577d0a (patch) | |
tree | 8324d7c758880bcfc4ab7f74aa316a5f1dc286ee | |
parent | cb1839bbb4153955eef1be290a28b47d20de08ca (diff) |
cmdline parsing
git-svn-id: https://ws10smt.googlecode.com/svn/trunk@293 ec762483-ff6d-05da-a07a-a48fb63a330f
-rwxr-xr-x | vest/line_mediator.pl | 8 |
1 files 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 { |