diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2016-03-27 01:46:26 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2016-03-27 01:46:26 +0000 |
commit | dff6b9fdfeb78fe21a66aa459ddc1d5f7e362dfa (patch) | |
tree | b147568ccffc4cdba9e2a98de1452450ba8e55c3 /converter/ppm/ppmtoxpm.c | |
parent | 4ce684c4978610d1ea42be1b00f7332f3f5f337a (diff) | |
download | netpbm-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 'converter/ppm/ppmtoxpm.c')
-rw-r--r-- | converter/ppm/ppmtoxpm.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/converter/ppm/ppmtoxpm.c b/converter/ppm/ppmtoxpm.c index fc8ba9d7..38d99972 100644 --- a/converter/ppm/ppmtoxpm.c +++ b/converter/ppm/ppmtoxpm.c @@ -126,7 +126,7 @@ parseCommandLine(int argc, char ** argv, opt.short_allowed = FALSE; /* We have no short (old-fashioned) options */ opt.allowNegNum = FALSE; /* We may have parms that are negative numbers */ - optParseOptions3(&argc, argv, opt, sizeof(opt), 0); + pm_optParseOptions3(&argc, argv, opt, sizeof(opt), 0); /* Uses and sets argc, argv, and some of *cmdlineP and others. */ if (argc-1 == 0) @@ -317,7 +317,7 @@ genCmap(colorhist_vector const chv, MALLOCARRAY(cmap, cmapSize); if (cmapP == NULL) pm_error("Out of memory allocating %u bytes for a color map.", - sizeof(cixel_map) * (ncolors+1)); + (unsigned)sizeof(cixel_map) * (ncolors+1)); xpmMaxval = xpmMaxvalFromMaxval(maxval); @@ -363,13 +363,13 @@ genCmap(colorhist_vector const chv, PPM_DEPTH(scaledColor, color, maxval, xpmMaxval); - asprintfN(&hexString, xpmMaxval == 0x000F ? "#%X%X%X" : - xpmMaxval == 0x00FF ? "#%02X%02X%02X" : - xpmMaxval == 0x0FFF ? "#%03X%03X%03X" : - "#%04X%04X%04X", - PPM_GETR(scaledColor), - PPM_GETG(scaledColor), - PPM_GETB(scaledColor) + pm_asprintf(&hexString, xpmMaxval == 0x000F ? "#%X%X%X" : + xpmMaxval == 0x00FF ? "#%02X%02X%02X" : + xpmMaxval == 0x0FFF ? "#%03X%03X%03X" : + "#%04X%04X%04X", + PPM_GETR(scaledColor), + PPM_GETG(scaledColor), + PPM_GETB(scaledColor) ); if (hexString == NULL) @@ -399,7 +399,7 @@ destroyCmap(cixel_map * const cmap, int i; /* Free the real color entries */ for (i = 0; i < cmapSize; i++) { - strfree(cmap[i].rgbname); + pm_strfree(cmap[i].rgbname); free(cmap[i].cixel); } free(cmap); |