1GENGETOPT(1)                     User Commands                    GENGETOPT(1)
2
3
4

NAME

6       gengetopt - manual page for gengetopt 2.22.3
7

SYNOPSIS

9       gengetopt [OPTIONS]...
10

DESCRIPTION

12       GNU gengetopt 2.22.3
13
14       This  program  generates a C function that uses getopt_long function to
15       parse the command line options, validate them and fill a struct.
16
17       -h, --help
18              Print help and exit
19
20       --detailed-help
21              Print help, including all details and hidden options, and exit
22
23       -V, --version
24              Print version and exit
25
26       Main options:
27
28       -i, --input=filename
29              input file (default std input)
30
31       -f, --func-name=name
32              name of generated function (default=`cmdline_parser')
33
34       -a, --arg-struct-name=name
35              name   of   generated   args   info   struct    (default=`genge‐
36              topt_args_info')
37
38       -F, --file-name=name
39              name of generated file  (default=`cmdline')
40
41       --output-dir=path
42              output directory
43
44              if  this option is not specified, the files are generated in the
45              current directory.
46
47       --header-output-dir=path
48              header output directory
49
50       --src-output-dir=path
51              source output directory
52
53       -c, --c-extension=ext
54              extension of c file  (default=`c')
55
56       -H, --header-extension=ext
57              extension of header file  (default=`h')
58
59       -l, --long-help
60              long usage line in help
61
62              The usage line will print all the options, e.g.,
63
64              sample1 -iINT|--int-opt=INT [-h|--help]
65
66       --default-optional
67              by default, an option is considered optional  if  not  specified
68              otherwise
69
70       -u, --unamed-opts[=STRING]
71              accept    options    without    names    (e.g.,    file   names)
72              (default=`FILES')
73
74       The parser generated is thought to be used to parse  the  command  line
75       arguments.   However,  you  can also generate parsers for configuration
76       files, or strings that contain the arguments to  parse,  by  using  the
77       following two options.
78
79       -C, --conf-parser
80              generate a config file parser
81
82       -S, --string-parser
83              generate a string parser (the string contains the command line)
84
85       Additional options:
86
87       -G, --include-getopt
88              adds the code for getopt_long in the generated C file
89
90       -n, --no-handle-help
91              do not handle --help|-h automatically
92
93              If  --no-handle-help  is  specified,  the  command  line  option
94              --help|-h will not be handled automatically, so  the  programmer
95              will  be able to print some other information; then the function
96              for printing the standard help output can be used; this function
97              is called <parser-name>_print_help.
98
99              Notice  that, although the programmer can handle --help|-h manu‐
100              ally, the parser will return  after  finding  such  option:  the
101              other  command  line  options, if any, will be ignored.  In case
102              you want to have full  control  on  --help|-h,  you  should  use
103              --ho-help.
104
105       --no-help
106              do not add --help|-h automatically
107
108              With  this  option  you  can  disable  the automatic addition of
109              options --help|-h.  The programmer will then be able to add this
110              option  in  the input file and handle it as he sees fit.  Notice
111              that  --no-help  will  also  disable   the   automatic   options
112              --detailed-help and --full-help.
113
114              The  programmer  can still define options with short character h
115              as he wants, but he cannot define options help, unless he speci‐
116              fies --no-help (otherwise an error will be printed).
117
118       -N, --no-handle-version
119              do not handle --version|-V automatically
120
121       --no-version
122              do not add --version|-V automatically
123
124              See  above  the  details  about  --no-handle-help and --no-help,
125              respectively.
126
127       -e, --no-handle-error
128              do not exit on errors
129
130              With this option, if the generated parser  encounters  an  error
131              (e.g.,  an  unknown  option)  it  does not make the main program
132              exit; instead, the parser function returns a value different  0,
133              and the main program can print a help message.
134
135       --show-required[=STRING]
136              in  the output of help will specify which options are mandatory,
137              by using the optional passed string  (default=`(mandatory)')
138
139       -g, --gen-version
140              put gengetopt version in the generated file (default=on)
141
142       --set-package=STRING
143              set the package name (override package defined in the .ggo file)
144
145       --set-version=STRING
146              set the version number (override version  defined  in  the  .ggo
147              file)
148
149       --show-help
150              show the output of --help instead of generating code
151
152       --show-full-help
153              show  the output of --full-help (i.e., including hidden options)
154              instead of generating code
155
156       --show-detailed-help
157              show the output of --detailed-help (i.e., including details  and
158              hidden options) instead of generating code
159
160       --show-version
161              show the output of --version instead of generating code
162
163       Please refer to the info manual for further explanations.
164
165       Maintained by Lorenzo Bettini <http://www.lorenzobettini.it>
166

REPORTING BUGS

168       Report bugs to <bug-gengetopt at gnu.org>
169
171       Copyright  ©  1999-2009   Free  Software  Foundation Inc.  This program
172       comes with ABSOLUTELY NO WARRANTY; for  details  please  see  the  file
173       'COPYING' supplied with the source code.
174       This  is  free  software,  and you are welcome to redistribute it under
175       certain conditions; again, see 'COPYING' for details.  This program  is
176       released under the GNU General Public License.
177

SEE ALSO

179       The full documentation for gengetopt is maintained as a Texinfo manual.
180       If the info and gengetopt programs are properly installed at your site,
181       the command
182
183              info gengetopt
184
185       should give you access to the complete manual.
186
187
188
189gengetopt 2.22.3                September 2009                    GENGETOPT(1)
Impressum