Relayouted all switch statements: case aligns with switch.
[mmh] / uip / scan.c
index 5cac626..69c2da9 100644 (file)
@@ -88,64 +88,67 @@ main(int argc, char **argv)
        while ((cp = *argp++)) {
                if (*cp == '-') {
                        switch (smatch(++cp, switches)) {
-                               case AMBIGSW:
-                                       ambigsw(cp, switches);
-                                       done(1);
-                               case UNKWNSW:
-                                       adios(NULL, "-%s unknown", cp);
-
-                               case HELPSW:
-                                       snprintf(buf, sizeof(buf), "%s [+folder] [msgs] [switches]", invo_name);
-                                       print_help(buf, switches, 1);
-                                       done(1);
-                               case VERSIONSW:
-                                       print_version(invo_name);
-                                       done(1);
-
-                               case CLRSW:
-                                       clearflag++;
-                                       continue;
-                               case NCLRSW:
-                                       clearflag = 0;
-                                       continue;
-
-                               case FORMSW:
-                                       if (!(form = *argp++) || *form == '-')
-                                               adios(NULL, "missing argument to %s", argp[-2]);
-                                       format = NULL;
-                                       continue;
-                               case FMTSW:
-                                       if (!(format = *argp++) ||
-                                                       *format == '-')
-                                               adios(NULL, "missing argument to %s", argp[-2]);
-                                       form = NULL;
-                                       continue;
-
-                               case HEADSW:
-                                       hdrflag++;
-                                       continue;
-                               case NHEADSW:
-                                       hdrflag = 0;
-                                       continue;
-
-                               case WIDTHSW:
-                                       if (!(cp = *argp++) || *cp == '-')
-                                               adios(NULL, "missing argument to %s", argp[-2]);
-                                       width = atoi(cp);
-                                       continue;
-                               case REVSW:
-                                       revflag++;
-                                       continue;
-                               case NREVSW:
-                                       revflag = 0;
-                                       continue;
-
-                               case FILESW:
-                                       if (!(cp = *argp++) || (cp[0] == '-' && cp[1]))
-                                               adios(NULL, "missing argument to %s", argp[-2]);
-                                       if (strcmp(file = cp, "-")!=0)
-                                               file = getcpy(expanddir(cp));
-                                       continue;
+                       case AMBIGSW:
+                               ambigsw(cp, switches);
+                               done(1);
+                       case UNKWNSW:
+                               adios(NULL, "-%s unknown", cp);
+
+                       case HELPSW:
+                               snprintf(buf, sizeof(buf), "%s [+folder] [msgs] [switches]", invo_name);
+                               print_help(buf, switches, 1);
+                               done(1);
+                       case VERSIONSW:
+                               print_version(invo_name);
+                               done(1);
+
+                       case CLRSW:
+                               clearflag++;
+                               continue;
+                       case NCLRSW:
+                               clearflag = 0;
+                               continue;
+
+                       case FORMSW:
+                               if (!(form = *argp++) || *form == '-')
+                                       adios(NULL, "missing argument to %s",
+                                                       argp[-2]);
+                               format = NULL;
+                               continue;
+                       case FMTSW:
+                               if (!(format = *argp++) || *format == '-')
+                                       adios(NULL, "missing argument to %s",
+                                                       argp[-2]);
+                               form = NULL;
+                               continue;
+
+                       case HEADSW:
+                               hdrflag++;
+                               continue;
+                       case NHEADSW:
+                               hdrflag = 0;
+                               continue;
+
+                       case WIDTHSW:
+                               if (!(cp = *argp++) || *cp == '-')
+                                       adios(NULL, "missing argument to %s",
+                                                       argp[-2]);
+                               width = atoi(cp);
+                               continue;
+                       case REVSW:
+                               revflag++;
+                               continue;
+                       case NREVSW:
+                               revflag = 0;
+                               continue;
+
+                       case FILESW:
+                               if (!(cp = *argp++) || (cp[0] == '-' && cp[1]))
+                                       adios(NULL, "missing argument to %s",
+                                                       argp[-2]);
+                               if (strcmp(file = cp, "-")!=0)
+                                       file = getcpy(expanddir(cp));
+                               continue;
                        }
                }
                if (*cp == '+' || *cp == '@') {
@@ -289,23 +292,21 @@ main(int argc, char **argv)
                        switch (state = scan(in, msgnum, 0, nfs, width,
                                                msgnum == mp->curmsg, unseen,
                                                folder, 0L, 1)) {
-                               case SCNMSG:
-                               case SCNENC:
-                               case SCNERR:
-                                       break;
+                       case SCNMSG:
+                       case SCNENC:
+                       case SCNERR:
+                               break;
 
-                               default:
-                                       adios(NULL, "scan() botch(%d)", state);
+                       default:
+                               adios(NULL, "scan() botch(%d)", state);
 
-                               case SCNEOF:
+                       case SCNEOF:
 #if 0
-                                       printf("%*d  empty\n", DMAXFOLDER,
-                                                       msgnum);
+                               printf("%*d  empty\n", DMAXFOLDER, msgnum);
 #else
-                                       advise(NULL, "message %d: empty",
-                                                       msgnum);
+                               advise(NULL, "message %d: empty", msgnum);
 #endif
-                                       break;
+                               break;
                        }
                        hdrflag = 0;
                        fclose(in);