From 3730bae9fe289aee86ce0ba57fdfd43857fcedc0 Mon Sep 17 00:00:00 2001 From: markus schnalke Date: Thu, 27 Nov 2014 18:30:31 +0100 Subject: [PATCH] mhparam: Added more items for direct query and -debug listing. Most new values are not included in the -all listing because they are not part of the profile or context but are mainly internal configuration values. The -debug listing has now section headings (pipe through `grep -v ^#' to remove them). The motivation for this change was querying the default inbox name. If `Inbox' wasn't set in the profile, `mhparam inbox' had failed. Now it prints `+inbox' (if the defaultfolder has not been changed on your installation). --- uip/mhparam.c | 86 +++++++++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 72 insertions(+), 14 deletions(-) diff --git a/uip/mhparam.c b/uip/mhparam.c index 4e1fc21..d29f73a 100644 --- a/uip/mhparam.c +++ b/uip/mhparam.c @@ -32,24 +32,83 @@ struct proc { char **p_field; }; +char *empty = ""; + +/* +** This list should contain all values of h/mh.h and config/config.c +** TODO: Add the constants Nbby, MAXARGS, NUMATTRS, NAMESZ +*/ static struct proc procs [] = { - { "attachment-header", &attach_hdr }, - { "sign-header", &sign_hdr }, - { "enc-header", &enc_hdr }, - { "context", &context }, - { "mh-sequences", &mh_seq }, + { "#--Version--", &empty }, + { "version", &version_num }, + { "version-str", &version_str }, + + { "#--Path-and-File-Names--", &empty }, + { "mypath", &mypath }, + { "mmhdir", &mmhdir }, + { "mmhpath", &mmhpath }, + { "profile", &profile }, + { "defpath", &defpath }, + { "context", &context }, + { "ctxpath", &ctxpath }, + { "mhetcdir", &mhetcdir }, + { "mailspool", &mailspool }, + { "mailstore", &mailstore }, + { "mh-sequences", &mh_seq }, + + { "#--Default-Programs--", &empty }, { "editor", &defaulteditor }, - { "foldprot", &foldprot }, - { "listproc", &listproc }, - { "mimetypequeryproc", &mimetypequeryproc }, - { "msgprot", &msgprot }, { "pager", &defaultpager }, { "sendmail", &sendmail }, - { "version", &version_num }, + { "listproc", &listproc }, { "whatnowproc", &whatnowproc }, - { "etcdir", &mhetcdir }, - { "draft-folder", &draftfolder }, - { "trash-folder", &trashfolder }, + { "mimetypequeryproc", &mimetypequeryproc }, + + { "#--Mail-Folder-Names--", &empty }, + { "inbox", &defaultfolder }, + { "draftfolder", &draftfolder }, + { "trashfolder", &trashfolder }, + + { "#--Profile-and-Context-Component-Names--", &empty }, + { "curfolder-component", &curfolder }, + { "inbox-component", &inbox }, + { "mimetypequery-component", &mimetypequery }, + { "nmhstorage-component", &nmhstorage }, + { "nsequence-component", &nsequence }, + { "psequence-component", &psequence }, + { "usequence-component", &usequence }, + + { "#--Mmh-specific-Mail-Header-Names--", &empty }, + { "attachment-header", &attach_hdr }, + { "enc-header", &enc_hdr }, + { "sign-header", &sign_hdr }, + + { "#--File-Permissions--", &empty }, + { "foldprot", &foldprot }, + { "msgprot", &msgprot }, + + { "#--Template-File-Names--", &empty }, + { "components", &components }, + { "digestcomps", &digestcomps }, + { "distcomps", &distcomps }, + { "forwcomps", &forwcomps }, + { "rcvdistcomps", &rcvdistcomps }, + { "replcomps", &replcomps }, + { "replgroupcomps", &replgroupcomps }, + { "mhlformat", &mhlformat }, + { "mhlreply", &mhlreply }, + + { "#--Default-Sequence-Names--", &empty }, + { "seq-all", &seq_all }, + { "seq-beyond", &seq_beyond }, + { "seq-cur", &seq_cur }, + { "seq-first", &seq_first }, + { "seq-last", &seq_last }, + { "seq-next", &seq_next }, + { "seq-prev", &seq_prev }, + { "seq-unseen", &seq_unseen }, + { "seq-neg", &seq_neg }, + { NULL, NULL }, }; @@ -71,7 +130,6 @@ main(int argc, char **argv) invo_name = mhbasename(argv[0]); - /* read user profile/context */ context_read(); arguments = getarguments(invo_name, argc, argv, 1); -- 1.7.10.4