Ticket #423: uzip.diff
File uzip.diff, 2.2 KB (added by swiergot, 15 years ago) |
---|
-
uzip
old new 38 38 # (perm) (?) (?) (size) (?) (zippedsize) (method) (yyyy)(mm)(dd)(HH)(MM) (fname) 39 39 my $regex_zipinfo_line = qr"^(\S{7,10})\s+(\d+\.\d+)\s+(\S+)\s+(\d+)\s+(\S\S)\s+(\d+)\s+(\S{4})\s+(\d{4})(\d\d)(\d\d)\.(\d\d)(\d\d)(\d\d)\s(.*)$"; 40 40 41 # unzip 5.x 41 42 # 2891 Defl:N 1435 50% 03-30-00 21:19 50cbaaf8 ./edit.html 42 43 # (size) (method) (zippedsize) (zipratio) (mm)(dd)(yy)(HH)(MM) (cksum) (fname) 43 my $regex_nonzipinfo_line = qr"^\s*(\d+)\s+(\S+)\s+(\d+)\s+(-?\d+\%)\s+(\d?\d)-(\d?\d)-(\d\d)\s+(\d?\d):(\d\d)\s+([0-9a-f]+)\s\s(.*)$"; 44 my $regex_nonzipinfo_line_5 = qr"^\s*(\d+)\s+(\S+)\s+(\d+)\s+(-?\d+\%)\s+(\d?\d)-(\d?\d)-(\d\d)\s+(\d?\d):(\d\d)\s+([0-9a-f]+)\s\s(.*)$"; 45 # unzip 6.x 46 # 2891 Defl:N 1435 50% 2000-03-30 21:19 50cbaaf8 ./edit.html 47 # (size) (method) (zippedsize) (zipratio) (yyyy)(mm)(dd)(HH)(MM) (cksum) (fname) 48 my $regex_nonzipinfo_line_6 = qr"^\s*(\d+)\s+(\S+)\s+(\d+)\s+(-?\d+\%)\s+(\d{4})-(\d?\d)-(\d\d)\s+(\d?\d):(\d\d)\s+([0-9a-f]+)\s\s(.*)$"; 44 49 45 50 # 46 51 # Main code … … 86 91 $zipfs_realpathname_table->{zipfs_canonicalize_pathname($fname)} = $fname; 87 92 } 88 93 } else { 89 if ($line =~ $regex_nonzipinfo_line ) {94 if ($line =~ $regex_nonzipinfo_line_5 || $line =~ $regex_nonzipinfo_line_6) { 90 95 my ($fname) = ($11); 91 96 $zipfs_realpathname_table->{zipfs_canonicalize_pathname($fname)} = $fname; 92 97 } … … 259 264 } else { 260 265 while (<PIPE>) { 261 266 chomp; 262 my @match = /$regex_nonzipinfo_line/; 263 next if ($#match != 10); 264 my @rmatch = ('', '', 'unknown', $match[0], '', $match[2], $match[1], 267 my (@match, @rmatch); 268 if (@match = /$regex_nonzipinfo_line_5/) 269 { 270 @rmatch = ('', '', 'unknown', $match[0], '', $match[2], $match[1], 265 271 $match[6] + ($match[6] < 70 ? 2000 : 1900), $match[4], $match[5], 266 272 $match[7], $match[8], "00", $match[10]); 273 } 274 elsif (@match = /$regex_nonzipinfo_line_6/) 275 { 276 @rmatch = ('', '', 'unknown', $match[0], '', $match[2], $match[1], 277 $match[4], $match[5], $match[6], 278 $match[7], $match[8], "00", $match[10]); 279 } 280 else 281 { 282 next; 283 } 267 284 &checked_print_file(@rmatch); 268 285 } 269 286 }