login

<     >

2015-07-29 12:17:09 (UTC-03:00)

Marcel Rodrigues <marcelgmr@gmail.com>

Sort options in order of descending usefulness.

diff --git a/README b/README
index d9ed9ab..e1fbcfc 100644
--- a/README
+++ b/README
@@ -44,16 +44,16 @@ congif [options] timings dialogue
     dialogue:      File generated by script(1)'s regular output
 
     options:
-      -w columns   Terminal width
-      -h lines     Terminal height
-      -f font      File name of MBF font to use
       -o output    File name of GIF output
-      -d divisor   Speedup, as in scriptreplay(1)
       -m maxdelay  Maximum delay, as in scriptreplay(1)
+      -d divisor   Speedup, as in scriptreplay(1)
       -l count     GIF loop count (0 = infinite loop)
+      -f font      File name of MBF font to use
+      -h lines     Terminal height
+      -w columns   Terminal width
       -c on|off    Show/hide cursor
-      -v           Verbose mode (show parser logs)
       -q           Quiet mode (don't show progress bar)
+      -v           Verbose mode (show parser logs)
 
 
 Fonts

diff --git a/main.c b/main.c
index 0426ce5..ad08668 100644
--- a/main.c
+++ b/main.c
@@ -218,16 +218,16 @@ help(char *name)
         "timings:       File generated by script(1)'s -t option\n"
         "dialogue:      File generated by script(1)'s regular output\n\n"
         "options:\n"
-        "  -w columns   Terminal width\n"
-        "  -h lines     Terminal height\n"
-        "  -f font      File name of MBF font to use\n"
         "  -o output    File name of GIF output\n"
-        "  -d divisor   Speedup, as in scriptreplay(1)\n"
         "  -m maxdelay  Maximum delay, as in scriptreplay(1)\n"
+        "  -d divisor   Speedup, as in scriptreplay(1)\n"
         "  -l count     GIF loop count (0 = infinite loop)\n"
+        "  -f font      File name of MBF font to use\n"
+        "  -h lines     Terminal height\n"
+        "  -w columns   Terminal width\n"
         "  -c on|off    Show/hide cursor\n"
-        "  -v           Verbose mode (show parser logs)\n"
         "  -q           Quiet mode (don't show progress bar)\n"
+        "  -v           Verbose mode (show parser logs)\n"
     , name);
 }
 
@@ -257,41 +257,41 @@ main(int argc, char *argv[])
     l = -1;
     c = 1;
     q = 0;
-    while ((opt = getopt(argc, argv, "w:h:f:o:d:m:l:c:vq")) != -1) {
+    while ((opt = getopt(argc, argv, "o:m:d:l:f:h:w:c:qv")) != -1) {
         switch (opt) {
-        case 'w':
-            w = atoi(optarg);
-            break;
-        case 'h':
-            h = atoi(optarg);
-            break;
-        case 'f':
-            f = optarg;
-            break;
         case 'o':
             o = optarg;
             break;
-        case 'd':
-            d = atof(optarg);
-            break;
         case 'm':
             m = atof(optarg);
             break;
+        case 'd':
+            d = atof(optarg);
+            break;
         case 'l':
             l = atoi(optarg);
             break;
+        case 'f':
+            f = optarg;
+            break;
+        case 'h':
+            h = atoi(optarg);
+            break;
+        case 'w':
+            w = atoi(optarg);
+            break;
         case 'c':
             if (!strcmp(optarg, "on") || !strcmp(optarg, "1"))
                 c = 1;
             else if (!strcmp(optarg, "off") || !strcmp(optarg, "0"))
                 c = 0;
             break;
-        case 'v':
-            set_verbosity(1);
-            break;
         case 'q':
             q = 1;
             break;
+        case 'v':
+            set_verbosity(1);
+            break;
         default:
             help(argv[0]);
             return 1;