You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
wikiheaders: Defines directly following a non-struct typedef are documented.
The idea is that if you have a `typedef Uint32 MyFlags` that has a bunch of
defines that are meant to be bitflags, you can pack them into the same wiki
page automatically.
This only works with `typedef`s that are _not_ struct/union/enums, and it
only pulls in `#define` lines that immediately follow the typedef line.
Even a blank line or a comment will signal to stop including lines for
this page!
Copy file name to clipboardExpand all lines: build-scripts/wikiheaders.pl
+15Lines changed: 15 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -858,6 +858,21 @@ sub print_undocumented_section {
858
858
}
859
859
next;
860
860
}
861
+
862
+
# We assume any `#define`s directly after the typedef are related to it: probably bitflags for an integer typedef. Even a blank line will signify an end!
863
+
my$lastpos = tell(FH);
864
+
my$additional_decl = '';
865
+
while (<FH>) {
866
+
chomp;
867
+
if (not /\A\s*\#define\s+/) {
868
+
seek(FH, $lastpos, 0); # re-read this line again next time.
0 commit comments