diff options
Diffstat (limited to 'analyzer/pamgetcolor.c')
-rw-r--r-- | analyzer/pamgetcolor.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/analyzer/pamgetcolor.c b/analyzer/pamgetcolor.c index d1ea3799..e7e9160d 100644 --- a/analyzer/pamgetcolor.c +++ b/analyzer/pamgetcolor.c @@ -1,4 +1,8 @@ +#define _C99_SOURCE /* Make sure snprintf() is in stdio.h */ + #include <string.h> +#include <stdio.h> + #include <nstring.h> #include <pm_gamma.h> #include <pam.h> @@ -246,7 +250,7 @@ parsedCommandLine(int argc, const char ** const argv) { optEntry * option_def; - /* Instructions to OptParseOptions3 on how to parse our options. + /* Instructions to OptParseOptions4 on how to parse our options. */ optStruct3 opt; @@ -269,7 +273,7 @@ parsedCommandLine(int argc, 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, (char **)argv, opt, sizeof(opt), 0); + pm_optParseOptions4(&argc, argv, opt, sizeof(opt), 0); if (!infileSpec) cmdLine.infile = "-"; @@ -526,7 +530,7 @@ printColors(struct pam * const pamP, tup = pnm_allocpamtuple(pamP); - pm_snprintf(fmt, sizeof(fmt), "%%%is: %%s\n", cmdLine.maxLbLen); + snprintf(fmt, sizeof(fmt), "%%%is: %%s\n", cmdLine.maxLbLen); for (r = 0; r < cmdLine.regN; ++r) { RegSpec spec; |