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

NAME

6       gengetopt - manual page for gengetopt 2.22.6
7

SYNOPSIS

9       gengetopt [OPTIONS]...
10

DESCRIPTION

12       GNU gengetopt 2.22.6
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       -G, --include-getopt
87              adds the code for getopt_long in the generated C file
88
89       -n, --no-handle-help
90              do not handle --help|-h automatically
91
92              If  --no-handle-help  is  specified,  the  command  line  option
93              --help|-h will not be handled automatically, so  the  programmer
94              will  be able to print some other information; then the function
95              for printing the standard help output can be used; this function
96              is called <parser-name>_print_help.
97
98              Notice  that, although the programmer can handle --help|-h manu‐
99              ally, the parser will return  after  finding  such  option:  the
100              other  command  line  options, if any, will be ignored.  In case
101              you want to have full  control  on  --help|-h,  you  should  use
102              --ho-help.
103
104       --no-help
105              do not add --help|-h automatically
106
107              With  this  option  you  can  disable  the automatic addition of
108              options --help|-h.  The programmer will then be able to add this
109              option  in  the input file and handle it as he sees fit.  Notice
110              that  --no-help  will  also  disable   the   automatic   options
111              --detailed-help and --full-help.
112
113              The  programmer  can still define options with short character h
114              as he wants, but he cannot define options help, unless he speci‐
115              fies --no-help (otherwise an error will be printed).
116
117       -N, --no-handle-version
118              do not handle --version|-V automatically
119
120       --no-version
121              do not add --version|-V automatically
122
123              See  above  the  details  about  --no-handle-help and --no-help,
124              respectively.
125
126       -e, --no-handle-error
127              do not exit on errors
128
129              With this option, if the generated parser  encounters  an  error
130              (e.g.,  an  unknown  option)  it  does not make the main program
131              exit; instead, the parser function returns a value different  0,
132              and the main program can print a help message.
133
134       --show-required[=STRING]
135              in  the output of help will specify which options are mandatory,
136              by using the optional passed string  (default=`(mandatory)')
137
138       --strict-hidden
139              completely hide hidden options
140
141       -g, --gen-version
142              put gengetopt version in the generated file (default=on)
143
144       --set-package=STRING
145              set the package name (override package defined in the .ggo file)
146
147       --set-version=STRING
148              set the version number (override version  defined  in  the  .ggo
149              file)
150
151       --show-help
152              show the output of --help instead of generating code
153
154       --show-full-help
155              show  the output of --full-help (i.e., including hidden options)
156              instead of generating code
157
158       --show-detailed-help
159              show the output of --detailed-help (i.e., including details  and
160              hidden options) instead of generating code
161
162       --show-version
163              show the output of --version instead of generating code
164
165       Please refer to the info manual for further explanations.
166
167       Maintained by Lorenzo Bettini <http://www.lorenzobettini.it>
168
170       Copyright  ©  1999-2011   Free  Software  Foundation Inc.  This program
171       comes with ABSOLUTELY NO WARRANTY; for  details  please  see  the  file
172       'COPYING' supplied with the source code.
173       This  is  free  software,  and you are welcome to redistribute it under
174       certain conditions; again, see 'COPYING' for details.  This program  is
175       released under the GNU General Public License.
176

SEE ALSO

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