hsk-libs-scripts
270
High Speed Karlsruhe XC878 build scripts
|
Converts an awk script containing doxygen comments into something the C parser of doxygen can handle. More...
Functions | |
void | filter14 () |
Initialise globals. More... | |
void | debug (var msg) |
Prints a debugging message on stderr. More... | |
void | filter38 () |
Fill the input buffer. More... | |
void | initDoc () |
Setup globals to assemble a new documentation block. More... | |
var | genFunction (var name) |
Generates a function signature. More... | |
void | filter84 () |
Flush the remaining input buffer. More... | |
void | filter94 () |
Initialise file documentation. More... | |
void | filter103 () |
Initialise documentation block. More... | |
void | filter115 () |
Close documentation block. More... | |
void | filter178 () |
Strip the indenting from the documentation. More... | |
void | filter185 () |
Collect function parameters. More... | |
void | filter196 () |
Detect that the function returns something. More... | |
void | filter203 () |
Replace static regular expressions with strings. More... | |
void | filter219 () |
Assume the current line does not contain a comment. More... | |
void | filter226 () |
Make C comments out of awk comments. More... | |
void | filter241 () |
Replace $n with incol[n]. More... | |
void | filter254 () |
Append a semicolon. More... | |
Converts an awk script containing doxygen comments into something the C parser of doxygen can handle.
void filter14 | ( | ) |
Initialise globals.
BEGIN
void debug | ( | var | msg | ) |
Prints a debugging message on stderr.
The debugging message is only printed if DEBUG is set.
msg | The message to print |
void filter38 | ( | ) |
Fill the input buffer.
Buffering is used to inject code into previous output lines.
void initDoc | ( | ) |
Setup globals to assemble a new documentation block.
The following globals are reset:
var genFunction | ( | var | name | ) |
Generates a function signature.
name | The function name |
void filter84 | ( | ) |
Flush the remaining input buffer.
END
void filter94 | ( | ) |
Initialise file documentation.
!doc && /^#!/
void filter103 | ( | ) |
Initialise documentation block.
!doc && /^[ \t]*##/
void filter115 | ( | ) |
Close documentation block.
This closes a documentation block and generates a function signature for functions and filters.
doc && /^[ \t]*([^#]|$)/
void filter178 | ( | ) |
Strip the indenting from the documentation.
This benefits verbatim and code formatting.
doc && /^[ \t]*#/
void filter185 | ( | ) |
Collect function parameters.
doc && buf[line] ~ /[\\@]param(\[(in|out|in,out)\])?[ \t]/
void filter196 | ( | ) |
Detect that the function returns something.
doc && buf[line] ~ /[\\@](return|retval)/
void filter203 | ( | ) |
Replace static regular expressions with strings.
!doc && buf[line] ~ /^(("(\\.|[^"])*")?[^"\/])*\/(\\.|[^\/])+\//
void filter219 | ( | ) |
Assume the current line does not contain a comment.
void filter226 | ( | ) |
Make C comments out of awk comments.
!doc && buf[line] ~ /^(("(\\.|[^"])*")?[^"#])*#/
void filter241 | ( | ) |
Replace $n with incol[n].
!doc && buf[line] ~ /^(("(\\.|[^"])*")?[^"$])*\$[0-9]+/
void filter254 | ( | ) |
Append a semicolon.
!doc && !comment && buf[line] ~ /[^