#include <h/fmt_scan.h>
#include "h/addrsbr.h"
#include "h/mts.h"
+#include "h/done.h"
#include "h/utils.h"
#include <time.h>
icaldebug = 0; /* Global provided by bison (with name-prefix "ical"). */
- if (nmh_init(argv[0], 2)) { return 1; }
+ if (nmh_init(argv[0], true, false)) { return 1; }
arguments = getarguments (invo_name, argc, argv, 1);
argp = arguments;
ambigsw (cp, switches);
done (1);
case UNKWNSW:
- adios (NULL, "-%s unknown", cp);
+ die("-%s unknown", cp);
case HELPSW: {
char buf[128];
case REPLYSW:
if (! (cp = *argp++) || (*cp == '-' && cp[1]))
- adios (NULL, "missing argument to %s", argp[-2]);
+ die("missing argument to %s", argp[-2]);
if (! strcasecmp (cp, "accept")) {
action = ACT_ACCEPT;
} else if (! strcasecmp (cp, "decline")) {
} else if (! strcasecmp (cp, "delegate")) {
action = ACT_DELEGATE;
} else {
- adios (NULL, "Unknown action: %s", cp);
+ die("Unknown action: %s", cp);
}
continue;
case FORMSW:
if (! (form = *argp++) || *form == '-')
- adios (NULL, "missing argument to %s", argp[-2]);
+ die("missing argument to %s", argp[-2]);
format = NULL;
continue;
case FMTSW:
if (! (format = *argp++) || *format == '-')
- adios (NULL, "missing argument to %s", argp[-2]);
+ die("missing argument to %s", argp[-2]);
form = NULL;
continue;
case INFILESW:
if (! (cp = *argp++) || (*cp == '-' && cp[1]))
- adios (NULL, "missing argument to %s", argp[-2]);
+ die("missing argument to %s", argp[-2]);
infile = *cp == '-' ? mh_xstrdup(cp) : path (cp, TFILE);
continue;
case OUTFILESW:
if (! (cp = *argp++) || (*cp == '-' && cp[1]))
- adios (NULL, "missing argument to %s", argp[-2]);
+ die("missing argument to %s", argp[-2]);
outfile = *cp == '-' ? mh_xstrdup(cp) : path (cp, TFILE);
continue;
insert = "Tentative: ";
break;
case ACT_DELEGATE:
- adios (NULL, "Delegate replies are not supported");
+ die("Delegate replies are not supported");
break;
case ACT_CANCEL:
insert = "Cancelled:";
node->value = tmp;
} else {
/* Should never get here. */
- adios (NULL, "Unknown action: %d", action);
+ die("Unknown action: %d", action);
}
}