mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-05-15 09:18:27 +00:00
wikiheaders: Deal with SDLMAIN_DECLSPEC functions.
This commit is contained in:
parent
ab5b904890
commit
3348d0caaf
1 changed files with 5 additions and 5 deletions
|
@ -642,7 +642,7 @@ while (my $d = readdir(DH)) {
|
|||
$ignoring_lines = 1;
|
||||
push @contents, $_;
|
||||
next;
|
||||
} elsif (/\A\s*extern\s+(SDL_DEPRECATED\s+|)DECLSPEC/) { # a function declaration without a doxygen comment?
|
||||
} elsif (/\A\s*extern\s+(SDL_DEPRECATED\s+|)(SDLMAIN_)?DECLSPEC/) { # a function declaration without a doxygen comment?
|
||||
$symtype = 1; # function declaration
|
||||
@templines = ();
|
||||
$decl = $_;
|
||||
|
@ -689,7 +689,7 @@ while (my $d = readdir(DH)) {
|
|||
$lineno++ if defined $decl;
|
||||
$decl = '' if not defined $decl;
|
||||
chomp($decl);
|
||||
if ($decl =~ /\A\s*extern\s+(SDL_DEPRECATED\s+|)DECLSPEC/) {
|
||||
if ($decl =~ /\A\s*extern\s+(SDL_DEPRECATED\s+|)(SDLMAIN_)?DECLSPEC/) {
|
||||
$symtype = 1; # function declaration
|
||||
} elsif ($decl =~ /\A\s*SDL_FORCE_INLINE/) {
|
||||
$symtype = 1; # (forced-inline) function declaration
|
||||
|
@ -749,8 +749,8 @@ while (my $d = readdir(DH)) {
|
|||
|
||||
$decl =~ s/\s+\Z//;
|
||||
|
||||
if (!$is_forced_inline && $decl =~ /\A\s*extern\s+(SDL_DEPRECATED\s+|)DECLSPEC\s+(const\s+|)(unsigned\s+|)(.*?)\s*(\*?)\s*SDLCALL\s+(.*?)\s*\((.*?)\);/) {
|
||||
$sym = $6;
|
||||
if (!$is_forced_inline && $decl =~ /\A\s*extern\s+(SDL_DEPRECATED\s+|)(SDLMAIN_)?DECLSPEC\s+(const\s+|)(unsigned\s+|)(.*?)\s*(\*?)\s*SDLCALL\s+(.*?)\s*\((.*?)\);/) {
|
||||
$sym = $7;
|
||||
#$decl =~ s/\A\s*extern\s+DECLSPEC\s+(.*?)\s+SDLCALL/$1/;
|
||||
} elsif ($is_forced_inline && $decl =~ /\A\s*SDL_FORCE_INLINE\s+(SDL_DEPRECATED\s+|)(const\s+|)(unsigned\s+|)(.*?)([\*\s]+)(.*?)\s*\((.*?)\);/) {
|
||||
$sym = $6;
|
||||
|
@ -770,7 +770,7 @@ while (my $d = readdir(DH)) {
|
|||
foreach (@decllines) {
|
||||
if ($decl eq '') {
|
||||
$decl = $_;
|
||||
$decl =~ s/\Aextern\s+(SDL_DEPRECATED\s+|)DECLSPEC\s+(.*?)\s+(\*?)SDLCALL\s+/$2$3 /;
|
||||
$decl =~ s/\Aextern\s+(SDL_DEPRECATED\s+|)(SDLMAIN_)?DECLSPEC\s+(.*?)\s+(\*?)SDLCALL\s+/$3$4 /;
|
||||
} else {
|
||||
my $trimmed = $_;
|
||||
# !!! FIXME: trim space for SDL_DEPRECATED if it was used, too.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue