/
gendef.pl
26 lines (23 loc) · 561 Bytes
1
2
3
4
#!/usr/bin/perl
#
# Program to take a set of header files and generate DLL export definitions
5
6
7
# Special exports to ignore for this platform
$exclude{"SDL_CreateThread_Core"} = 1;
8
9
10
11
12
13
14
15
while ( ($file = shift(@ARGV)) ) {
if ( ! defined(open(FILE, $file)) ) {
warn "Couldn't open $file: $!\n";
next;
}
$printed_header = 0;
$file =~ s,.*/,,;
while (<FILE>) {
16
if ( / DECLSPEC.* SDLCALL ([^\s\(]+)/ ) {
17
18
19
if ( not $exclude{$1} ) {
print "\t$1\n";
}
20
21
22
23
}
}
close(FILE);
}
24
25
# Special exports to include for this platform
26
print "\tSDL_InitQuickDraw\n";