Mailing List archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[vdr] Re: master-timer 0.5.1 bugfix/enhancement
----- Original Message -----
From: "Sergei Haller" <Sergei.Haller@math.uni-giessen.de>
To: <vdr@linuxtv.org>
Sent: Sunday, March 24, 2002 9:58 PM
Subject: [vdr] Re: master-timer 0.5.1 bugfix/enhancement
> On Sun, 24 Mar 2002, Henning Holtschneider (HH) wrote:
>
> HH> + $retval[$linenum] = $_;
> HH> + $linenum++;
>
>
> you may want to save the variable $linenum by using $#retval instead.
> or speedup even more by using the push function (see man perlfunc for more
> details)
Ok, this brings the patch down to two lines:
diff -ur master-timer-0.5.1.orig/processprogram.pl
master-timer-0.5.1/processprogram.pl
--- master-timer-0.5.1.orig/processprogram.pl Mon Mar 4 00:27:57 2002
+++ master-timer-0.5.1/processprogram.pl Sun Mar 24 21:03:32 2002
@@ -517,7 +517,7 @@
@lines = (@lines,GetSend ($num, "LSTE"));
}
foreach $line (@lines) {
- $line =~ s/^250[- ]//
+ $line =~ s/^\d+[- ]//;
}
} else {
open (FI,"epg.data") or die ("Can't open file \"epg.data\"\n");
diff -ur master-timer-0.5.1.orig/svdr.pl master-timer-0.5.1/svdr.pl
--- master-timer-0.5.1.orig/svdr.pl Fri Feb 22 21:55:15 2002
+++ master-timer-0.5.1/svdr.pl Sun Mar 24 23:39:16 2002
@@ -65,7 +65,7 @@
print $socket "$command\r\n";
while (<$socket>) {
s/\x0d//g;
- (@retval) = (@retval, $_);
+ push(@retval, $_);
last if substr($_, 3, 1) ne "-";
}
}
Thanks for the hint!
hh
Home |
Main Index |
Thread Index