From 1e36c263748208035066674b146800af37edccc2 Mon Sep 17 00:00:00 2001 From: giraffedata Date: Sun, 18 Nov 2012 00:58:17 +0000 Subject: Call OPTENTINIT, as required for an empty option table git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@1765 9d0c8265-081b-0410-96cb-a4ca84ce46f8 --- analyzer/pgmhist.c | 6 ++++-- converter/other/pamtompfont.c | 2 ++ editor/pbmpscale.c | 2 ++ other/pampick.c | 1 + 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/analyzer/pgmhist.c b/analyzer/pgmhist.c index 5db1c0e6..fc55b1a7 100644 --- a/analyzer/pgmhist.c +++ b/analyzer/pgmhist.c @@ -40,9 +40,11 @@ parseCommandLine(int argc, const char ** argv, optEntry * option_def; unsigned int option_def_index; - MALLOCARRAY(option_def, 100); + MALLOCARRAY_NOFAIL(option_def, 100); - option_def_index = 0; /* incremented by OPTENTRY */ + option_def_index = 0; /* incremented by OPTENT3 */ + + OPTENTINIT; opt.opt_table = option_def; opt.short_allowed = FALSE; /* We have no short (old-fashioned) options */ diff --git a/converter/other/pamtompfont.c b/converter/other/pamtompfont.c index db5fc633..7de6396c 100644 --- a/converter/other/pamtompfont.c +++ b/converter/other/pamtompfont.c @@ -53,6 +53,8 @@ parseCommandLine(int argc, char ** argv, option_def_index = 0; /* incremented by OPTENTRY */ + OPTENTINIT; + opt.opt_table = option_def; opt.short_allowed = FALSE; /* We have no short (old-fashioned) options */ opt.allowNegNum = FALSE; /* We have no parms that are negative numbers */ diff --git a/editor/pbmpscale.c b/editor/pbmpscale.c index e8a3f4c2..afe2bdd4 100644 --- a/editor/pbmpscale.c +++ b/editor/pbmpscale.c @@ -96,6 +96,8 @@ parseCommandLine(int argc, const char ** const argv, option_def_index = 0; /* incremented by OPTENT3 */ + OPTENTINIT; + opt.opt_table = option_def; opt.short_allowed = FALSE; /* We have no short (old-fashioned) options */ opt.allowNegNum = FALSE; /* We may have parms that are negative numbers */ diff --git a/other/pampick.c b/other/pampick.c index 8177cae1..5229502d 100644 --- a/other/pampick.c +++ b/other/pampick.c @@ -113,6 +113,7 @@ parseCommandLine(int argc, char ** argv, specifies an option. But when we add an option in the future, it will go right here with an OPTENT3() macro invocation. */ + OPTENTINIT; opt.opt_table = option_def; opt.short_allowed = FALSE; /* We have no short (old-fashioned) options */ -- cgit 1.4.1