X-Git-Url: http://git.marmaro.de/?p=mmh;a=blobdiff_plain;f=uip%2Fmhparam.c;h=e02bf495169760cdfea94651b1ff9d5658afb101;hp=dce2d753f3d666823ff574808ce749b6e2ecc707;hb=HEAD;hpb=768131a744e94e1aeadf0608854f4ccb75f2c952 diff --git a/uip/mhparam.c b/uip/mhparam.c index dce2d75..e02bf49 100644 --- a/uip/mhparam.c +++ b/uip/mhparam.c @@ -10,6 +10,7 @@ */ #include +#include static struct swit switches[] = { #define COMPSW 0 @@ -27,6 +28,8 @@ static struct swit switches[] = { { NULL, 0 } }; +char *version=VERSION; + struct proc { char *p_name; char **p_field; @@ -40,8 +43,8 @@ char *empty = ""; */ static struct proc procs [] = { { "#--Version--", &empty }, - { "version", &version_num }, - { "version-str", &version_str }, + { "version", &version }, + { "lib-version", &lib_version }, { "#--Path-and-File-Names--", &empty }, { "mypath", &mypath }, @@ -75,7 +78,6 @@ static struct proc procs [] = { { "mimetypequery-component", &mimetypequery }, { "nmhstorage-component", &nmhstorage }, { "nsequence-component", &nsequence }, - { "psequence-component", &psequence }, { "usequence-component", &usequence }, { "#--Mmh-specific-Mail-Header-Names--", &empty }, @@ -97,6 +99,7 @@ static struct proc procs [] = { { "replgroupcomps", &replgroupcomps }, { "mhlformat", &mhlformat }, { "mhlreply", &mhlreply }, + { "scanformat", &scanformat }, { "#--Default-Sequence-Names--", &empty }, { "seq-all", &seq_all }, @@ -105,7 +108,6 @@ static struct proc procs [] = { { "seq-first", &seq_first }, { "seq-last", &seq_last }, { "seq-next", &seq_next }, - { "previous-sequence", &seq_prev }, { "unseen-sequence", &seq_unseen }, { "sequence-negation", &seq_neg }, @@ -140,17 +142,17 @@ main(int argc, char **argv) switch (smatch(++cp, switches)) { case AMBIGSW: ambigsw(cp, switches); - done(1); + exit(EX_USAGE); case UNKWNSW: - adios(NULL, "-%s unknown", cp); + adios(EX_USAGE, NULL, "-%s unknown", cp); case HELPSW: snprintf(buf, sizeof(buf), "%s [profile-components] [switches]", invo_name); print_help(buf, switches, 1); - done(1); + exit(argc == 2 ? EX_OK : EX_USAGE); case VERSIONSW: print_version(invo_name); - done(1); + exit(argc == 2 ? EX_OK : EX_USAGE); case COMPSW: components = 1; @@ -203,7 +205,7 @@ main(int argc, char **argv) components = compp > 1; for (i = 0; i < compp; i++) { - register char *value; + char *value; value = context_find(comps[i]); if (!value) @@ -218,8 +220,7 @@ main(int argc, char **argv) } } - done(missed); - return 1; + return missed; }