|
gwenhywfar 5.10.1
|
#include "args_p.h"#include "gui_l.h"#include <gwenhywfar/misc.h>#include <gwenhywfar/debug.h>#include <gwenhywfar/text.h>#include <string.h>
Go to the source code of this file.
Macros | |
| #define | DISABLE_DEBUGLOG |
Functions | |
| int | GWEN_Args__AppendTXT (GWEN_BUFFER *ubuf, const char *s, unsigned int ins) |
| int | GWEN_Args_Check (int argc, char **argv, int startAt, uint32_t mode, const GWEN_ARGS *args, GWEN_DB_NODE *db) |
| int | GWEN_Args_ShortUsage (GWEN_UNUSED const GWEN_ARGS *args, GWEN_UNUSED GWEN_BUFFER *ubuf, GWEN_UNUSED GWEN_ARGS_OUTTYPE ot) |
| int | GWEN_Args_Usage (const GWEN_ARGS *args, GWEN_BUFFER *ubuf, GWEN_ARGS_OUTTYPE ot) |
| int | GWEN_Args_UsageHTML (GWEN_UNUSED const GWEN_ARGS *args, GWEN_UNUSED GWEN_BUFFER *ubuf) |
| int | GWEN_Args_UsageTXT (const GWEN_ARGS *args, GWEN_BUFFER *ubuf) |
| #define DISABLE_DEBUGLOG |
Definition at line 40 of file src/base/args.c.
| int GWEN_Args__AppendTXT | ( | GWEN_BUFFER * | ubuf, |
| const char * | s, | ||
| unsigned int | ins | ||
| ) |
Definition at line 346 of file src/base/args.c.
References GWEN_Buffer_AppendByte().
Referenced by GWEN_Args_UsageTXT().


| int GWEN_Args_Check | ( | int | argc, |
| char ** | argv, | ||
| int | startAt, | ||
| uint32_t | mode, | ||
| const GWEN_ARGS * | args, | ||
| GWEN_DB_NODE * | db | ||
| ) |
This function parses the given argument list. Known options are stored within the given DB under their respective name. Free parameters (which are arguments without leading "-"'s) are stored in the variable "params" of the given db.
Definition at line 45 of file src/base/args.c.
References DBG_DEBUG, DBG_ERROR, DBG_INFO, GWEN_ARGS::flags, GWEN_ARGS_FLAGS_HAS_ARGUMENT, GWEN_ARGS_FLAGS_HELP, GWEN_ARGS_FLAGS_LAST, GWEN_ARGS_MODE_ALLOW_FREEPARAM, GWEN_ARGS_MODE_STOP_AT_FREEPARAM, GWEN_ARGS_RESULT_ERROR, GWEN_ARGS_RESULT_HELP, GWEN_ArgsType_Char, GWEN_ArgsType_Int, GWEN_Buffer_free(), GWEN_Buffer_GetStart(), GWEN_Buffer_new(), GWEN_Buffer_Reset(), GWEN_DB_FLAGS_DEFAULT, GWEN_DB_FLAGS_OVERWRITE_VARS, GWEN_DB_GetIntValue(), GWEN_DB_Group_free(), GWEN_DB_Group_new(), GWEN_DB_SetCharValue(), GWEN_DB_SetIntValue(), GWEN_Gui_ReadString(), GWEN_LOGDOMAIN, GWEN_ARGS::longOption, GWEN_ARGS::maxNum, GWEN_ARGS::minNum, GWEN_ARGS::name, GWEN_ARGS::shortOption, and GWEN_ARGS::type.
Referenced by _readCommandLine(), activateKey(), add2Archive(), changePin(), checkArchive(), checkTree(), createArchive(), createToken(), cryptWithNew(), extractArchive(), genKey(), hashTree(), listArchive(), main(), mkArchiveKey(), releaseFillIn(), setKey(), setSignSeq(), showKey(), showPasswords(), showUser(), signArchive(), signWithNew(), updateToken(), and verifyArchive().


| int GWEN_Args_ShortUsage | ( | GWEN_UNUSED const GWEN_ARGS * | args, |
| GWEN_UNUSED GWEN_BUFFER * | ubuf, | ||
| GWEN_UNUSED GWEN_ARGS_OUTTYPE | ot | ||
| ) |
Definition at line 463 of file src/base/args.c.
| int GWEN_Args_Usage | ( | const GWEN_ARGS * | args, |
| GWEN_BUFFER * | ubuf, | ||
| GWEN_ARGS_OUTTYPE | ot | ||
| ) |
Print a "usage" message into the given GWEN_BUFFER ubuf. The message lists all available options. The GWEN_ARGS_OUTTYPE argument is supposed to offer either text or html as output format, but currently only text is implemented.
Definition at line 441 of file src/base/args.c.
References DBG_ERROR, GWEN_Args_UsageHTML(), GWEN_Args_UsageTXT(), GWEN_ArgsOutType_Html, GWEN_ArgsOutType_Txt, and GWEN_LOGDOMAIN.
Referenced by _readCommandLine(), activateKey(), add2Archive(), changePin(), checkArchive(), checkTree(), createArchive(), createToken(), cryptWithNew(), extractArchive(), genKey(), hashTree(), listArchive(), main(), mkArchiveKey(), releaseFillIn(), setKey(), setSignSeq(), showKey(), showPasswords(), showUser(), signArchive(), signWithNew(), updateToken(), and verifyArchive().


| int GWEN_Args_UsageHTML | ( | GWEN_UNUSED const GWEN_ARGS * | args, |
| GWEN_UNUSED GWEN_BUFFER * | ubuf | ||
| ) |
Definition at line 433 of file src/base/args.c.
Referenced by GWEN_Args_Usage().

| int GWEN_Args_UsageTXT | ( | const GWEN_ARGS * | args, |
| GWEN_BUFFER * | ubuf | ||
| ) |
Definition at line 369 of file src/base/args.c.
References DBG_ERROR, GWEN_ARGS::flags, GWEN_Args__AppendTXT(), GWEN_ARGS_FLAGS_HAS_ARGUMENT, GWEN_ARGS_FLAGS_LAST, GWEN_Buffer_AppendString(), GWEN_LOGDOMAIN, GWEN_ARGS::longDescription, GWEN_ARGS::longOption, GWEN_ARGS::minNum, GWEN_ARGS::name, GWEN_ARGS::shortDescription, and GWEN_ARGS::shortOption.
Referenced by GWEN_Args_Usage().

