*/
#include <h/mh.h>
+#include <h/utils.h>
#include <h/signals.h>
#ifndef CYRUS_SASL
X("version", 0, VERSIONSW) \
X("help", 0, HELPSW) \
X("client host", -6, CLIESW) \
- X("server host", -6, SERVSW) \
- X("snoop", -5, SNOOPSW) \
+ X("server host", 0, SERVSW) \
+ X("snoop", 0, SNOOPSW) \
X("sasl", SASLminc(4), SASLSW) \
X("saslmech mechanism", SASLminc(-5), SASLMECHSW) \
X("user username", SASLminc(-4), USERSW) \
char *msg = NULL, **ap, **argp, backup[BUFSIZ];
char buf[BUFSIZ], **arguments, *vec[MAXARGS];
- setlocale(LC_ALL, "");
- invo_name = r1bindex (argv[0], '/');
-
- /* read user profile/context */
- context_read();
+ if (nmh_init(argv[0], 2)) { return 1; }
arguments = getarguments (invo_name, argc, argv, 1);
argp = arguments;
if ((cp = context_find ("Aliasfile"))) {
char *dp = NULL;
- for (ap = brkstring(dp = getcpy(cp), " ", "\n"); ap && *ap; ap++) {
+ for (ap = brkstring(dp = mh_xstrdup(cp), " ", "\n"); ap && *ap; ap++) {
vec[vecp++] = "-alias";
vec[vecp++] = *ap;
}
status = pidwait(child_id, OK);
- unlink (msg);
+ (void) m_unlink (msg);
if (rename (backup, msg) == NOTOK)
adios (msg, "unable to rename %s to", backup);
done (status);