Introduce new CLI/configuration code for mailutils applications.
The new API is to replace libmu_cfg and libmu_argp. A smooth transition is scheduled, during which the two APIs will coexist, * configure.ac: Build libmailutils/cli/Makefile * include/mailutils/cli.h: New file. * include/mailutils/Makefile.am: Add cli.h * libmailutils/cli/Makefile.am: New file. * libmailutils/cli/capa.c: New file. * libmailutils/cli/cli.c: New file. * libmailutils/cli/stdcapa.c: New file. * libmailutils/Makefile.am (SUBDIRS): Add cli. * include/mailutils/cfg.h (mu_cfg_parse_hints): New members: append_tree and data. (MU_PARSE_CONFIG_LINT): New flag. * include/mailutils/diag.h (mu_program_name) (mu_full_program_name): Remove const qualifier. * include/mailutils/locker.h (mu_locker_set_default_external_program): Argument is const. * libmailutils/base/locker.c: Likewise. * include/mailutils/opt.h (mu_progname, mu_absprogname): Replace with mu_program_name and mu_full_program_name. (mu_set_progname): Rename to mu_set_program_name. (mu_parseopt) <po_data>: Change type to void *. (po_help_hook, po_version_hook): Change signatures. (mu_parseopt_error): New function. * libmailutils/opt/progname.c (mu_progname, mu_absprogname): Replace with mu_program_name and mu_full_program_name. (mu_set_progname): Rename to mu_set_program_name. * libmailutils/opt/help.c: Minor changes * libmailutils/opt/opt.c (parse_error): Rename to mu_parse_error (extern). (next_opt): Fix permutations. * libmailutils/tests/parseopt.c: Reflect changes. * libmailutils/tests/parseopt17.at: Improve test case * libmailutils/tests/parseopt_help05.at: Reflect changes. * libmailutils/tests/parseopt_help07.at: Reflect changes. * include/mailutils/stdstream.h (mu_program_name): Remove qualifier. * libmailutils/cfg/driver.c (mu_cfg_tree_reduce): Remove useless condition * libmailutils/cfg/lexer.l (mu_cfg_parse_file): Additional info messages. * libmailutils/cfg/parser.y (mu_cfg_parse_config): Join in the append_tree. * libmailutils/diag/diag.c (mu_program_name, mu_full_program_name) (mu_set_program_name): Remove. Declared elsewhere. * libmu_sieve/conf.c: Add new configuration code. Mark old text for removal. * libmailutils/tests/tcli.c: New program. * libmailutils/tests/Makefile.am: Add tcli.c
Showing
29 changed files
with
1390 additions
and
80 deletions
include/mailutils/cli.h
0 → 100644
libmailutils/cli/Makefile.am
0 → 100644
libmailutils/cli/capa.c
0 → 100644
libmailutils/cli/cli.c
0 → 100644
libmailutils/cli/stdcapa.c
0 → 100644
libmailutils/tests/tcli.c
0 → 100644
-
Please register or sign in to post a comment