-/*
- * mkstemp.c -- create a temporary file
+/* mkstemp.c -- create a temporary file
*
* This code is Copyright (c) 2014 by the authors of nmh.
* See the COPYRIGHT file in the root directory of the nmh
#endif /* HAVE_CONFIG_H */
#include <unistd.h>
#include <stdlib.h>
+#include <stdbool.h>
#include <string.h>
#include <stdio.h>
+#include <h/utils.h>
+
#if ! defined HAVE_MKSTEMPS
# define HAVE_MKSTEMPS 0
#endif /* ! HAVE_MKSTEMPS */
template[len-1] = '\0';
return template;
- } else {
- perror("malloc");
- return NULL;
}
+
+ perror("malloc");
+ return NULL;
}
NMH_UNUSED(suffix);
# endif /* ! HAVE_MKSTEMPS */
- if (nmh_init(argv[0], 1)) { done(NOTOK); }
+ if (nmh_init(argv[0], 2)) { done(NOTOK); }
arguments = getarguments (invo_name, argc, argv, 1);
argp = arguments;
ambigsw(cp, switches);
done(NOTOK);
case UNKWNSW:
- advise (NULL, "-%s unknown", cp);
+ inform("-%s unknown", cp);
(void) snprintf(buf, sizeof buf, "%s [switches]", invo_name);
print_help(buf, switches, 1);
done(NOTOK);