X-Git-Url: http://git.marmaro.de/?p=mmh;a=blobdiff_plain;f=uip%2Fmhparam.c;h=2c61e608076236bb2042a0b4d414215412dc7686;hp=1d9537728441bd0ec47dd28cf93e71b361d1c2db;hb=6e9577f324bef90765a5edc02044eb111ec48072;hpb=fede6e42d81ce34fd5c1bbe7fb2757b281c2573a diff --git a/uip/mhparam.c b/uip/mhparam.c index 1d95377..2c61e60 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 }, @@ -97,6 +100,7 @@ static struct proc procs [] = { { "replgroupcomps", &replgroupcomps }, { "mhlformat", &mhlformat }, { "mhlreply", &mhlreply }, + { "scanformat", &scanformat }, { "#--Default-Sequence-Names--", &empty }, { "seq-all", &seq_all }, @@ -140,18 +144,17 @@ main(int argc, char **argv) switch (smatch(++cp, switches)) { case AMBIGSW: ambigsw(cp, switches); - /*sysexits.h EX_USAGE*/ - exit(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); - exit(0); + exit(argc == 2 ? EX_OK : EX_USAGE); case VERSIONSW: print_version(invo_name); - exit(0); + exit(argc == 2 ? EX_OK : EX_USAGE); case COMPSW: components = 1; @@ -204,7 +207,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)