** 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");
defpath = getcpy(expanddir(cp));
if (stat(defpath, &st) != -1 && (st.st_mode & S_IFREG) == 0)
defpath = getcpy(expanddir(cp));
if (stat(defpath, &st) != -1 && (st.st_mode & S_IFREG) == 0)
- adios((char *)0, "unable to read the `%s' profile specified by your MH environment variable", defpath);
+ 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)
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)