added hex decodes for 0-1f 7f-ff in watchdbg and grepdbg
authorminima <minima>
Tue, 5 Dec 2000 13:51:33 +0000 (13:51 +0000)
committerminima <minima>
Tue, 5 Dec 2000 13:51:33 +0000 (13:51 +0000)
Changes
perl/grepdbg
perl/watchdbg

diff --git a/Changes b/Changes
index be14fb27cce40dcaf06826f035c7b9ae24b73408..461f3697f91289291a60450f7be4c0b526fdf85e 100644 (file)
--- a/Changes
+++ b/Changes
@@ -2,6 +2,8 @@
 1. fix frequency hinting routine so it correctly handles things like 'on 23cm'
 where digits are the 'wrong' way round.
 2. made default max days to search for spots 3 months.
+3. added hex decodes for those pesky 'national' characters that aren't really
+in grepdbg and watchdbg.
 03Dec00=======================================================================
 1. change grepdbg and watchdbg so that you can see a number of lines before
 the condx that you are looking for so:-
index 35c9a748ba9d4da025e339698d3eb2921e17f00c..5b95c6338565327e61b04d312cb9d58618eecd60 100755 (executable)
@@ -62,6 +62,7 @@ for my $entry (@list) {
                        shift @prev while @prev > $nolines;
                        if ($line =~ m{$string}io) {
                                for (@prev) {
+                                       $line =~ s/([\x00-\x1f\x7f-\xff])/sprintf("\\x%02X", ord($1))/eg; 
                                        my @line =  split '\^';
                                        my $t = shift @line;
                                        print atime($t), ' ', join('^', @line), "\n"; 
index 6058ed64566481494a6321a8dab1065734071dc6..7975529655809ac79b1e75447fb827f193f9c86f 100755 (executable)
@@ -73,12 +73,14 @@ sub printit
 {
        while (@_) {
                my $line = shift;
+               chomp $line;
+               $line =~ s/([\x00-\x1f\x7f-\xff])/sprintf("\\x%02X", ord($1))/eg; 
                my @line =  split '\^', $line;
                my $t = shift @line;
                my ($sec,$min,$hour) = gmtime((defined $t) ? $t : time);
                my $buf = sprintf "%02d:%02d:%02d", $hour, $min, $sec;
                
-               print $buf, ' ', join('^', @line); 
+               print $buf, ' ', join('^', @line), "\n"
        }
 }
 exit(0);