singe/thirdparty/arg_parser/doc/carg_parser.1

87 lines
2.6 KiB
Groff

.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.2.
.TH CARG_PARSER "1" "March 2026" "carg_parser 1.21" "User Commands"
.SH NAME
carg_parser \- test program for Arg_parser
.SH SYNOPSIS
.B carg_parser
[\fI\,options\/\fR]
.SH DESCRIPTION
Arg_parser \- POSIX/GNU command\-line argument parser. (C version)
.PP
Arg_parser is an argument parser that follows POSIX and GNU conventions for
command\-line arguments. There exist C++ and C versions of Arg_parser. The
C++ version is implemented as a C++ class, while the C version is
implemented as a single struct plus associated functions. Both are simpler,
easier to use, and safer than 'getopt_long'.
.PP
For maximum stability, Arg_parser is self\-contained. It extracts all the
information it needs from its arguments to avoid referring to them later.
This avoids index\-out\-of\-bounds errors and allows the parser object to be
passed as argument to other functions for further analysis.
.PP
Arg_parser does not modify its arguments (argc, argv), nor uses any global
variables.
.PP
The C++ version of Arg_parser can also parse options from configuration
files.
.PP
The C version of Arg_parser is provided in the files 'carg_parser.h' and
\&'carg_parser.c'. To learn how to use Arg_parser in your C programs, see the
C example in the manual and the example file 'cmain.c' in the source
tarball.
.SH OPTIONS
.TP
\fB\-h\fR, \fB\-\-help\fR
display this help and exit
.TP
\fB\-V\fR, \fB\-\-version\fR
output version information and exit
.TP
\fB\-a\fR, \fB\-\-append\fR
example of option with no argument
.TP
\fB\-b\fR, \fB\-\-block=\fR<arg>
example of option with required argument
.TP
\fB\-c\fR, \fB\-\-casual[=\fR<arg>]
example of option with optional argument
.TP
\fB\-e\fR, \fB\-\-empty=\fR<arg>
example of option with maybe empty argument
.TP
\fB\-o\fR <arg>
example of short only option
.TP
\fB\-\-long\-only\fR
example of long only option
.TP
\fB\-q\fR, \fB\-\-quiet\fR
quiet operation
.TP
\fB\-u\fR, \fB\-\-uncaught\fR
example of intentional bug
.TP
\fB\-v\fR, \fB\-\-verbose\fR
verbose operation
.SH "REPORTING BUGS"
Report bugs to arg\-parser\-bug@nongnu.org
.br
Arg_parser home page: http://www.nongnu.org/arg\-parser/arg_parser.html
.SH COPYRIGHT
Copyright \(co 2026 Antonio Diaz Diaz.
License 2\-clause BSD.
.br
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
.SH "SEE ALSO"
The full documentation for
.B carg_parser
is maintained as a Texinfo manual. If the
.B info
and
.B carg_parser
programs are properly installed at your site, the command
.IP
.B info arg_parser
.PP
should give you access to the complete manual.