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

7.5.6 Option Argument Specification

Command line options come in three flavors: options that do not take arguments, those that do and those that may. Without an "arg-type" attribute, AutoOpts will not process an argument to an option. If "arg-type" is specified and "arg-optional" is also specified, then the next command line token will be taken to be an argument, unless it looks like the name of another option.

If the argument type is specified to be anything other than "str[ing]", then AutoOpts will specify a callback procedure to handle the argument. Some of these procedures will be created and inserted into the generated ‘.c’ file, and others are already built into the ‘libopts’ library. Therefore, if you write your own callback procedure (see section Option Argument Handling), then you must either not specify an "arg-type" attribute, or else specify it to be of type "str[ing]". Your callback function will be able to place its own restrictions on what that string may contain or represent.

Option argument handling attributes depend upon the value set for the arg-type attribute. It specifies the type of argument the option will take. If not present, the option cannot take an argument. If present, it must be an entry in the following table. The first three letters is sufficient.


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

This document was generated by Bruce Korb on August 21, 2015 using texi2html 1.82.