diff options
Diffstat (limited to 'editor/pamthreshold.c')
-rw-r--r-- | editor/pamthreshold.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/editor/pamthreshold.c b/editor/pamthreshold.c index c5f48147..8d28bc4a 100644 --- a/editor/pamthreshold.c +++ b/editor/pamthreshold.c @@ -103,15 +103,15 @@ parseGeometry(const char * const wxl, char * const xPos = strchr(wxl, 'x'); if (!xPos) - asprintfN(errorP, "There is no 'x'. It should be WIDTHxHEIGHT"); + pm_asprintf(errorP, "There is no 'x'. It should be WIDTHxHEIGHT"); else { *widthP = atoi(wxl); *heightP = atoi(xPos + 1); if (*widthP == 0) - asprintfN(errorP, "Width is zero."); + pm_asprintf(errorP, "Width is zero."); else if (*heightP == 0) - asprintfN(errorP, "Height is zero."); + pm_asprintf(errorP, "Height is zero."); else *errorP = NULL; } @@ -161,13 +161,13 @@ parseCommandLine(int argc, /* set the defaults */ cmdlineP->width = cmdlineP->height = 0U; - /* set the option description for optParseOptions3 */ + /* set the option description for pm_optParseOptions3 */ opt.opt_table = option_def; opt.short_allowed = FALSE; /* long options only */ opt.allowNegNum = FALSE; /* we have no numbers at all */ /* parse commandline, change argc, argv, and *cmdlineP */ - optParseOptions3(&argc, argv, opt, sizeof(opt), 0); + pm_optParseOptions3(&argc, argv, opt, sizeof(opt), 0); if (cmdlineP->simple + localSpec + dualSpec > 1) pm_error("You may specify only one of -simple, -local, and -dual"); @@ -194,7 +194,7 @@ parseCommandLine(int argc, if (error) { pm_error("Invalid -local value '%s'. %s", localOpt, error); - strfree(error); + pm_strfree(error); } } else cmdlineP->local = FALSE; @@ -207,7 +207,7 @@ parseCommandLine(int argc, if (error) { pm_error("Invalid -dual value '%s'. %s", dualOpt, error); - strfree(error); + pm_strfree(error); } } else cmdlineP->dual = FALSE; @@ -302,7 +302,7 @@ analyzeDistribution(struct pam * const inpamP, pm_error("Unable to allocate space for %lu-entry histogram", inpamP->maxval+1); - /* Initialize histogram -- zero occurences of everything */ + /* Initialize histogram -- zero occurrences of everything */ for (i = 0; i <= inpamP->maxval; ++i) histogram[i] = 0; @@ -376,7 +376,7 @@ computeGlobalThreshold(struct pam * const inpamP, Compute the proper threshold to use for the image described by *inpamP, and: - 'histogram' describes the frequency of occurence of the various sample + 'histogram' describes the frequency of occurrence of the various sample values in the image. 'globalRange' describes the range (minimum, maximum) of sample values @@ -658,7 +658,7 @@ main(int argc, char **argv) { FILE * ifP; struct cmdlineInfo cmdline; struct pam inpam, outpam; - bool eof; /* No more images in input stream */ + int eof; /* No more images in input stream */ pnm_init(&argc, argv); |