flist: Removed the hidden -total switch.
authormarkus schnalke <meillo@marmaro.de>
Sat, 5 May 2012 05:53:09 +0000 (07:53 +0200)
committermarkus schnalke <meillo@marmaro.de>
Sat, 5 May 2012 05:53:09 +0000 (07:53 +0200)
It was simply the inverse of the visible -fast switch. -nofast was -total
and -fast was -nototal. Now, the hidden pair went away.

uip/flist.c

index 71ae8e8..ac68080 100644 (file)
@@ -47,13 +47,9 @@ static struct swit switches[] = {
        { "fast", 0 },
 #define NOFASTSW  10
        { "nofast", 0 },
        { "fast", 0 },
 #define NOFASTSW  10
        { "nofast", 0 },
-#define TOTALSW  11
-       { "total", -5 },
-#define NOTOTALSW  12
-       { "nototal", -7 },
-#define VERSIONSW  13
+#define VERSIONSW  11
        { "Version", 0 },
        { "Version", 0 },
-#define HELPSW  14
+#define HELPSW  12
        { "help", 0 },
        { NULL, 0 }
 };
        { "help", 0 },
        { NULL, 0 }
 };
@@ -87,7 +83,7 @@ static int all = FALSE;  /* scan all folders in top level? */
 static int alphaOrder = FALSE;  /* want alphabetical order only */
 static int recurse = FALSE;  /* show nested folders? */
 static int showzero   = TRUE;  /* show folders even if no messages in seq? */
 static int alphaOrder = FALSE;  /* want alphabetical order only */
 static int recurse = FALSE;  /* show nested folders? */
 static int showzero   = TRUE;  /* show folders even if no messages in seq? */
-static int Total = TRUE;  /* display info on number of messages in
+static int fastsw = FALSE;  /* display info on number of messages in
                * sequence found, and total num messages */
 
 static char curfol[BUFSIZ];  /* name of the current folder */
                * sequence found, and total num messages */
 
 static char curfol[BUFSIZ];  /* name of the current folder */
@@ -199,14 +195,11 @@ main(int argc, char **argv)
                                alphaOrder = FALSE;
                                break;
 
                                alphaOrder = FALSE;
                                break;
 
-                       case NOFASTSW:
-                       case TOTALSW:
-                               Total = TRUE;
-                               break;
-
                        case FASTSW:
                        case FASTSW:
-                       case NOTOTALSW:
-                               Total = FALSE;
+                               fastsw = TRUE;
+                               break;
+                       case NOFASTSW:
+                               fastsw = FALSE;
                                break;
 
                        case RECURSE:
                                break;
 
                        case RECURSE:
@@ -534,7 +527,7 @@ PrintFolders(void)
        unsigned int maxfolderlen = 0, maxseqlen = 0;
        int maxnum = 0, maxseq = 0;
 
        unsigned int maxfolderlen = 0, maxseqlen = 0;
        int maxnum = 0, maxseq = 0;
 
-       if (!Total) {
+       if (fastsw) {
                for (i = 0; i < nFolders; i++)
                        printf("%s\n", folders[i].name);
                return;
                for (i = 0; i < nFolders; i++)
                        printf("%s\n", folders[i].name);
                return;