-
-/*
- * makedir.c -- make a directory
+/* makedir.c -- make a directory
*
* This code is Copyright (c) 2002, by the authors of nmh. See the
* COPYRIGHT file in the root directory of the nmh distribution for
*/
#include <h/mh.h>
+#include "makedir.h"
#include <sys/file.h>
int
c = strncpy(path, dir, sizeof(path));
while (!had_an_error && (c = strchr((c + 1), '/')) != NULL) {
- *c = (char)0;
+ *c = '\0';
if (access(path, X_OK)) {
if (errno != ENOENT){
advise (dir, "unable to create directory");
if (had_an_error)
return 0; /* opposite of UNIX error return convention */
- else
- return 1;
+ return 1;
}