source: codelist.pl @ c269e22

barnowl_perlaimdebianowlrelease-1.10release-1.4release-1.5release-1.6release-1.7release-1.8release-1.9
Last change on this file since c269e22 was 4594d83, checked in by James M. Kretchmar <kretch@mit.edu>, 21 years ago
Another change to codelist.pl, this time to avoid getting perl XS things in accidentally.
  • Property mode set to 100755
File size: 532 bytes
RevLine 
[69894d2]1#! /usr/bin/perl
[1aee7d9]2# $Id$
3
[7d4fbcd]4if ($#ARGV eq -1) {
5    @ARGV=`ls *.c`;
6    chop(@ARGV);
7}
8
9foreach $file (@ARGV) {
10    open(FILE, $file);
11
12    print "/* -------------------------------- $file -------------------------------- */\n";
13    while (<FILE>) {
14        if (/^\S/
[ac70242]15            && (/\{\s*$/ || /\)\s*$/)
[7d4fbcd]16            && !/\}/
17            && !/^\{/
[ac70242]18            && !/^#/
[7d4fbcd]19            && !/^static/
[69894d2]20            && !/^system/
[4594d83]21            && !/^XS/
22            && !/\/\*/) {
23            s/\s+\{/\;/;
24            s/\)[ \t]*$/\)\;/;
25            print "extern ";
26            print;
27        }
[7d4fbcd]28           
29    }
30    close(FILE);
31    print "\n";
32}
[4594d83]33
34
Note: See TracBrowser for help on using the repository browser.