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