X-Git-Url: http://git.draconx.ca/gitweb/liblbx.git/blobdiff_plain/412512cc2c99762dd122f57a82cc174f414265e5..2f0e47fcf78aeae3bcd0e8126f2f33b98bd285e8:/src/lbximg.c diff --git a/src/lbximg.c b/src/lbximg.c index 0a0057a..c88fc4e 100644 --- a/src/lbximg.c +++ b/src/lbximg.c @@ -38,6 +38,10 @@ static int verbose = 0; static char *outname = "out"; static int usepalette = 1; +enum { + OPT_PREFIX = UCHAR_MAX+1, +}; + static void printusage(void) { puts("usage: lbximg [-i|-d] [-v] [-p palette_file] [-O override_file]" @@ -332,19 +336,20 @@ int main(int argc, char **argv) static const char sopts[] = "idnvF:f:p:O:VH"; static const struct option lopts[] = { - { "identify", 0, NULL, 'i' }, - { "decode", 0, NULL, 'd' }, - { "verbose", 0, NULL, 'v' }, - { "file", 1, NULL, 'f' }, - { "format", 1, NULL, 'F' }, - { "palette", 1, NULL, 'p' }, - { "override", 1, NULL, 'O' }, + { "identify", 0, NULL, 'i' }, + { "decode", 0, NULL, 'd' }, + { "verbose", 0, NULL, 'v' }, + { "file", 1, NULL, 'f' }, + { "format", 1, NULL, 'F' }, + { "palette", 1, NULL, 'p' }, + { "override", 1, NULL, 'O' }, + { "no-palette", 0, NULL, 'n' }, - { "version", 0, NULL, 'V' }, - { "usage", 0, NULL, 'U' }, - { "help", 0, NULL, 'H' }, + { "output-prefix", 1, NULL, OPT_PREFIX }, - { "no-palette", 0, NULL, 'n' }, + { "version", 0, NULL, 'V' }, + { "usage", 0, NULL, 'U' }, + { "help", 0, NULL, 'H' }, { 0 } }; @@ -385,6 +390,9 @@ int main(int argc, char **argv) return EXIT_FAILURE; } break; + case OPT_PREFIX: + outname = optarg; + break; case 'V': tool_version(); return EXIT_SUCCESS;