diff options
-rw-r--r-- | converter/other/cameratopam/cameratopam.c | 2 | ||||
-rw-r--r-- | converter/other/cameratopam/foveon.c | 4 | ||||
-rw-r--r-- | converter/other/cameratopam/foveon.h | 4 | ||||
-rw-r--r-- | converter/other/pamtogif.c | 4 | ||||
-rw-r--r-- | converter/other/pamtooctaveimg.c | 4 | ||||
-rw-r--r-- | converter/other/pamtopam.c | 2 | ||||
-rw-r--r-- | converter/other/pamtopnm.c | 2 | ||||
-rw-r--r-- | converter/other/pamtosrf.c | 4 | ||||
-rw-r--r-- | converter/other/pamtotiff.c | 2 | ||||
-rw-r--r-- | converter/other/pamtowinicon.c | 2 | ||||
-rw-r--r-- | converter/other/pamtoxvmini.c | 4 | ||||
-rw-r--r-- | converter/other/pnmtopclxl.c | 2 | ||||
-rw-r--r-- | converter/other/pnmtopng.c | 2 | ||||
-rw-r--r-- | converter/pbm/pbmtolj.c | 2 | ||||
-rw-r--r-- | converter/pbm/pbmtopsg3.c | 2 | ||||
-rw-r--r-- | converter/ppm/ppmtompeg/headers/frames.h | 1 | ||||
-rw-r--r-- | converter/ppm/ppmtompeg/parallel.c | 2 | ||||
-rw-r--r-- | doc/HISTORY | 3 | ||||
-rw-r--r-- | editor/pamscale.c | 2 | ||||
-rw-r--r-- | lib/libpammap.c | 2 | ||||
-rw-r--r-- | lib/libpamn.c | 6 | ||||
-rw-r--r-- | lib/util/pm_c_util.h | 4 |
22 files changed, 33 insertions, 29 deletions
diff --git a/converter/other/cameratopam/cameratopam.c b/converter/other/cameratopam/cameratopam.c index 54b68a23..71c9c7af 100644 --- a/converter/other/cameratopam/cameratopam.c +++ b/converter/other/cameratopam/cameratopam.c @@ -69,7 +69,7 @@ int fuji_secondary; float cam_mul[4], pre_mul[4], coeff[3][4]; int histogram[3][0x2000]; jmp_buf failure; -bool use_secondary; +int use_secondary; bool verbose; #ifdef USE_LCMS diff --git a/converter/other/cameratopam/foveon.c b/converter/other/cameratopam/foveon.c index 0198940c..78e40baf 100644 --- a/converter/other/cameratopam/foveon.c +++ b/converter/other/cameratopam/foveon.c @@ -141,8 +141,8 @@ parse_foveon(FILE * const ifp) { void -foveon_coeff(bool * const useCoeffP, - float coeff[3][4]) { +foveon_coeff(int * const useCoeffP, + float coeff[3][4]) { static const float foveon[3][3] = { { 1.4032, -0.2231, -0.1016 }, diff --git a/converter/other/cameratopam/foveon.h b/converter/other/cameratopam/foveon.h index 57be2244..f3177e50 100644 --- a/converter/other/cameratopam/foveon.h +++ b/converter/other/cameratopam/foveon.h @@ -10,5 +10,5 @@ void foveon_load_raw(void); void -foveon_coeff(bool * const useCoeffP, - float coeff[3][4]); +foveon_coeff(int * const useCoeffP, + float coeff[3][4]); diff --git a/converter/other/pamtogif.c b/converter/other/pamtogif.c index 4dac8923..5b9c219c 100644 --- a/converter/other/pamtogif.c +++ b/converter/other/pamtogif.c @@ -220,7 +220,7 @@ closestColor(tuple const color, unsigned int i; unsigned int imin, dmin; - bool fits; + int fits; dmin = UINT_MAX; imin = 0; @@ -1544,7 +1544,7 @@ computeTransparent(char const colorarg[], const char * colorspec; bool exact; tuple transcolor; - bool found; + int found; int colorindex; if (colorarg[0] == '=') { diff --git a/converter/other/pamtooctaveimg.c b/converter/other/pamtooctaveimg.c index b090281d..28bc4cd4 100644 --- a/converter/other/pamtooctaveimg.c +++ b/converter/other/pamtooctaveimg.c @@ -75,13 +75,13 @@ findOrAddColor(tuple const color, colormap *cmapP. If the color isn't in the map, give it a new colormap index, put it in the colormap, and return that. -----------------------------------------------------------------------------*/ - bool found; + int found; int colorIndex; pnm_lookuptuple(&cmapP->pam, cmapP->hash, color, &found, &colorIndex); if (!found) { - bool fits; + int fits; unsigned int plane; colorIndex = cmapP->nColors++; diff --git a/converter/other/pamtopam.c b/converter/other/pamtopam.c index cae54060..9cb82f7a 100644 --- a/converter/other/pamtopam.c +++ b/converter/other/pamtopam.c @@ -17,7 +17,7 @@ int main(int argc, const char * argv[]) { - bool eof; /* no more images in input stream */ + int eof; /* no more images in input stream */ struct pam inpam; /* Input PAM image */ struct pam outpam; /* Output PAM image */ diff --git a/converter/other/pamtopnm.c b/converter/other/pamtopnm.c index ba655b1e..9bb662b7 100644 --- a/converter/other/pamtopnm.c +++ b/converter/other/pamtopnm.c @@ -109,7 +109,7 @@ main(int argc, char *argv[]) { struct cmdlineInfo cmdline; FILE* ifP; - bool eof; /* no more images in input stream */ + int eof; /* no more images in input stream */ struct pam inpam; /* Input PAM image */ struct pam outpam; /* Output PNM image */ diff --git a/converter/other/pamtosrf.c b/converter/other/pamtosrf.c index 19328073..3800d77c 100644 --- a/converter/other/pamtosrf.c +++ b/converter/other/pamtosrf.c @@ -112,7 +112,7 @@ srfAlphaFromTuple(tuple const t, const struct pam * const pamP) { uint8_t retval; - bool haveOpacity; + int haveOpacity; unsigned int opacityPlane; pnm_getopacity(pamP, &haveOpacity, &opacityPlane); @@ -181,7 +181,7 @@ main(int argc, const char * argv[]) { struct cmdlineInfo cmdline; FILE * ifP; struct srf srf; - bool eof; /* No more images in input */ + int eof; /* No more images in input */ unsigned int imageSeq; /* Sequence of current image in input file. First = 0 */ diff --git a/converter/other/pamtotiff.c b/converter/other/pamtotiff.c index 551909a0..0206678d 100644 --- a/converter/other/pamtotiff.c +++ b/converter/other/pamtotiff.c @@ -1055,7 +1055,7 @@ main(int argc, char *argv[]) { const char * inputFileDescription; FILE* ifP; TIFF* tifP; - bool eof; + int eof; unsigned int imageSeq; pnm_init(&argc, argv); diff --git a/converter/other/pamtowinicon.c b/converter/other/pamtowinicon.c index f3e06a08..159177e1 100644 --- a/converter/other/pamtowinicon.c +++ b/converter/other/pamtowinicon.c @@ -1015,7 +1015,7 @@ convert(FILE * const ifP, a PNG image. Otherwise, use a BMP. -----------------------------------------------------------------------------*/ unsigned int imageNum; - bool eof; + int eof; for (imageNum = 0, eof = false; !eof; ++imageNum) { convertOneImage(imageNum, ifP, pngThreshold, mustBlackenXor, diff --git a/converter/other/pamtoxvmini.c b/converter/other/pamtoxvmini.c index e1aa9b52..b57bcc74 100644 --- a/converter/other/pamtoxvmini.c +++ b/converter/other/pamtoxvmini.c @@ -152,14 +152,14 @@ getPaletteIndexThroughCache(struct pam * const pamP, If the tuple-index association is in *paletteIndexP, use it. If not, find it the hard way and add it to *palettedIndexP for the next guy. -----------------------------------------------------------------------------*/ - bool found; + int found; int paletteIndex; pnm_lookuptuple(pamP, paletteHash, tuple, &found, &paletteIndex); if (found) *paletteIndexP = paletteIndex; else { - bool fits; + int fits; findClosestColor(pamP, tuple, xvPaletteP, paletteIndexP); pnm_addtotuplehash(pamP, paletteHash, tuple, *paletteIndexP, &fits); diff --git a/converter/other/pnmtopclxl.c b/converter/other/pnmtopclxl.c index 83fdf7bf..4cd7c4d0 100644 --- a/converter/other/pnmtopclxl.c +++ b/converter/other/pnmtopclxl.c @@ -1177,7 +1177,7 @@ printPages(int const outFd, while (sourceP) { FILE * ifP; struct pam pam; - bool eof; + int eof; unsigned int pageNum; ifP = pm_openr(sourceP->name); diff --git a/converter/other/pnmtopng.c b/converter/other/pnmtopng.c index 2feced6a..bcb94612 100644 --- a/converter/other/pnmtopng.c +++ b/converter/other/pnmtopng.c @@ -2630,7 +2630,7 @@ convertpnm(struct cmdlineInfo const cmdline, /* The color that is to be transparent, with maxval equal to that of the input image. */ - int transExact; + bool transExact; /* boolean: the user wants only the exact color he specified to be transparent; not just something close to it. */ diff --git a/converter/pbm/pbmtolj.c b/converter/pbm/pbmtolj.c index 89dcb76c..0cceb4fe 100644 --- a/converter/pbm/pbmtolj.c +++ b/converter/pbm/pbmtolj.c @@ -545,7 +545,7 @@ main(int argc, char * argv[]) { struct cmdlineInfo cmdline; FILE * ifP; - bool eof; + int eof; pbm_init(&argc, argv); diff --git a/converter/pbm/pbmtopsg3.c b/converter/pbm/pbmtopsg3.c index 2878686b..8163b70a 100644 --- a/converter/pbm/pbmtopsg3.c +++ b/converter/pbm/pbmtopsg3.c @@ -323,7 +323,7 @@ doPages(FILE * const ifP, unsigned int * const pagesP, double const dpi) { - bool eof; + int eof; unsigned int pagesDone; eof = FALSE; diff --git a/converter/ppm/ppmtompeg/headers/frames.h b/converter/ppm/ppmtompeg/headers/frames.h index f2bcf6ae..966d9214 100644 --- a/converter/ppm/ppmtompeg/headers/frames.h +++ b/converter/ppm/ppmtompeg/headers/frames.h @@ -255,7 +255,6 @@ extern int gopSize; extern int slicesPerFrame; extern int blocksPerSlice; extern int referenceFrame; -extern boolean specificsOn; extern int quietTime; /* shut up for at least quietTime seconds; * negative means shut up forever */ diff --git a/converter/ppm/ppmtompeg/parallel.c b/converter/ppm/ppmtompeg/parallel.c index 50381271..2835c67c 100644 --- a/converter/ppm/ppmtompeg/parallel.c +++ b/converter/ppm/ppmtompeg/parallel.c @@ -968,7 +968,7 @@ IoServer(struct inputSource * const inputSourceP, -----------------------------------------------------------------------------*/ int ioPortNum; int serverSocket; - boolean done; + bool done; unsigned char *bigBuffer; /* A work buffer that we keep around permanently. We increase its size as needed, but never shrink it. diff --git a/doc/HISTORY b/doc/HISTORY index e5348221..331eb316 100644 --- a/doc/HISTORY +++ b/doc/HISTORY @@ -62,7 +62,8 @@ not yet BJH Release 10.63.00 libnetpbm: fix bug: pnm_readpaminit and pnm_writepaminit set 'opacity_plane' member of struct pam incorrectly. No Netpbm - programs are affected. + programs are affected. Always broken (member was added in + Netpbm 10.56 (September 2011)). sparc64 pbmtog3: fix bug that causes crash due to unaligned memory access. diff --git a/editor/pamscale.c b/editor/pamscale.c index 1b3ab8f0..99f7d5c2 100644 --- a/editor/pamscale.c +++ b/editor/pamscale.c @@ -1392,7 +1392,7 @@ outputOneResampledRow(const struct pam * const outpamP, -----------------------------------------------------------------------------*/ unsigned int col; - bool haveOpacity; /* There is an opacity plane */ + int haveOpacity; /* There is an opacity plane */ unsigned int opacityPlane; /* Plane number of opacity plane, if any */ pnm_getopacity(outpamP, &haveOpacity, &opacityPlane); diff --git a/lib/libpammap.c b/lib/libpammap.c index 66aa6fc0..ef373e81 100644 --- a/lib/libpammap.c +++ b/lib/libpammap.c @@ -574,7 +574,7 @@ pnm_computetupletablehash(struct pam * const pamP, -----------------------------------------------------------------------------*/ tuplehash tupletablehash; unsigned int i; - bool fits; + int fits; tupletablehash = pnm_createtuplehash(); diff --git a/lib/libpamn.c b/lib/libpamn.c index bd3fab21..b30bde53 100644 --- a/lib/libpamn.c +++ b/lib/libpamn.c @@ -498,7 +498,7 @@ gammaCommon(struct pam * const pamP, unsigned int plane; unsigned int opacityPlane; - bool haveOpacity; + int haveOpacity; pnm_getopacity(pamP, &haveOpacity, &opacityPlane); @@ -548,7 +548,7 @@ applyopacityCommon(enum applyUnapply const applyUnapply, if the foreground values had already been so multiplied. -----------------------------------------------------------------------------*/ unsigned int opacityPlane; - bool haveOpacity; + int haveOpacity; pnm_getopacity(pamP, &haveOpacity, &opacityPlane); @@ -645,7 +645,7 @@ createUngammaMapOffset(const struct pam * const pamP, MALLOCARRAY(ungammaTransformMap, pamP->maxval+1); if (ungammaTransformMap != NULL) { - bool haveOpacity; + int haveOpacity; unsigned int opacityPlane; unsigned int plane; diff --git a/lib/util/pm_c_util.h b/lib/util/pm_c_util.h index f17d1e03..6fec12ff 100644 --- a/lib/util/pm_c_util.h +++ b/lib/util/pm_c_util.h @@ -63,6 +63,9 @@ #endif /* C++ has a bool type and false and true constants built in. */ #ifndef __cplusplus +#ifndef NOT_EXPERIMENTING +#include <stdbool.h> /* DEBUG */ +#else #ifndef HAVE_BOOL #define HAVE_BOOL 1 typedef int bool; @@ -71,6 +74,7 @@ enum boolvalue {false=0, true=1}; #endif #endif +#endif #define ARRAY_SIZE(x) (sizeof(x)/sizeof(x[0])) |