Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

executable file 37 lines (32 sloc) 0.726 kb
#! /usr/bin/perl
my $guard_symbol = "INC_BARNOWL_OWL_PROTOTYPES_H";
print "#ifndef $guard_symbol\n";
print "#define $guard_symbol\n";
foreach $file (@ARGV) {
open(FILE, $file);
print "/* -------------------------------- $file -------------------------------- */\n";
while (<FILE>) {
if (/^\S/
&& (/\{\s*$/ || /\)\s*$/)
&& !/\}/
&& !/^\{/
&& !/^#/
&& !/^static/
&& !/^system/
&& !/^XS/
&& !/\/\*/
&& !/ZWRITEOPTIONS/
&& !/owlfaim_priv/)
{
s/\s+\{/\;/;
s/\)[ \t]*$/\)\;/;
print "extern ";
print;
} elsif (/^#if/ || /^#else/ || /^#endif/) {
print;
}
}
close(FILE);
print "\n";
}
print "#endif /* $guard_symbol */\n";
Jump to Line
Something went wrong with that request. Please try again.