]> git.draconx.ca Git - liblbx.git/commitdiff
lbximg: Clean up option list.
authorNick Bowler <nbowler@draconx.ca>
Wed, 10 Feb 2010 04:42:38 +0000 (23:42 -0500)
committerNick Bowler <nbowler@draconx.ca>
Wed, 10 Feb 2010 04:42:38 +0000 (23:42 -0500)
Despite it being very useful, --nopalette did not have a single
character option.  While we're at it, use --no-palette for consistency
with GNU tools.

src/lbximg.c

index c4075b0d37eb21966ae16913b573a543959d5c63..6bdbaae172a7b4838d0dd80343f3c98b0844c58f 100644 (file)
@@ -375,20 +375,20 @@ int main(int argc, char **argv)
        const char *file = NULL;
        LBX_IMG *img;
 
-       static const char *sopts = "idvf:p:O:V";
+       static const char *sopts = "idnvf:p:O:V";
        static const struct option lopts[] = {
-               { "ident",    0, NULL, 'i' },
-               { "decode",   0, NULL, 'd' },
-               { "verbose",  0, NULL, 'v' },
-               { "file",     1, NULL, 'f' },
-               { "palette",  1, NULL, 'p' },
-               { "override", 1, NULL, 'p' },
+               { "ident",      0, NULL, 'i' },
+               { "decode",     0, NULL, 'd' },
+               { "verbose",    0, NULL, 'v' },
+               { "file",       1, NULL, 'f' },
+               { "palette",    1, NULL, 'p' },
+               { "override",   1, NULL, 'p' },
 
-               { "version",  0, NULL, 'V' },
-               { "usage",    0, NULL, 'U' },
-               { "help",     0, NULL, 'H' },
+               { "version",    0, NULL, 'V' },
+               { "usage",      0, NULL, 'U' },
+               { "help",       0, NULL, 'H' },
 
-               { "nopalette", 0, &usepalette, 0 },
+               { "no-palette", 0, NULL, 'n' },
 
                { 0 }
        };
@@ -408,6 +408,9 @@ int main(int argc, char **argv)
                case 'f':
                        file = optarg;
                        break;
+               case 'n':
+                       usepalette = 0;
+                       break;
                case 'p':
                        palf = fopen(optarg, "rb");
                        if (!palf) {