JWS C Library
C language utility library
Option_with_arg Struct Reference

Data structure for an option that takes an argument. More...

#include <option.h>

Collaboration diagram for Option_with_arg:

Data Fields

Option_string string
 Long name of the option.
Option_flag flag
 Character flag for the option.
Option_desc desc
 String containing a short description of the option.
Option_func_with_arg func
 Function for processing the option and its argument.

Detailed Description

Data structure for an option that takes an argument.

An option is specified on the command-line as follows

   --option-string=arg
   -O arg

where

   Option_with_arg::string = "option-string"
   Option_with_arg::flag = 'O'
   Option_arg = "arg"

Specifying an option in a file is similar, but only the string can be used, for instance

   option-string=arg

Definition at line 117 of file option.h.


Field Documentation

Long name of the option.

If not used, set to NULL.

Definition at line 124 of file option.h.

Character flag for the option.

If not used, set to 0 or '\0'.

Definition at line 131 of file option.h.

String containing a short description of the option.

If not used, set to NULL.

Definition at line 138 of file option.h.

Function for processing the option and its argument.

Definition at line 141 of file option.h.


The documentation for this struct was generated from the following file: