]> diplodocus.org Git - nmh/blobdiff - uip/mhlsbr.c
Assume POSIX ctype.h; don't vet tolower()'s parameter.
[nmh] / uip / mhlsbr.c
index e948da9447251b08c8afd4c969cdb2e11befc238..81704d0ed58f9567dc9470ee814ca70b80957996 100644 (file)
@@ -545,7 +545,7 @@ static void
 mhl_format (char *file, int length, int width)
 {
     int i;
-    char *bp, *cp, **ip;
+    char *bp, **ip;
     char *ap, name[NAMESZ];
     struct mcomp *c1;
     struct stat st;
@@ -560,8 +560,7 @@ mhl_format (char *file, int length, int width)
                && dev == st.st_dev
                && ino == st.st_ino)
            goto out;
-       else
-           free_queue (&fmthd, &fmttl);
+        free_queue (&fmthd, &fmttl);
     }
 
     if ((fp = fopen (etcpath (file), "r")) == NULL)
@@ -591,8 +590,7 @@ mhl_format (char *file, int length, int width)
        if (*bp == ';')
            continue;
 
-       if ((cp = strchr(bp, '\n')))
-           *cp = 0;
+        TrimSuffixC(bp, '\n');
 
        if (*bp == ':') {
            (void) add_queue (&fmthd, &fmttl, NULL, bp + 1, CLEARTEXT);
@@ -990,7 +988,7 @@ mhlfile (FILE *fp, char *mname, int ofilen, int ofilec)
                        nmh_clear_screen ();
                }
                else
-                   printf ("\n");
+                   putchar('\n');
                break;
 
            default: