ARG_PARSER(1)

NAME
arg_parser - test program for the Arg_parser argument parser

SYNOPSIS
carg_parser [options]

DESCRIPTION
Arg_parser - POSIX/GNU command line argument parser. (C version)

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'.

For maximum stability, Arg_parser is self-contained. It extracts all the information it needs from its arguments to avoid refering to them later. This avoids index-out-of-bounds errors.

Arg_parser does not modify its arguments, nor uses any global variables. So you may create more than one parser in your program if you need or want to.

The C++ version of Arg_parser can also parse options from configuration files.

To use Arg_parser in your own programs simply copy the files 'carg_parser.h' and 'carg_parser.c' in your source tree. See also the file 'cmain.c' for an example of use.

OPTIONS

-h, --help
    display this help and exit

-V, --version
    output version information and exit

-a, --append
    example of option with no argument

-b, --block=<arg>
    example of option with required argument

-c, --casual[=<arg>]
    example of option with optional argument

-o <arg>
    example of short only option

--orphan
    example of long only option

-q, --quiet
    quiet operation

-u, --uncaught
    example of intentional bug

-v, --verbose
    verbose operation

REPORTING BUGS
Report bugs to arg-parser-bug@nongnu.org
Arg_parser home page: http://www.nongnu.org/arg-parser/arg_parser.html

COPYRIGHT
Copyright © 2019 Antonio Diaz Diaz. License 2-clause BSD.
This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.

SEE ALSO
The full documentation for arg_parser is maintained as a Texinfo manual. If the info and arg_parser programs are properly installed at your site, the command

    info arg_parser

should give you access to the complete manual.