source: codelist.pl @ e2cbbbe

release-1.10release-1.4release-1.5release-1.6release-1.7release-1.8release-1.9
Last change on this file since e2cbbbe was d7cc50b, checked in by Anders Kaseorg <andersk@mit.edu>, 15 years ago
Death to more RCS keywords. Signed-off-by: Anders Kaseorg <andersk@mit.edu>
  • Property mode set to 100755
File size: 573 bytes
RevLine 
[69894d2]1#! /usr/bin/perl
[1aee7d9]2
[7d4fbcd]3foreach $file (@ARGV) {
4    open(FILE, $file);
5
6    print "/* -------------------------------- $file -------------------------------- */\n";
7    while (<FILE>) {
8        if (/^\S/
[ac70242]9            && (/\{\s*$/ || /\)\s*$/)
[7d4fbcd]10            && !/\}/
11            && !/^\{/
[ac70242]12            && !/^#/
[7d4fbcd]13            && !/^static/
[69894d2]14            && !/^system/
[4594d83]15            && !/^XS/
[0ff8fb57]16            && !/\/\*/
17            && !/ZWRITEOPTIONS/
[09489b89]18            && !/owlfaim_priv/)
[0ff8fb57]19        {
[09489b89]20
[4594d83]21            s/\s+\{/\;/;
22            s/\)[ \t]*$/\)\;/;
23            print "extern ";
24            print;
[09489b89]25        } elsif (/^#if/ || /^#else/ || /^#endif/) {
26            print;
[4594d83]27        }
[7d4fbcd]28           
29    }
30    close(FILE);
31    print "\n";
32}
[4594d83]33
34
Note: See TracBrowser for help on using the repository browser.