*/
#include <h/mh.h>
+#include <sysexits.h>
static struct swit switches[] = {
#define COMPSW 0
{ NULL, 0 }
};
+char *version=VERSION;
+
struct proc {
char *p_name;
char **p_field;
*/
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 },
{ "replgroupcomps", &replgroupcomps },
{ "mhlformat", &mhlformat },
{ "mhlreply", &mhlreply },
+ { "scanformat", &scanformat },
{ "#--Default-Sequence-Names--", &empty },
{ "seq-all", &seq_all },
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;
components = compp > 1;
for (i = 0; i < compp; i++) {
- register char *value;
+ char *value;
value = context_find(comps[i]);
if (!value)