|
@@ -872,7 +872,7 @@ while (my $d = readdir(DH)) {
|
|
}
|
|
}
|
|
$decl =~ s/\s*\)\s*(\{.*|)\s*\Z/);/;
|
|
$decl =~ s/\s*\)\s*(\{.*|)\s*\Z/);/;
|
|
} else {
|
|
} else {
|
|
- if (not $decl =~ /\)\s*;/) {
|
|
|
|
|
|
+ if (not $decl =~ /;/) {
|
|
while (<FH>) {
|
|
while (<FH>) {
|
|
chomp;
|
|
chomp;
|
|
$lineno++;
|
|
$lineno++;
|
|
@@ -880,14 +880,19 @@ while (my $d = readdir(DH)) {
|
|
s/\A\s+//;
|
|
s/\A\s+//;
|
|
s/\s+\Z//;
|
|
s/\s+\Z//;
|
|
$decl .= " $_";
|
|
$decl .= " $_";
|
|
- last if /\)\s*;/;
|
|
|
|
|
|
+ last if /;/;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
$decl =~ s/\s+\);\Z/);/;
|
|
$decl =~ s/\s+\);\Z/);/;
|
|
|
|
+ $decl =~ s/\s+;\Z/;/;
|
|
}
|
|
}
|
|
|
|
|
|
$decl =~ s/\s+\Z//;
|
|
$decl =~ s/\s+\Z//;
|
|
|
|
|
|
|
|
+ $decl =~ s/\s*SDL_W?PRINTF_VARARG_FUNCV?\s*\(\d+\)\s*//; # don't want this metadata as part of the documentation.
|
|
|
|
+ $decl =~ s/SDL_PRINTF_FORMAT_STRING\s*//; # don't want this metadata as part of the documentation.
|
|
|
|
+ $decl =~ s/\s*SDL_ANALYZER_NORETURN\s*//; # don't want this metadata as part of the documentation.
|
|
|
|
+
|
|
if (!$is_forced_inline && $decl =~ /\A\s*extern\s+(SDL_DEPRECATED\s+|)(SDLMAIN_|SDL_)DECLSPEC\s+(const\s+|)(unsigned\s+|)(.*?)\s*(\*?)\s*SDLCALL\s+(.*?)\s*\((.*?)\);/) {
|
|
if (!$is_forced_inline && $decl =~ /\A\s*extern\s+(SDL_DEPRECATED\s+|)(SDLMAIN_|SDL_)DECLSPEC\s+(const\s+|)(unsigned\s+|)(.*?)\s*(\*?)\s*SDLCALL\s+(.*?)\s*\((.*?)\);/) {
|
|
$sym = $7;
|
|
$sym = $7;
|
|
} elsif ($is_forced_inline && $decl =~ /\A\s*SDL_FORCE_INLINE\s+(SDL_DEPRECATED\s+|)(const\s+|)(unsigned\s+|)(.*?)([\*\s]+)(.*?)\s*\((.*?)\);/) {
|
|
} elsif ($is_forced_inline && $decl =~ /\A\s*SDL_FORCE_INLINE\s+(SDL_DEPRECATED\s+|)(const\s+|)(unsigned\s+|)(.*?)([\*\s]+)(.*?)\s*\((.*?)\);/) {
|
|
@@ -919,8 +924,9 @@ while (my $d = readdir(DH)) {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- $decl =~ s/\s*SDL_W?PRINTF_VARARG_FUNCV?\s*\(\d+\)\s*;\Z/;/; # don't want this metadata as part of the documentation.
|
|
|
|
|
|
+ $decl =~ s/\s*SDL_W?PRINTF_VARARG_FUNCV?\s*\(\d+\)\s*//; # don't want this metadata as part of the documentation.
|
|
$decl =~ s/SDL_PRINTF_FORMAT_STRING\s*//; # don't want this metadata as part of the documentation.
|
|
$decl =~ s/SDL_PRINTF_FORMAT_STRING\s*//; # don't want this metadata as part of the documentation.
|
|
|
|
+ $decl =~ s/\s*SDL_ANALYZER_NORETURN\s*//; # don't want this metadata as part of the documentation.
|
|
|
|
|
|
# !!! FIXME: code duplication with typedef processing, below.
|
|
# !!! FIXME: code duplication with typedef processing, below.
|
|
# We assume any `#define`s directly after the function are related to it: probably bitflags for an integer typedef.
|
|
# We assume any `#define`s directly after the function are related to it: probably bitflags for an integer typedef.
|