aboutsummaryrefslogtreecommitdiffstats
path: root/src/init.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2024-02-06 13:53:59 +0000
committerWerner Koch <[email protected]>2024-02-06 13:53:59 +0000
commitb113114c7498fc6c48065a8c4816c610c6f08198 (patch)
tree1970a988d092ca7dd82f7386125c393f15305862 /src/init.c
parentgpgrt-config: Avoid warning about literals for curly braces. (diff)
downloadlibgpg-error-b113114c7498fc6c48065a8c4816c610c6f08198.tar.gz
libgpg-error-b113114c7498fc6c48065a8c4816c610c6f08198.zip
argparser: Implement a command mode.
* src/gpg-error.h.in (ARGPARSE_FLAG_COMMAND): New. * src/argparse.c (struct _gpgrt_argparse_internal_s): Add flags explicit_cmd_mode, cmd_mode, and command_seen. (initialize): Init them. Mark default commands as commands. (handle_meta_command): New. (handle_metacmd): Add "command-mode" and "-command-mode". (find_long_option): Add arg only_commands. (arg_parse): Factor some code out to ... (handle_special_commands): new. (arg_parse): Implement the command-mode. * tests/t-argparse.c (main): Add some testing code. -- GnuPG-bug-id: 6978
Diffstat (limited to 'src/init.c')
0 files changed, 0 insertions, 0 deletions