AutoGen   Version 5.18.1
AutoOpts   Version 40.1


XML Defs


Man example
local use
using getopt






Project GNU
Home Page


xdr project


Announcement for September, 2013


Coverity believes you should fstat(3) a file after open(2)-ing it, if you are going to do both.

mishandled installation of str2init.tlib
Several template files must have variances between the test version in the source tree and the installed version.

fixed char casting issue
It gets triggered when a config file contains UTF-8 extended characters in config files.

flag values for auto-supported options
like --help and --version etc. may be suppressed. However, if your program has more than 28 options or so, the "value" assigned to the option winds up a valid character and is accepted as an option flag. Fixed.

no-return functions
Specifying usage-message and/or die-code will produce several convenience functions that do not return. If you wish to have them marked as _Noreturn, (or some alternate string), specify the attribute no-return.

Announcement for July, 2013


This is a new inlined function that gets emitted when die-code is specified and there is an exit-name specified with the name no-mem or nomem.

Solaris has old, waaay out-of-date utilities (like "echo" and "tr"). several accommodations were made. Also, since its regex library doesn't pass muster and since regex is not crucial to the functioning of autogen, an inadequate library will now merely disable that functionality instead of aborting the build.

exit commands to shell output
Actually, any time the libopts library decides that the program should exit (with either usage text, version text or some error), the shell reading commands from the output of the generated program should be told to exit and all other output should go to stderr.

Documentation tweak
Options may be grouped under a "documentation" option. This grouping is visible in all forms: usage text, man pages and texi documentation. However, because the various automatically supported options get handled differently in texi docs versus man page and usage text, a final documentation option following all other program options works great for man pages and usage text, but it did not work so well for texi documents. Therefore, the texi documentation template now drops the last program option if it is marked as a documentation option.

  • ambiguous option usage on programs with doc options seg faulted
  • "flag" option notation did not work when options and operands are intermixed in standard input argument processing
  • when processing option text from user supplied text, libopts should not fail-exit if the text contains an unknown option.
  • on platforms where autogen cannot determine the full path of its executable, some of the templates failed due to presuming that the effort was always successful. (This is Windows, FYI.)

Announcement for May, 2013


set membership options
A new function will allocate a string and insert the names of the bits set in the option (see optionMemberList(3-libopts)).

The syntax of the bit specifications is also now more forgiving.

here strings
A leading-tab-stripped "here string" will also strip a leading backslash, if it precedes a space or tab character. Thus, here strings may include lines that start with white space and their content will be clear to the reader of the source code.

The "ChangeLog" file in the distribution is now derived from GIT.

Announcement for February, 2013


for-each main procedure
These procedures may now be specified as processing standard input as a data file instead of being replacement operands. Users can always have "stdin" treated as data by using a single hyphen on the command line.

doxygen support
The option, enumeration and bitmap templates have support for adding definitions to Doxygen documentation groups. Setting the attribute addtogroup to mygroup will surround the generated code with:
/** @addtogroup mygroup
 * @{
[...surrounded code...]
/** @} */

Announcement for December, 2012


autogen for loop
It turns out to be difficult to detect gaps in a sparse array of string values. To support detecting them, a new scheme function has been created: (found-for?)

Bit fiddling templates
Enumerations and bit masks have been integrated.

str2enum will manage enumerations and converting these values backand forth between string and binary representations.

str2mask will layer bit mask management on top of that. You will be able to get the string version of a collection of bits so a human eyeball can decipher it, and you will be able to convert such a string into the binary mask.

top  Viewable With Any Browser  Valid XHTML 1.0!

AutoGen, AutoOpts, columns, getdefs, AutoFSM, AutoXDR and these web pages copyright (c) 1999-2012 Bruce Korb, all rights reserved.

Return to GNU's home page.

Please send FSF & GNU inquiries & questions to There are also other ways to contact the FSF.

Please send comments on these web pages to, send other questions to

This article, Copyright © 2000-2002 by Bruce Korb

Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved. Last modified: Sun Sep 8 12:45:31 PDT 2013