h2ph misquotes #error directives
Kurt D. Starsinic [Thu, 20 Aug 1998 20:59:03 +0000 (16:59 -0400)]
Message-ID: <19980820205903.A12908@O2.chapin.edu>

p4raw-id: //depot/perl@1814

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

index 80867a6..d5e7434 100644 (file)
@@ -27,7 +27,7 @@ unless(defined(&_H2PH_H_)) {
     if(!(defined (defined(&__SOMETHING_MORE_IMPORTANT) ? &__SOMETHING_MORE_IMPORTANT : 0))) {
     }
  elsif(!(defined (defined(&__SOMETHING_REALLY_REALLY_IMPORTANT) ? &__SOMETHING_REALLY_REALLY_IMPORTANT : 0))) {
-       die("Nup, can't go on ");
+       die("Nup\,\ can\'t\ go\ on\ ");
     } else {
        eval 'sub EVERYTHING_IS_OK () {1;}' unless defined(&EVERYTHING_IS_OK);
     }
index 066f2c9..731360e 100644 (file)
@@ -231,9 +231,9 @@ while (defined ($file = next_file())) {
            } elsif(/^undef\s+(\w+)/) {
                print OUT $t, "undef(&$1) if defined(&$1);\n";
            } elsif(/^error\s+(.*)/) {
-               print OUT $t, "die(\"$1\");\n";
+               print OUT $t, "die(\"", quotemeta($1), "\");\n";
            } elsif(/^warning\s+(.*)/) {
-               print OUT $t, "warn(\"$1\");\n";
+               print OUT $t, "warn(\"", quotemeta($1), "\");\n";
            } elsif(/^ident\s+(.*)/) {
                print OUT $t, "# $1\n";
            }