diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2016-10-21 17:48:26 +0300 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2016-10-21 17:57:59 +0300 |
commit | f434857b8318b05b7036025605ab18cdf3e7c238 (patch) | |
tree | 28223e6cc500a5f82f561ce0677d30a266ad8f8d /include/mailutils | |
parent | 53eb68133eeede20c49445cd4ff58ad6e4becc07 (diff) | |
download | mailutils-f434857b8318b05b7036025605ab18cdf3e7c238.tar.gz mailutils-f434857b8318b05b7036025605ab18cdf3e7c238.tar.bz2 |
Begin rewriting MH to get rid of argp stuff.
MH utilities will use only single-dash long options.
* include/mailutils/opt.h (mu_option) <opt_default>: New member.
* libmailutils/opt/opt.c (find_long_option): Improve detection
of ambiguous options.
(mu_option_set_value): Use default value (opt_default), if
supplied.
* mh/mh_argp.c: Delete.
* mh/Makefile.am (libmh_a_SOURCES): Remove mh_argp.c
* mh/mh_getopt.c: Rewrite from scratch using mailutils/opt
* mh/mh_getopt.h: Likewise.
* mh/mh.h: Add missing includes
(mh_read_formfile, mh_alias_read): Change signatures.
* mh/mh_alias.l (mh_alias_read): Name is const
* mh/mh_init.c (mh_read_formfile): Name is const.
* mh/ali.c: Convert to mh_getopt.
* mh/anno.c: Likewise.
* mh/burst.c: Likewise.
* mh/comp.c: Likewise.
* mh/fmtcheck.c: Likewise.
* mh/folder.c: Likewise.
* mh/forw.c: Likewise.
* mh/inc.c: Likewise.
* mh/install-mh.c: Likewise.
* mh/mark.c: Likewise.
* mh/mhl.c: Likewise.
* mh/scan.c: Likewise.
* mh/tests/burst.at: Don't use double-dash options
* mh/tests/folder.at: Likewise.
Diffstat (limited to 'include/mailutils')
-rw-r--r-- | include/mailutils/opt.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/mailutils/opt.h b/include/mailutils/opt.h index 972e3efb0..efecd8fe7 100644 --- a/include/mailutils/opt.h +++ b/include/mailutils/opt.h @@ -47,6 +47,7 @@ struct mu_option void *opt_ptr; /* Data pointer */ void (*opt_set) (struct mu_parseopt *, struct mu_option *, char const *); /* Function to set the option */ + char const *opt_default;/* Default value */ }; #define MU_OPTION_GROUP(text) { NULL, 0, NULL, 0, text } |