From: Hugo van der Sanden Date: Wed, 28 Nov 2001 04:19:21 +0000 (+0000) Subject: Re: h2ph confused by comments in an enum. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=4e15175a644dc94dffd2be1324573f20050a9a0f;p=p5sagit%2Fp5-mst-13.2.git Re: h2ph confused by comments in an enum. Date: Wed, 28 Nov 2001 04:19:21 +0000 Message-Id: <200111280419.fAS4JLD17887@crypt.compulink.co.uk> Subject: Re: More h2ph problems [was Re: h2ph confused by comments in an enum.] From: Hugo van der Sanden Date: Wed, 28 Nov 2001 13:36:35 +0000 Message-Id: <200111281336.fASDaZG30245@crypt.compulink.co.uk> p4raw-id: //depot/perl@13338 --- diff --git a/utils/h2ph.PL b/utils/h2ph.PL index 9082e14..4dab916 100644 --- a/utils/h2ph.PL +++ b/utils/h2ph.PL @@ -240,7 +240,7 @@ while (defined (my $file = next_file())) { } } elsif(/^\s*(typedef\s*)?enum\s*(\s+[a-zA-Z_]\w*\s*)?/) { until(/\{[^}]*\}.*;/ || /;/) { - last unless defined ($next = ); + last unless defined ($next = next_line()); chomp $next; # drop "#define FOO FOO" in enums $next =~ s/^\s*#\s*define\s+(\w+)\s+\1\s*$//; @@ -438,7 +438,7 @@ sub next_line } elsif ($in =~ s/^("(\\.|[^"\\])*")//) { # "... $out .= $1; } elsif ($in =~ s/^\/\/.*//) { # //... - last READ; + next READ; } elsif ($in =~ m/^\/\*/) { # /*... # C comment removal adapted from perlfaq6: if ($in =~ s/^\/\*[^*]*\*+([^\/*][^*]*\*+)*\///) {