release-1.10release-1.4release-1.5release-1.6release-1.7release-1.8release-1.9
Last change
on this file since 8ea3d47 was
8ea3d47,
checked in by Anders Kaseorg <andersk@mit.edu>, 15 years ago
|
codelist.pl, stubgen.pl: Don’t default to processing *.c.
|
-
Property mode set to
100755
|
File size:
580 bytes
|
Line | |
---|
1 | #! /usr/bin/perl |
---|
2 | # $Id$ |
---|
3 | |
---|
4 | foreach $file (@ARGV) { |
---|
5 | open(FILE, $file); |
---|
6 | |
---|
7 | print "/* -------------------------------- $file -------------------------------- */\n"; |
---|
8 | while (<FILE>) { |
---|
9 | if (/^\S/ |
---|
10 | && (/\{\s*$/ || /\)\s*$/) |
---|
11 | && !/\}/ |
---|
12 | && !/^\{/ |
---|
13 | && !/^#/ |
---|
14 | && !/^static/ |
---|
15 | && !/^system/ |
---|
16 | && !/^XS/ |
---|
17 | && !/\/\*/ |
---|
18 | && !/ZWRITEOPTIONS/ |
---|
19 | && !/owlfaim_priv/) |
---|
20 | { |
---|
21 | |
---|
22 | s/\s+\{/\;/; |
---|
23 | s/\)[ \t]*$/\)\;/; |
---|
24 | print "extern "; |
---|
25 | print; |
---|
26 | } elsif (/^#if/ || /^#else/ || /^#endif/) { |
---|
27 | print; |
---|
28 | } |
---|
29 | |
---|
30 | } |
---|
31 | close(FILE); |
---|
32 | print "\n"; |
---|
33 | } |
---|
34 | |
---|
35 | |
---|
Note: See
TracBrowser
for help on using the repository browser.