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
     1 #!/usr/bin/perl
     2 #
     3 # Program to take a set of header files and generate DLL export definitions
     4 
     5 # Special exports to ignore for this platform
     6 $exclude{"SDL_CreateThread_Core"} = 1;
     7 
     8 while ( ($file = shift(@ARGV)) ) {
     9 	if ( ! defined(open(FILE, $file)) ) {
    10 		warn "Couldn't open $file: $!\n";
    11 		next;
    12 	}
    13 	$printed_header = 0;
    14 	$file =~ s,.*/,,;
    15 	while (<FILE>) {
    16 		if ( / DECLSPEC.* SDLCALL ([^\s\(]+)/ ) {
    17 			if ( not $exclude{$1} ) {
    18 				print "\t$1\n";
    19 			}
    20 		}
    21 	}
    22 	close(FILE);
    23 }
    24 
    25 # Special exports to include for this platform
    26 print "\tSDL_putenv\n";
    27 print "\tSDL_getenv\n";
    28 print "\tSDL_qsort\n";
    29 print "\tSDL_revcpy\n";
    30 print "\tSDL_strlcpy\n";
    31 print "\tSDL_strlcat\n";
    32 print "\tSDL_strdup\n";
    33 print "\tSDL_strrev\n";
    34 print "\tSDL_strupr\n";
    35 print "\tSDL_strlwr\n";
    36 print "\tSDL_ltoa\n";
    37 print "\tSDL_ultoa\n";
    38 print "\tSDL_snprintf\n";
    39 print "\tSDL_vsnprintf\n";
    40 print "\tSDL_InitQuickDraw\n";