about summary refs log tree commit diff
path: root/editor/pamthreshold.c
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2016-03-27 01:46:26 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2016-03-27 01:46:26 +0000
commitdff6b9fdfeb78fe21a66aa459ddc1d5f7e362dfa (patch)
treeb147568ccffc4cdba9e2a98de1452450ba8e55c3 /editor/pamthreshold.c
parent4ce684c4978610d1ea42be1b00f7332f3f5f337a (diff)
downloadnetpbm-mirror-dff6b9fdfeb78fe21a66aa459ddc1d5f7e362dfa.tar.gz
netpbm-mirror-dff6b9fdfeb78fe21a66aa459ddc1d5f7e362dfa.tar.xz
netpbm-mirror-dff6b9fdfeb78fe21a66aa459ddc1d5f7e362dfa.zip
Promote Advanced (10.73) to Stable
git-svn-id: http://svn.code.sf.net/p/netpbm/code/stable@2692 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'editor/pamthreshold.c')
-rw-r--r--editor/pamthreshold.c20
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);