applied patch, and undid change#1302 which it made unnecessary
authorBilly Constantine <wdconsta@cs.adelaide.edu.au>
Sun, 5 Jul 1998 23:05:52 +0000 (08:35 +0930)
committerGurusamy Sarathy <gsar@cpan.org>
Sun, 5 Jul 1998 21:06:56 +0000 (21:06 +0000)
Subject: [PATCH] utils/h2ph.PL and t/lib/h2ph.t
Message-ID: <Pine.SV4.3.93.980705230337.27658A-100000@xenon.teaching.cs.adelaide.edu.au>

p4raw-link: @1302 on //depot/perl: 1289a8b80f063d20e88094098a0275f4681d9f97

p4raw-id: //depot/perl@1324

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

index 614c74d..1fa7f63 100755 (executable)
@@ -22,12 +22,7 @@ unless(-e '../utils/h2ph') {
     # i'll probably get in trouble for this :)
 } else {
     # does it run?
-    if ($^O ne 'dos') {
-        $ok = system("./perl -I../lib ../utils/h2ph -d. lib/h2ph.h");
-    } else {
-    # h2ph prints some info which confuses t/TEST on dos/djgpp
-        $ok = system("./perl -I../lib ../utils/h2ph -d. lib/h2ph.h >nul");
-    }
+    $ok = system("./perl -I../lib ../utils/h2ph -d. -Q lib/h2ph.h");
     print(($ok == 0 ? "" : "not "), "ok 1\n");
     
     # does it work? well, does it do what we expect? :-)
index 35cb7cc..066f2c9 100644 (file)
@@ -40,7 +40,7 @@ use Config;
 use File::Path qw(mkpath);
 use Getopt::Std;
 
-getopts('Dd:rlha');
+getopts('Dd:rlhaQ');
 die "-r and -a options are mutually exclusive\n" if ($opt_r and $opt_a);
 @inc_dirs = inc_dirs() if $opt_a;
 
@@ -81,7 +81,7 @@ while (defined ($file = next_file())) {
        open(OUT, ">-");
     } else {
        ($outfile = $file) =~ s/\.h$/.ph/ || next;
-       print "$file -> $outfile\n";
+       print "$file -> $outfile\n" unless $opt_Q;
        if ($file =~ m|^(.*)/|) {
            $dir = $1;
            mkpath "$Dest_dir/$dir";
@@ -237,7 +237,7 @@ while (defined ($file = next_file())) {
            } elsif(/^ident\s+(.*)/) {
                print OUT $t, "# $1\n";
            }
-       } elsif(/^\s*(typedef\s*)?enum(\s+[a-zA-Z_]\w*)?\s*\{/) {
+       } elsif(/^\s*(typedef\s*)?enum\s*(\s+[a-zA-Z_]\w*\s*)?\{/) {
            until(/\}.*?;/) {
                chomp($next = <IN>);
                $_ .= $next;