From 51ffbae51ba9379bad460566cdf9babaa63b14c3 Mon Sep 17 00:00:00 2001 From: giraffedata Date: Thu, 26 Dec 2013 06:13:41 +0000 Subject: Update to current Development release - 10.65.00 git-svn-id: http://svn.code.sf.net/p/netpbm/code/advanced@2083 9d0c8265-081b-0410-96cb-a4ca84ce46f8 --- generator/pamgauss.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'generator/pamgauss.c') diff --git a/generator/pamgauss.c b/generator/pamgauss.c index 13fe8ea1..82c340fa 100644 --- a/generator/pamgauss.c +++ b/generator/pamgauss.c @@ -11,7 +11,7 @@ -struct cmdlineInfo { +struct CmdlineInfo { /* All the information the user supplied in the command line, in a form easy for the program to use. */ @@ -25,8 +25,8 @@ struct cmdlineInfo { static void -parseCommandLine(int argc, char ** argv, - struct cmdlineInfo * const cmdlineP) { +parseCommandLine(int argc, const char ** argv, + struct CmdlineInfo * const cmdlineP) { /*---------------------------------------------------------------------------- Convert program invocation arguments (argc,argv) into a format the program can use easily, struct cmdlineInfo. Validate arguments along @@ -57,7 +57,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); /* Uses and sets argc, argv, and some of *cmdlineP and others. */ if (!tupletypeSpec) @@ -101,6 +101,7 @@ parseCommandLine(int argc, char ** argv, pm_error("height argument must be a positive number. You " "specified '%s'", argv[2]); } + free(option_def); } @@ -159,15 +160,15 @@ imageNormalizer(struct pam * const pamP, int -main(int argc, char **argv) { +main(int argc, const char **argv) { - struct cmdlineInfo cmdline; + struct CmdlineInfo cmdline; struct pam pam; int row; double normalizer; tuplen * tuplerown; - pnm_init(&argc, argv); + pm_proginit(&argc, argv); parseCommandLine(argc, argv, &cmdline); -- cgit 1.4.1