** Find user's home directory. Try the HOME environment variable first,
** the home directory field in the password file if that's not found.
*/
** Find user's home directory. Try the HOME environment variable first,
** the home directory field in the password file if that's not found.
*/
if ((pw = getpwuid(getuid())) == (struct passwd *)0 ||
*pw->pw_dir == '\0')
adios(NULL, "cannot determine your home directory");
if ((pw = getpwuid(getuid())) == (struct passwd *)0 ||
*pw->pw_dir == '\0')
adios(NULL, "cannot determine your home directory");
- if (stat(defpath, &st) != -1 && (st.st_mode & S_IFREG) == 0)
- adios((char *)0, "`%s' specified by your MH environment variable is not a normal file", cp);
+ if (stat(defpath, &st) != -1 && (st.st_mode & S_IFREG) == 0)
+ adios(NULL, "`%s' specified by your MH environment variable is not a normal file", cp);
- if ((ib = fopen(defpath, "r")) == (FILE *)0)
- adios((char *)0, "unable to read the `%s' profile specified by your MH environment variable", defpath);
+ if ((ib = fopen(defpath, "r")) == (FILE *)0)
+ adios(NULL, "unable to read the `%s' profile specified by your MH environment variable", defpath);
} else {
defpath = concat(mypath, "/", mh_profile, NULL);
if ((ib = fopen(defpath, "r")) == (FILE *)0)
} else {
defpath = concat(mypath, "/", mh_profile, NULL);
if ((ib = fopen(defpath, "r")) == (FILE *)0)
- (void)snprintf(nd = buf, sizeof(buf), "%s/%s", mypath, cp);
+ snprintf(nd = buf, sizeof(buf), "%s/%s", mypath, cp);
if (!makedir(nd))
adios(NULL, "unable to create %s", nd);
} else if ((st.st_mode & S_IFDIR) == 0)
if (!makedir(nd))
adios(NULL, "unable to create %s", nd);
} else if ((st.st_mode & S_IFDIR) == 0)
if ((ib = lkfopen(ctxpath, "r"))) {
readconfig((struct node **) 0, ib, cp, 1);
if ((ib = lkfopen(ctxpath, "r"))) {
readconfig((struct node **) 0, ib, cp, 1);