4 ($primer,$zinput,$options,$output) = @ARGV;
5 $output =~ s/^\-o// or die "$output ?";
6 die if $primer =~ m/^\-/;
7 die if $zinput =~ m/^\-/;
9 die unless $options =~ m/^\-([gTa])$/;
12 $gnuplot= "$output.gnuplot.tmp";
13 $initdata= "$output.initdata.tmp";
15 open G, ">$gnuplot" or die $!;
17 open Z, "$zinput" or die "$zinput $!";
19 sub pg ($$) { printf G "%s(u,v) = %s\n", @_ or die $!; }
21 $!=0; defined($_= <Z>) or die "$zinput $!";
26 } elsif ($ztype eq 'T') {
27 next unless m/^splot\s+([^,]+),([^,]+),([^,]+)\s*$/;
28 pg('x',$1); pg('y',$2); pg('z',$3);
33 printf G "set print \"-\"\n" or die $!;
36 run("./$primer 'print ' '+-+' 'xyz' '( ' ', ' '); # ' ".
37 "'print ' ', ' - >>$gnuplot");
38 run("gnuplot $gnuplot >$initdata");