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

[PATCH] h2ph vs __asm__

Thread Next
From:
Rafael Garcia-Suarez
Date:
November 25, 2004 08:24
Subject:
[PATCH] h2ph vs __asm__
Message ID:
20041125172443.757a4833@dhcp123.mandrakesoft.com
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));
End.

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About