mirror of https://github.com/encounter/SDL.git
wikiheaders.pl: Mark some sections as wiki-only so we don't lose them.
This commit is contained in:
parent
231b849c9e
commit
c2152928fa
|
@ -233,13 +233,21 @@ my @standard_wiki_sections = (
|
||||||
'Draft',
|
'Draft',
|
||||||
'[Brief]',
|
'[Brief]',
|
||||||
'Syntax',
|
'Syntax',
|
||||||
'Remarks',
|
|
||||||
'Function Parameters',
|
'Function Parameters',
|
||||||
'Return Value',
|
'Return Value',
|
||||||
|
'Remarks',
|
||||||
'Version',
|
'Version',
|
||||||
|
'Code Examples',
|
||||||
'Related Functions'
|
'Related Functions'
|
||||||
);
|
);
|
||||||
|
|
||||||
|
# Sections that only ever exist in the wiki and shouldn't be deleted when
|
||||||
|
# not found in the headers.
|
||||||
|
my %only_wiki_sections = ( # The ones don't mean anything, I just need to check for key existence.
|
||||||
|
'Draft', 1,
|
||||||
|
'Code Examples', 1
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
my %headers = (); # $headers{"SDL_audio.h"} -> reference to an array of all lines of text in SDL_audio.h.
|
my %headers = (); # $headers{"SDL_audio.h"} -> reference to an array of all lines of text in SDL_audio.h.
|
||||||
my %headerfuncs = (); # $headerfuncs{"SDL_OpenAudio"} -> string of header documentation for SDL_OpenAudio, with comment '*' bits stripped from the start. Newlines embedded!
|
my %headerfuncs = (); # $headerfuncs{"SDL_OpenAudio"} -> string of header documentation for SDL_OpenAudio, with comment '*' bits stripped from the start. Newlines embedded!
|
||||||
|
@ -761,7 +769,9 @@ if ($copy_direction == 1) { # --copy-to-headers
|
||||||
|
|
||||||
foreach (@standard_wiki_sections) {
|
foreach (@standard_wiki_sections) {
|
||||||
# drop sections we either replaced or removed from the original wiki's contents.
|
# drop sections we either replaced or removed from the original wiki's contents.
|
||||||
delete($$sectionsref{$_});
|
if (not defined $only_wiki_sections{$_}) {
|
||||||
|
delete($$sectionsref{$_});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
my $wikisectionorderref = $wikisectionorder{$fn};
|
my $wikisectionorderref = $wikisectionorder{$fn};
|
||||||
|
|
Loading…
Reference in New Issue