Next: , Up: Using getopt(3C)   [Contents][Index]


7.15.1 getopt feature limitations

This list of limitations is relative to the full list of AutoOpts supported features, See AutoOpts Features.

  1. You cannot automatically take advantage of environment variable options or automated parsing of configuration files (rc or ini files). Consequently, the resulting code does not support --load-opts or --save-opts options automatically.
  2. You cannot use set membership, enumerated, range checked or stacked argument type options. In fact, you cannot use anything that depends upon the libopts library. You are constrained to options that take string arguments, though you may handle the option argument with a callback procedure.
  3. Special disablement and/or enablement prefixes are not recognized.
  4. Option coordination with external libraries will not work.
  5. Every option must be settable because the emitted code depends upon the SET_OPT_XXX macros having been defined. Specify this as a global (program) attribute.
  6. You must specify a main procedure attribute (see Generating main procedures). The getopt.tpl template depends upon being able to compile the traditional .c file into a program and get it to emit the usage text.
  7. For the same reason, the traditional option parsing table code must be emitted before the getopt.tpl template gets expanded.
  8. The usage text is, therefore, statically defined.