]> diplodocus.org Git - nmh/blobdiff - uip/new.c
uip/mhshowsbr.h: Move in declarations from h/mhparse.h.
[nmh] / uip / new.c
index dd173cc0b81165a259d5d1b768548fbf149433c3..8e3c3505a651a195b8510008079ebf0a066caf18 100644 (file)
--- a/uip/new.c
+++ b/uip/new.c
@@ -1,6 +1,4 @@
-
-/*
- * new.c -- as new,    list all folders with unseen messages
+/* new.c -- as new,    list all folders with unseen messages
  *       -- as fnext,  move to next folder with unseen messages
  *       -- as fprev,  move to previous folder with unseen messages
  *       -- as unseen, scan all unseen messages
@@ -98,7 +96,7 @@ get_msgnums(char *folder, char *sequences[])
     char *seqfile = NULL;
     FILE *fp;
     int state;
-    char name[NAMESZ], field[BUFSIZ];
+    char name[NAMESZ], field[NMH_BUFSIZ];
     char *cp;
     char *msgnums = NULL, *this_msgnums, *old_msgnums;
     int failed_to_lock = 0;
@@ -178,7 +176,7 @@ get_msgnums(char *folder, char *sequences[])
 
             case BODY:
                 adios (NULL, "no blank lines are permitted in %s", seqfile);
-                /* fall */
+               /* FALLTHRU */
 
             case FILEEOF:
                 break;
@@ -342,14 +340,15 @@ doit(char *cur, char *folders, char *sequences[])
        if (first == NULL) {
            /* No folders at all... */
            return NULL;
-       } else if (first->n_next == NULL) {
+       }
+        if (first->n_next == NULL) {
            /* We have only one node; any desired messages in it? */
            if (first->n_field == NULL) {
                return NULL;
-           } else {
-               return first;
            }
-       } else if (cur_node == NULL) {
+            return first;
+       }
+        if (cur_node == NULL) {
            /* Current folder is not listed in .folders, return first. */
            return first;
        }
@@ -390,7 +389,7 @@ doit(char *cur, char *folders, char *sequences[])
             if (strcmp(node->n_name, cur) == 0) {
                 puts(" (*: current folder)");
             } else {
-                puts("");
+                putchar('\n');
             }
             fflush(stdout);