summaryrefslogtreecommitdiff
path: root/zlib2ansi
diff options
context:
space:
mode:
authorMark Adler <madler@alumni.caltech.edu>2011-09-09 23:27:17 -0700
committerMark Adler <madler@alumni.caltech.edu>2011-09-09 23:27:17 -0700
commite0ff940e1adb68d3575705ebf1546d9f07ad3b4a (patch)
tree792ac6996d1225c0955027050296126bc8ff6e26 /zlib2ansi
parent7df877eccdd826e94df53215f65dee639428e83f (diff)
downloadzlib-e0ff940e1adb68d3575705ebf1546d9f07ad3b4a.tar.gz
zlib 1.2.3.8v1.2.3.8
Diffstat (limited to 'zlib2ansi')
-rwxr-xr-xzlib2ansi28
1 files changed, 14 insertions, 14 deletions
diff --git a/zlib2ansi b/zlib2ansi
index 0695f6b..15e3e16 100755
--- a/zlib2ansi
+++ b/zlib2ansi
@@ -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
)