diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2020-09-08 02:43:04 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2020-09-08 02:43:04 +0000 |
commit | f1ecc708a6a70c0d2db7444d95bfba158309992a (patch) | |
tree | dd45d4ad06395d3b3920e373f1b50971c57f4f39 | |
parent | b3c523f23f5c7e3777d0cbb4094737da84b0fa90 (diff) | |
download | netpbm-mirror-f1ecc708a6a70c0d2db7444d95bfba158309992a.tar.gz netpbm-mirror-f1ecc708a6a70c0d2db7444d95bfba158309992a.tar.xz netpbm-mirror-f1ecc708a6a70c0d2db7444d95bfba158309992a.zip |
cleanup
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@3955 9d0c8265-081b-0410-96cb-a4ca84ce46f8
-rw-r--r-- | converter/other/jpeg2000/jpeg2ktopam.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/converter/other/jpeg2000/jpeg2ktopam.c b/converter/other/jpeg2000/jpeg2ktopam.c index faf8e4cc..8bb760c1 100644 --- a/converter/other/jpeg2000/jpeg2ktopam.c +++ b/converter/other/jpeg2000/jpeg2ktopam.c @@ -29,11 +29,9 @@ #include "libjasper_compat.h" -enum compmode {COMPMODE_INTEGER, COMPMODE_REAL}; -enum progression {PROG_LRCP, PROG_RLCP, PROG_RPCL, PROG_PCRL, PROG_CPRL}; -struct cmdlineInfo { +struct CmdlineInfo { /* All the information the user supplied in the command line, in a form easy for the program to use. */ @@ -44,15 +42,15 @@ struct cmdlineInfo { static void -parseCommandLine(int argc, char ** argv, - struct cmdlineInfo * const cmdlineP) { +parseCommandLine(int argc, const char ** argv, + struct CmdlineInfo * const cmdlineP) { /*---------------------------------------------------------------------------- Note that many of the strings that this function returns in the *cmdlineP structure are actually in the supplied argv array. And sometimes, one of these strings is actually just a suffix of an entry in argv! -----------------------------------------------------------------------------*/ - optEntry *option_def; + optEntry * option_def; optStruct3 opt; unsigned int debuglevelSpec; @@ -71,7 +69,7 @@ parseCommandLine(int argc, char ** argv, opt.short_allowed = FALSE; /* We have no short (old-fashioned) options */ opt.allowNegNum = FALSE; /* We have no parms that are negative numbers */ - pm_optParseOptions3(&argc, argv, opt, sizeof(opt), 0); + pm_optParseOptions3(&argc, (char**)argv, opt, sizeof(opt), 0); if (!debuglevelSpec) cmdlineP->debuglevel = 0; @@ -84,6 +82,7 @@ parseCommandLine(int argc, char ** argv, pm_error("Too many arguments. The only argument accepted\n" "is the input file specification"); + free(option_def); } @@ -482,9 +481,9 @@ convertToPamPnm(struct pam * const outpamP, int -main(int argc, char **argv) +main(int argc, const char **argv) { - struct cmdlineInfo cmdline; + struct CmdlineInfo cmdline; struct pam outpam; int * jasperCmpt; /* malloc'ed */ /* jaspercmpt[P] is the component number for use with the @@ -492,7 +491,7 @@ main(int argc, char **argv) */ jas_image_t * jasperP; - pnm_init(&argc, argv); + pm_proginit(&argc, argv); parseCommandLine(argc, argv, &cmdline); |