summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org>2016-10-24 09:04:09 +0300
committerSergey Poznyakoff <gray@gnu.org>2016-10-24 09:04:09 +0300
commit4872fc4fb478af6c718fad0a43004fdbebc53fc0 (patch)
tree5aed01f8e95a0ae49efb2d598972415fd7b23e54 /include
parentcd577bf9f6ce6fa3402b34f322516e49a9e72d00 (diff)
downloadmailutils-4872fc4fb478af6c718fad0a43004fdbebc53fc0.tar.gz
mailutils-4872fc4fb478af6c718fad0a43004fdbebc53fc0.tar.bz2
Improve program usage output.
* include/mailutils/opt.h (MU_PARSEOPT_SPECIAL_ARGS): New flag. (mu_parseopt)<po_special_args>: New field. * libmailutils/opt/help.c (option_summary) (print_program_usage): Print po_special_args, if defined. * libmailutils/opt/opt.c (parseopt_init): Initialize po_special_args unless MU_PARSEOPT_SPECIAL_ARGS is set. MH: Advertise [+FOLDER] special argument if the -folder option is declared. * mh/mh_getopt.c (folder_option): Bugfix: -folder takes argument. (mh_getopt): Set po_special_args if the -folder option is declared. * mh/inc.c: Fix arg_doc. * mh/mhpath.c: Likewise. * mh/repl.c: Likewise. * mh/rmf.c: Likewise. * mh/rmm.c: Likewise. * mh/scan.c: Likewise. * mh/show.c: Likewise.
Diffstat (limited to 'include')
-rw-r--r--include/mailutils/opt.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/mailutils/opt.h b/include/mailutils/opt.h
index 6a7f2dc0b..268956d56 100644
--- a/include/mailutils/opt.h
+++ b/include/mailutils/opt.h
@@ -109,6 +109,8 @@ struct mu_option_cache
#define MU_PARSEOPT_SINGLE_DASH 0x02000000
/* Negation prefix is set */
#define MU_PARSEOPT_NEGATION 0x04000000
+/* po_special_args is set */
+#define MU_PARSEOPT_SPECIAL_ARGS 0x08000000
/* Reuse mu_parseopt struct initialized previously */
#define MU_PARSEOPT_REUSE 0x80000000
@@ -131,8 +133,9 @@ struct mu_parseopt
/* Informational: */
char const *po_prog_name;
- char const *po_prog_doc;
+ char const *po_prog_doc;
char const **po_prog_args;
+ char const *po_special_args; /* Special option-like arguments */
char const *po_bug_address;
char const *po_package_name;
char const *po_package_url;

Return to:

Send suggestions and report system problems to the System administrator.