src/main/macos/exports/gendef.pl
author Sam Lantinga
Fri, 24 Feb 2006 17:03:06 +0000
changeset 1427 5f5a74d29d18
parent 1424 7a610f25c12f
child 1516 4d241ea8a1cd
permissions -rw-r--r--
Updated with MrC includes and function definitions
slouken@0
     1
#!/usr/bin/perl
slouken@0
     2
#
slouken@0
     3
# Program to take a set of header files and generate DLL export definitions
slouken@0
     4
slouken@1317
     5
# Special exports to ignore for this platform
slouken@1317
     6
$exclude{"SDL_CreateThread_Core"} = 1;
slouken@1317
     7
slouken@0
     8
while ( ($file = shift(@ARGV)) ) {
slouken@0
     9
	if ( ! defined(open(FILE, $file)) ) {
slouken@0
    10
		warn "Couldn't open $file: $!\n";
slouken@0
    11
		next;
slouken@0
    12
	}
slouken@0
    13
	$printed_header = 0;
slouken@0
    14
	$file =~ s,.*/,,;
slouken@0
    15
	while (<FILE>) {
slouken@930
    16
		if ( / DECLSPEC.* SDLCALL ([^\s\(]+)/ ) {
slouken@1317
    17
			if ( not $exclude{$1} ) {
slouken@1317
    18
				print "\t$1\n";
slouken@1317
    19
			}
slouken@0
    20
		}
slouken@0
    21
	}
slouken@0
    22
	close(FILE);
slouken@0
    23
}
slouken@1317
    24
slouken@1317
    25
# Special exports to include for this platform
slouken@1424
    26
print "\tSDL_putenv\n";
slouken@1424
    27
print "\tSDL_getenv\n";
slouken@1424
    28
print "\tSDL_qsort\n";
slouken@1424
    29
print "\tSDL_revcpy\n";
slouken@1424
    30
print "\tSDL_strlcpy\n";
slouken@1424
    31
print "\tSDL_strlcat\n";
slouken@1424
    32
print "\tSDL_strdup\n";
slouken@1424
    33
print "\tSDL_strrev\n";
slouken@1424
    34
print "\tSDL_strupr\n";
slouken@1424
    35
print "\tSDL_strlwr\n";
slouken@1424
    36
print "\tSDL_ltoa\n";
slouken@1424
    37
print "\tSDL_ultoa\n";
slouken@1424
    38
print "\tSDL_snprintf\n";
slouken@1424
    39
print "\tSDL_vsnprintf\n";
slouken@0
    40
print "\tSDL_InitQuickDraw\n";