text2usage - create a usage function from text documentation
text2usage [options] [input file]
By default text2usage creates a function with the name usage. This'll change that.
By default the usage routine will send the documentation to a pager. This turns that off (why?).
If present, generates a main() function so the mess can be compiled and you can see what the output will look like.
The prefix to be used when creating the output files. Required.
The suffix (period included) to be used when creating the output file containing the code. This defaults to .c.
Create a function callable from F77. This interfaces with the GNU autoconf F77 wrappers, and requires there be a config.h include file which defines the F77_FUNC macro.
The suffix (period included) to be used for the output file containing the header. This defaults to .h
What you see here.
Print the version and terminate.
text2usage takes an input text file and creates code which will spit it back out. The characters are turned into their ASCII integer representation to avoid funkiness with the compiler. The code will by default send the text to a pager (paying attention to the environtmental variable PAGER). The --nopage option changes this.
text2usage will read the text on its standard input stream by default if the filename is not given on the command line.
The code is written to ${pfx}${csfx}, the header file is written to ${pfx}{$hsfx}.
The routine will have the name usage; this may be changes with the --name option.
text2usage --pfx=snack docs.txt
produces the files snack.c and snack.h
text2usage --pfx=snack --csfx=.cc docs.txt
produces the files snack.cc and snack.h
This documents version 1.1.3 of text2usage.
This software is copyright the Smithsonian Astrophysical Observatory and is released under the GNU General Public License. You may find a copy at http://www.fsf.org/copyleft/gpl.html.
Diab Jerius (djerius@cfa.harvard.edu)