Scroll to navigation

GETARGINIT(3) Schily´s LIBRARY FUNCTIONS GETARGINIT(3)

NAME

getarginit() - initialize properties for getargs() type functions

SYNOPSIS

#include <schily/getargs.h>

int getarginit(propg, flags)



struct ga_props *props; /* control properties */

int flags; /* to control option parsing behavior */

DESCRIPTION

getarginit() initializes struct ga_props as needed by the functions getlargs(), getlallargs(), getlfiles(), getvargs(), getvallargs(), getvfiles().

The flags argument controls the behavior of the named functions. If the value is 0, the default behavior as documented in the man pages is used. The following flags are possible and may be combined:

Use the default behavior.
Options may not start with a ``+'' even if they are marked with a + in the format string.
Disallow ``='' between option name and value.
A dash is needed before an option that takes an argument. Options in the form name=value are not allowed.
The special argument ``--'' stops option parsing even when using getallargs(), getlallargs(), getvallargs().
In a string with combined single character options, the last option character may be an option that has an argument.
This macro enforces POSIX behavior and expands to GAF_NO_PLUS | GAF_NO_EQUAL | GAF_SINGLEARG. This value may not be combined with other flags.

RETURNS

0
No error occurred.
-1
The version of the library was too old for the calling program.

SEE ALSO

getlargs(3), getlallargs(3), getlfiles(3), getvargs(3), getvallargs(3), getvfiles(3).

BUGS

None currently known.

Mail bugs and suggestions to schilytools@mlists.in-berlin.de or open a ticket at https://codeberg.org/schilytools/schilytools/issues.

The mailing list archive may be found at:

https://mlists.in-berlin.de/mailman/listinfo/schilytools-mlists.in-berlin.de.

AUTHOR

Joerg Schilling and the schilytools project authors.

2022/09/09 Joerg Schilling