mirror of
https://github.com/dkogan/feedgnuplot.git
synced 2025-08-09 05:26:36 +08:00
drivegnuplots: tabs->spaces. whitespace modifications only
Ignore-this: 8f3c72e2b8ce91f6eb13d7c6db6e38f2 darcs-hash:20090204212203-0cb85-8f340682a9daae2825be0b6a3dc743e5434b13f9.gz
This commit is contained in:
parent
cc96aac692
commit
6d2c3ccd0b
@ -16,8 +16,8 @@ OEF
|
|||||||
|
|
||||||
sub Arg {
|
sub Arg {
|
||||||
if ($#ARGV < $_[0]) {
|
if ($#ARGV < $_[0]) {
|
||||||
print "Expected parameter missing...\n\n";
|
print "Expected parameter missing...\n\n";
|
||||||
usage;
|
usage;
|
||||||
}
|
}
|
||||||
$ARGV[int($_[0])];
|
$ARGV[int($_[0])];
|
||||||
}
|
}
|
||||||
@ -68,7 +68,7 @@ sub main {
|
|||||||
my $xcounter = 0;
|
my $xcounter = 0;
|
||||||
plotHeader($xcounter, $samples, $numberOfStreams, *PIPE);
|
plotHeader($xcounter, $samples, $numberOfStreams, *PIPE);
|
||||||
while(<>) {
|
while(<>) {
|
||||||
chomp;
|
chomp;
|
||||||
my $line = $_;
|
my $line = $_;
|
||||||
foreach my $point ($line =~ /([-]?[0-9\.]+)/g)
|
foreach my $point ($line =~ /([-]?[0-9\.]+)/g)
|
||||||
{
|
{
|
||||||
@ -79,19 +79,19 @@ sub main {
|
|||||||
|
|
||||||
my $cnt = 0;
|
my $cnt = 0;
|
||||||
for my $elem (reverse @{$buf}) {
|
for my $elem (reverse @{$buf}) {
|
||||||
#print " ".$elem;
|
#print " ".$elem;
|
||||||
print PIPE ($xcounter-$cnt)." ".$elem."\n";
|
print PIPE ($xcounter-$cnt)." ".$elem."\n";
|
||||||
$cnt++;
|
$cnt++;
|
||||||
}
|
}
|
||||||
#print "\n";
|
#print "\n";
|
||||||
print PIPE "e\n";
|
print PIPE "e\n";
|
||||||
if ($cnt>=$samples) {
|
if ($cnt>=$samples) {
|
||||||
shift @{$buf};
|
shift @{$buf};
|
||||||
}
|
}
|
||||||
$streamIdx++;
|
$streamIdx++;
|
||||||
if ($streamIdx == $numberOfStreams) {
|
if ($streamIdx == $numberOfStreams) {
|
||||||
$streamIdx = 0;
|
$streamIdx = 0;
|
||||||
$xcounter++;
|
$xcounter++;
|
||||||
plotHeader($xcounter, $samples, $numberOfStreams, *PIPE);
|
plotHeader($xcounter, $samples, $numberOfStreams, *PIPE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user