AutoGen - The Automated Program Generator: 7.6.25 USAGE( exit-code ) - Usage invocation macro

[ < ] | [ > ] |  | [ << ] | [ Up ] | [ >> ] |  |  |  |  | [Top] | [Contents] | [Index] | [ ? ]

### 7.6.25 USAGE( exit-code ) - Usage invocation macro

This macro invokes the procedure registered to display the usage text. Normally, this will be `optionUsage` from the AutoOpts library, but you may select another procedure by specifying `usage = "proc_name"` program attribute. This procedure must take two arguments first, a pointer to the option descriptor, and second the exit code. The macro supplies the option descriptor automatically. This routine is expected to call `exit(3)` with the provided exit code.

The `optionUsage` routine also behaves differently depending on the exit code.:

`EXIT_SUCCESS (the value zero)`

  It is assumed that full usage help has been requested. Consequently, more information is provided than when displaying usage and exiting with a non-zero exit code. Output will be sent to ‘`stdout`’ and the program will exit with a zero status code.

`EX_USAGE (64)`

  The abbreviated usage will be printed to ‘`stdout`’ and the program will exit with a zero status code. “EX_USAGE” may or may not be 64. If your system provides “/usr/include/sysexits.h” that has a different value, then that value will be used.

`any other value`

  The abbreviated usage will be printed to stderr and the program will exit with the provided status code.

[ < ] | [ > ] |  | [ << ] | [ Up ] | [ >> ] |  |  |  |  | [Top] | [Contents] | [Index] | [ ? ]

This document was generated by Bruce Korb on June 25, 2010 using texi2html 1.82.