diff options
author | Mark Adler <madler@alumni.caltech.edu> | 2011-09-09 23:27:17 -0700 |
---|---|---|
committer | Mark Adler <madler@alumni.caltech.edu> | 2011-09-09 23:27:17 -0700 |
commit | e0ff940e1adb68d3575705ebf1546d9f07ad3b4a (patch) | |
tree | 792ac6996d1225c0955027050296126bc8ff6e26 /zlib2ansi | |
parent | 7df877eccdd826e94df53215f65dee639428e83f (diff) | |
download | zlib-e0ff940e1adb68d3575705ebf1546d9f07ad3b4a.tar.gz |
zlib 1.2.3.8v1.2.3.8
Diffstat (limited to 'zlib2ansi')
-rwxr-xr-x | zlib2ansi | 28 |
1 files changed, 14 insertions, 14 deletions
@@ -25,7 +25,7 @@ my $decl = qr{ $sp (?: \w+ $sp )+ $d1 }xo ; my $dList = qr{ $sp $decl (?: $sp , $d1 )* $sp ; $sp }xo ; -while (s/^ +while (s/^ ( # Start $1 ( # Start $2 .*? # Minimal eat content @@ -57,7 +57,7 @@ while (s/^ my $i = 0 ; my %pList = map { $_ => $i++ } split /\s*,\s*/, $param_list; - my $pMatch = '(\b' . join('|', keys %pList) . '\b)\W*$' ; + my $pMatch = '(\b' . join('|', keys %pList) . '\b)\W*$' ; my @params = split /\s*;\s*/, $params; my @outParams = (); @@ -80,16 +80,16 @@ while (s/^ } } - - my %tmp = map { /$pMatch/; $_ => $pList{$1} } + + my %tmp = map { /$pMatch/; $_ => $pList{$1} } @outParams ; - @outParams = map { " $_" } - sort { $tmp{$a} <=> $tmp{$b} } + @outParams = map { " $_" } + sort { $tmp{$a} <=> $tmp{$b} } @outParams ; print $prefix ; - print "(\n" . join(",\n", @outParams) . ")\n"; + print "(\n" . join(",\n", @outParams) . ")\n"; print "{" ; } @@ -116,13 +116,13 @@ sub StripComments )* ## 0-or-more things which don't start with / ## but do end with '*' / ## End of /* ... */ comment - + | ## OR C++ Comment - // ## Start of C++ comment // + // ## Start of C++ comment // [^\n]* ## followed by 0-or-more non end of line characters | ## OR various things which aren't comments: - + ( " ## Start of " ... " string ( @@ -131,9 +131,9 @@ sub StripComments [^"\\] ## Non "\ )* " ## End of " ... " string - + | ## OR - + ' ## Start of ' ... ' string ( \\. ## Escaped char @@ -141,9 +141,9 @@ sub StripComments [^'\\] ## Non '\ )* ' ## End of ' ... ' string - + | ## OR - + . ## Anything other char [^/"'\\]* ## Chars which doesn't start a comment, string or escape ) |