[perl #20755] [PATCH] 5.8.0 h2ph barfs on checksum.h on RH6.2/7.2
Kurt Starsinic [Mon, 10 Mar 2003 00:54:49 +0000 (19:54 -0500)]
Message-ID: <m3d6kyvazx.wl_rspier@pobox.com>

p4raw-id: //depot/perl@18963

t/lib/h2ph.h
t/lib/h2ph.pht
utils/h2ph.PL

index c60e8f0..f13b69c 100644 (file)
@@ -121,4 +121,15 @@ enum flimflam {
   flam                      
  } flamflim;
 
+/* Handle multi-line quoted strings: */
+__asm__ __volatile__("
+    this
+    produces
+    no
+    output
+");
+
+#define multiline "multiline
+string"
+
 #endif /* _H2PH_H_ */
index 796d6a8..8bc1636 100644 (file)
@@ -84,5 +84,6 @@ unless(defined(&_H2PH_H_)) {
     }
     eval("sub flim () { 0; }") unless defined(&flim);
     eval("sub flam () { 1; }") unless defined(&flam);
+    eval 'sub multiline () {"multilinestring";}' unless defined(&multiline);
 }
 1;
index f4b04f9..27a7bf6 100644 (file)
@@ -489,10 +489,18 @@ sub next_line
                 $out    .= $1;
             } elsif ($in =~ s/^(\\.)//) {                   # \...
                 $out    .= $1;
-            } elsif ($in =~ s/^('(\\.|[^'\\])*')//) {       # '...
-                $out    .= $1;
-            } elsif ($in =~ s/^("(\\.|[^"\\])*")//) {       # "...
-                $out    .= $1;
+            } elsif ($in =~ /^'/) {                         # '...
+                if ($in =~ s/^('(\\.|[^'\\])*')//) {
+                    $out    .= $1;
+                } else {
+                    next READ;
+                }
+            } elsif ($in =~ /^"/) {                         # "...
+                if ($in =~ s/^("(\\.|[^"\\])*")//) {
+                    $out    .= $1;
+                } else {
+                    next READ;
+                }
             } elsif ($in =~ s/^\/\/.*//) {                  # //...
                 # fall through
             } elsif ($in =~ m/^\/\*/) {                     # /*...