X-Git-Url: http://git.marmaro.de/?p=mmh;a=blobdiff_plain;f=sbr%2Fcontext_read.c;h=6ca9a3d677127f2c2164541e1600a72771aa1d87;hp=57653ea29589a5a96a5cd47d88a3a5cd0f796eb8;hb=7e3bc577e84e13a47005a706718bd6ec0e6a0e0a;hpb=246ca516a0f7b870316116bc184347b0fb2bc00b diff --git a/sbr/context_read.c b/sbr/context_read.c index 57653ea..6ca9a3d 100644 --- a/sbr/context_read.c +++ b/sbr/context_read.c @@ -47,7 +47,7 @@ context_read(void) ** 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 ((mypath = getenv("HOME")) == (char *)0) { + if ((mypath = getenv("HOME")) == NULL) { if ((pw = getpwuid(getuid())) == (struct passwd *)0 || *pw->pw_dir == '\0') adios(NULL, "cannot determine your home directory"); @@ -67,15 +67,15 @@ context_read(void) defpath = getcpy(expanddir(cp)); 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); + 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); + 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) - adios((char *)0, "Doesn't look like nmh is installed. Run install-mh to do so."); + adios(NULL, "Doesn't look like nmh is installed. Run install-mh to do so."); cp = mh_profile; } @@ -89,7 +89,7 @@ context_read(void) ** one rooted in the home directory. */ - if ((cp = context_find("path")) == (char *)0) + if ((cp = context_find("path")) == NULL) adios(NULL, "Your %s file does not contain a path entry.", defpath); @@ -112,7 +112,7 @@ context_read(void) if (!makedir(nd)) adios(NULL, "unable to create %s", nd); } else if ((st.st_mode & S_IFDIR) == 0) - adios((char *)0, "`%s' is not a directory", nd); + adios(NULL, "`%s' is not a directory", nd); /* ** Open and read user's context file. The name of the context @@ -120,7 +120,7 @@ context_read(void) ** environment variable. */ - if ((cp = getenv("MHCONTEXT")) == (char *)0 || *cp == '\0') + if ((cp = getenv("MHCONTEXT")) == NULL || *cp == '\0') cp = context; /*