Skip to content

Latest commit

 

History

History
20 lines (19 loc) · 424 Bytes

gendef.pl

File metadata and controls

20 lines (19 loc) · 424 Bytes
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/usr/bin/perl
#
# Program to take a set of header files and generate DLL export definitions
while ( ($file = shift(@ARGV)) ) {
if ( ! defined(open(FILE, $file)) ) {
warn "Couldn't open $file: $!\n";
next;
}
$printed_header = 0;
$file =~ s,.*/,,;
while (<FILE>) {
if ( /DECLSPEC.*\s\**([^\s\(]+)\(/ ) {
print "\t_$1\n";
} elsif ( /DECLSPEC.*\s\**([^\s\(]+)$/ ) {
print "\t_$1\n";
}
}
close(FILE);
}