h2ph: Solaris has LDBL_EPSILON 1.0842021724855044340075E-19L
[p5sagit/p5-mst-13.2.git] / utils / h2ph.PL
index 7903996..b0b906d 100644 (file)
@@ -298,8 +298,8 @@ sub expr {
        s/^\&\&// && do { $new .= " &&"; next;}; # handle && operator
        s/^\&([\(a-z\)]+)/$1/i; # hack for things that take the address of
        s/^(\s+)//              && do {$new .= ' '; next;};
-       s/^(0X[0-9A-F]+)[UL]*//i        && do {$new .= lc($1); next;};
-       s/^(-?\d+\.\d+E[-+]\d+)F?//i    && do {$new .= $1; next;};
+       s/^(0X[0-9A-F]+)[UL]*//i                && do {$new .= lc($1); next;};
+       s/^(-?\d+\.\d+E[-+]?\d+)[FL]?//i        && do {$new .= $1; next;};
        s/^(\d+)\s*[LU]*//i     && do {$new .= $1; next;};
        s/^("(\\"|[^"])*")//    && do {$new .= $1; next;};
        s/^'((\\"|[^"])*)'//    && do {
@@ -426,6 +426,13 @@ sub next_line
                 $in =~ s/\?\?</{/g;                         # | ??<|  {|
                 $in =~ s/\?\?>/}/g;                         # | ??>|  }|
             }
+           if ($in =~ /^\#ifdef __LANGUAGE_PASCAL__/) {
+                # Tru64 disassembler.h evilness: mixed C and Pascal.
+               while (<IN>) {
+                   last if /^\#endif/; 
+               }
+               next READ;
+           }
             if ($in =~ s/\\$//) {                           # \-newline
                 $out    .= ' ';
                 next READ;
@@ -672,6 +679,10 @@ It is most easily run while in /usr/include:
 
 or
 
+       cd /usr/include; h2ph * sys/* arpa/* netinet/*
+
+or
+
        cd /usr/include; h2ph -r -l .
 
 The output files are placed in the hierarchy rooted at Perl's