diff options
Diffstat (limited to 'utils/h2ph.PL')
-rw-r--r-- | utils/h2ph.PL | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/utils/h2ph.PL b/utils/h2ph.PL index d48571f00f..1b469daab8 100644 --- a/utils/h2ph.PL +++ b/utils/h2ph.PL @@ -50,7 +50,7 @@ die "Destination directory $Dest_dir doesn't exist or isn't a directory\n" short ushort u_short int uint u_int long ulong u_long - FILE + FILE key_t caddr_t END @isatype{@isatype} = (1) x @isatype; @@ -132,7 +132,7 @@ foreach $file (@ARGV) { print OUT $t,"eval 'sub $name () {",$new,";}' unless defined(\&$name);\n"; } else { - print OUT $t,"unless(defined(\&$name) {\nsub $name () {",$new,";}\n}\n"; + print OUT $t,"unless(defined(\&$name)) {\nsub $name () {",$new,";}\n}\n"; } } } @@ -191,9 +191,10 @@ exit $Exit; sub expr { while ($_ ne '') { + s/^\&//; # hack for things that take the address of s/^(\s+)// && do {$new .= ' '; next;}; s/^(0x[0-9a-fA-F]+)// && do {$new .= $1; next;}; - s/^(\d+)[LlUu]*// && do {$new .= $1; next;}; + s/^(\d+)\s*[LlUu]*// && do {$new .= $1; next;}; s/^("(\\"|[^"])*")// && do {$new .= $1; next;}; s/^'((\\"|[^"])*)'// && do { if ($curargs{$1}) { |