develooper Front page | perl.perl5.porters | Postings from November 2004

[PATCH] h2ph vs __asm__

Thread Next
Rafael Garcia-Suarez
November 25, 2004 08:24
[PATCH] h2ph vs __asm__
Message ID:
Occasionally, you'll find an evil .h file with macros that contain
assembly code.

In this case, I think the best that h2ph can do is to wave hands
desperately and flag the part of the code it wasn't able to convert.
The following patch implements this :

Index: utils/h2ph.PL
--- utils/h2ph.PL       (revision 4057)
+++ utils/h2ph.PL       (working copy)
@@ -391,6 +391,7 @@
 exit $Exit;
 sub expr {
+    $new = '"(assembly code)"' and return if /\b__asm__\b/; # freak out.
     my $joined_args;
     if(keys(%curargs)) {
        $joined_args = join('|', keys(%curargs));

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About