Hello,
I would like to generate a special SDL.h file, but I am not a perl addict
so I need a little help. It is based on the src/main/…/exports/gendef.pl
script. I want one that convert this (and all other SDL include files):
extern DECLSPEC SDL_Init(Uint32 flags);
in this (in the output file):
extern DECLSPEC (*SDL_Init) (Uint32 flags);
This way, I could use a special dynamic library loader, and SDL could be
dynamically linked with any programs. On Atari target, I need this.
Thanks.–
Patrice Mandin
WWW: http://www.multimania.com/pmandin
Programmeur Linux, Atari
Sp?cialit?: D?veloppement, jeux
extern DECLSPEC SDL_Init(Uint32 flags);
in this (in the output file):
extern DECLSPEC (*SDL_Init) (Uint32 flags);
#!/usr/bin/perl
use warnings;
use strict;
while (<>) {
if ( s/extern DECLSPEC (\w*)\s*(.?)\s(/extern DECLSPEC $1 (*$2) (/ ) {
print $_;
}
}
end of script
Run this as:
./myscript SDL12/include/* > mynewheader.h
–ryan.