Skip to content

Latest commit

 

History

History
28 lines (25 loc) · 658 Bytes

gendef.pl

File metadata and controls

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