source: codelist.pl @ 4193918

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