This tool is as simple as it can be, but is very powerful.
Start your program with the lines:
and the script will know that the header file is named xxx.h
After this any line between
and a line
will be copied into the header file almost verbatim. The copying process chops off all
like C++ comments.
Function prototypes should be started with a line containing:
(All capital letters and no space.) Following this the prototype of the function is going to be copied into the header file until a line containing the two characters
is found. This closes the prototype and is converted to ); to be correct.
The header file is enclosed automatically
#define __XXX_H__ 1
not to be included twice.
The code can be downloaded here as Perl and also here as ScriptBasic code.