diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2022-01-08 22:57:49 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2022-01-08 22:57:49 +0000 |
commit | a2a2819cf466cd5da788b736c2e7079737b9b156 (patch) | |
tree | 79a2c14bef07401c4e68081ca02366dd23c4c124 /converter/ppm | |
parent | 4c3cda69a612c59bae50f793011a8e1e49c1f602 (diff) | |
download | netpbm-mirror-a2a2819cf466cd5da788b736c2e7079737b9b156.tar.gz netpbm-mirror-a2a2819cf466cd5da788b736c2e7079737b9b156.tar.xz netpbm-mirror-a2a2819cf466cd5da788b736c2e7079737b9b156.zip |
Change -verbose to a a numerical option
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@4234 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'converter/ppm')
-rw-r--r-- | converter/ppm/picttoppm.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/converter/ppm/picttoppm.c b/converter/ppm/picttoppm.c index f49201a5..1f04eaa9 100644 --- a/converter/ppm/picttoppm.c +++ b/converter/ppm/picttoppm.c @@ -82,7 +82,7 @@ parseCommandLine(int argc, unsigned int option_def_index; - unsigned int fontdirSpec; + unsigned int fontdirSpec, verboseSpec; MALLOCARRAY_NOFAIL(option_def, 100); @@ -95,8 +95,8 @@ parseCommandLine(int argc, &cmdlineP->noheader, 0); OPTENT3(0, "quickdraw", OPT_FLAG, NULL, &cmdlineP->quickdraw, 0); - OPTENT3(0, "verbose", OPT_FLAG, NULL, - &cmdlineP->verbose, 0); + OPTENT3(0, "verbose", OPT_UINT, &cmdlineP->verbose, + &verboseSpec, 0); opt.opt_table = option_def; opt.short_allowed = false; /* We have no short (old-fashioned) options */ @@ -108,6 +108,9 @@ parseCommandLine(int argc, if (!fontdirSpec) cmdlineP->fontdir = NULL; + if (!verboseSpec) + cmdlineP->verbose = 0; + if (argc-1 < 0) cmdlineP->inputFileName = "-"; else { |