singe/thirdparty/arg_parser
2023-10-23 19:38:18 -05:00
..
doc Major reorganization to start work on Singe 2.10. 2023-10-23 19:38:18 -05:00
testsuite Major reorganization to start work on Singe 2.10. 2023-10-23 19:38:18 -05:00
arg_parser.cc Major reorganization to start work on Singe 2.10. 2023-10-23 19:38:18 -05:00
arg_parser.h Major reorganization to start work on Singe 2.10. 2023-10-23 19:38:18 -05:00
AUTHORS Major reorganization to start work on Singe 2.10. 2023-10-23 19:38:18 -05:00
carg_parser.c Major reorganization to start work on Singe 2.10. 2023-10-23 19:38:18 -05:00
carg_parser.h Major reorganization to start work on Singe 2.10. 2023-10-23 19:38:18 -05:00
ChangeLog Major reorganization to start work on Singe 2.10. 2023-10-23 19:38:18 -05:00
cmain.c Major reorganization to start work on Singe 2.10. 2023-10-23 19:38:18 -05:00
configure Major reorganization to start work on Singe 2.10. 2023-10-23 19:38:18 -05:00
COPYING Major reorganization to start work on Singe 2.10. 2023-10-23 19:38:18 -05:00
INSTALL Major reorganization to start work on Singe 2.10. 2023-10-23 19:38:18 -05:00
main.cc Major reorganization to start work on Singe 2.10. 2023-10-23 19:38:18 -05:00
Makefile.in Major reorganization to start work on Singe 2.10. 2023-10-23 19:38:18 -05:00
NEWS Major reorganization to start work on Singe 2.10. 2023-10-23 19:38:18 -05:00
README Major reorganization to start work on Singe 2.10. 2023-10-23 19:38:18 -05:00

Description

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 'arg_parser.h'
and 'arg_parser.cc' (or 'carg_parser.h' and 'carg_parser.c' for the
C version) in your source tree. See the file 'main.cc' ('cmain.c') for an
example of use.

Arg_parser was developed as the argument parser for GNU moe, because moe's
argument parsing is rather complex. Then I used it in my other projects,
including GNU ddrescue, GNU ed, lzip, GNU ocrad, tarlz, and zutils, with
excellent results.


Copyright (C) 2006-2022 Antonio Diaz Diaz.

This file is free documentation: you have unlimited permission to copy,
distribute, and modify it.

The file Makefile.in is a data file used by configure to produce the
Makefile. It has the same copyright owner and permissions that configure
itself.