diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2012-07-23 15:27:17 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2012-07-23 15:27:17 +0000 |
commit | 5974339a3ea63d086f8fba466dfc83c42a600cd9 (patch) | |
tree | 77fd05ef64813bcf4eccad9ab250098d8b3d11f2 | |
parent | e6b07f017511df16cb2bab8ce8012c24a7dcb0c9 (diff) | |
download | netpbm-mirror-5974339a3ea63d086f8fba466dfc83c42a600cd9.tar.gz netpbm-mirror-5974339a3ea63d086f8fba466dfc83c42a600cd9.tar.xz netpbm-mirror-5974339a3ea63d086f8fba466dfc83c42a600cd9.zip |
Release 10.35.86
git-svn-id: http://svn.code.sf.net/p/netpbm/code/super_stable@1724 9d0c8265-081b-0410-96cb-a4ca84ce46f8
-rw-r--r-- | Makefile.version | 2 | ||||
-rw-r--r-- | converter/ppm/ppmtobmp.c | 4 | ||||
-rw-r--r-- | converter/ppm/xpmtoppm.c | 36 | ||||
-rw-r--r-- | doc/HISTORY | 8 |
4 files changed, 29 insertions, 21 deletions
diff --git a/Makefile.version b/Makefile.version index 7d146e5c..fdb9509e 100644 --- a/Makefile.version +++ b/Makefile.version @@ -1,3 +1,3 @@ NETPBM_MAJOR_RELEASE = 10 NETPBM_MINOR_RELEASE = 35 -NETPBM_POINT_RELEASE = 85 +NETPBM_POINT_RELEASE = 86 diff --git a/converter/ppm/ppmtobmp.c b/converter/ppm/ppmtobmp.c index 071f3b12..635464dd 100644 --- a/converter/ppm/ppmtobmp.c +++ b/converter/ppm/ppmtobmp.c @@ -471,7 +471,7 @@ BMPEncode(FILE * const ifP, if (nbyte != (BMPlenfileheader(class) + BMPleninfoheader(class) - + BMPlencolormap(class, bpp, -1))) + + BMPlencolormap(class, bpp, 0))) pm_error(er_internal, "BMPEncode 1"); nbyte += BMPwritebits(ifP, x, y, colortype, bpp, pixels, maxval, @@ -530,7 +530,7 @@ BMPEncodePBM(FILE * const ifP, if (nbyte != (BMPlenfileheader(class) + BMPleninfoheader(class) - + BMPlencolormap(class, 1, -1))) + + BMPlencolormap(class, 1, 0))) pm_error(er_internal, "BMPEncodePBM 1"); for (row = 0; row < rows; ++row){ diff --git a/converter/ppm/xpmtoppm.c b/converter/ppm/xpmtoppm.c index 96996c6b..bb6a7a0d 100644 --- a/converter/ppm/xpmtoppm.c +++ b/converter/ppm/xpmtoppm.c @@ -121,7 +121,7 @@ static bool backup; static void -getline(char * const line, +getLine(char * const line, size_t const size, FILE * const stream) { /*---------------------------------------------------------------------------- @@ -139,7 +139,7 @@ getline(char * const line, Exit program if the line doesn't fit in the buffer. -----------------------------------------------------------------------------*/ if (size > sizeof(lastInputLine)) - pm_error("INTERNAL ERROR: getline() received 'size' parameter " + pm_error("INTERNAL ERROR: getLine() received 'size' parameter " "which is out of bounds"); if (backup) { @@ -355,7 +355,7 @@ readXpm3Header(FILE * const stream, int * const widthP, int * const heightP, int * const transparentP) { /*---------------------------------------------------------------------------- Read the header of the XPM file on stream 'stream'. Assume the - getline() stream is presently positioned to the beginning of the + getLine() stream is presently positioned to the beginning of the file and it is a Version 3 XPM file. Leave the stream positioned after the header. @@ -386,25 +386,25 @@ readXpm3Header(FILE * const stream, int * const widthP, int * const heightP, *widthP = *heightP = *ncolorsP = *chars_per_pixelP = -1; /* Read the XPM signature comment */ - getline(line, sizeof(line), stream); + getLine(line, sizeof(line), stream); if (strncmp(line, xpm3_signature, strlen(xpm3_signature)) != 0) pm_error("Apparent XPM 3 file does not start with '/* XPM */'. " "First line is '%s'", xpm3_signature); /* Read the assignment line */ - getline(line, sizeof(line), stream); + getLine(line, sizeof(line), stream); if (strncmp(line, "static char", 11) != 0) pm_error("Cannot find data structure declaration. Expected a " "line starting with 'static char', but found the line " "'%s'.", line); /* Read the hints line */ - getline(line, sizeof(line), stream); + getLine(line, sizeof(line), stream); /* skip the comment line if any */ if (!strncmp(line, "/*", 2)) { while (!strstr(line, "*/")) - getline(line, sizeof(line), stream); - getline(line, sizeof(line), stream); + getLine(line, sizeof(line), stream); + getLine(line, sizeof(line), stream); } if (sscanf(line, "\"%d %d %d %d\",", widthP, heightP, ncolorsP, chars_per_pixelP) != 4) @@ -438,10 +438,10 @@ readXpm3Header(FILE * const stream, int * const widthP, int * const heightP, *transparentP = -1; /* initial value */ for (seqNum = 0; seqNum < *ncolorsP; seqNum++) { - getline(line, sizeof(line), stream); + getLine(line, sizeof(line), stream); /* skip the comment line if any */ if (!strncmp(line, "/*", 2)) - getline(line, sizeof(line), stream); + getLine(line, sizeof(line), stream); interpretXpm3ColorTableLine(line, seqNum, *chars_per_pixelP, *colorsP, *ptabP, transparentP); @@ -456,7 +456,7 @@ readXpm1Header(FILE * const stream, int * const widthP, int * const heightP, pixel ** const colorsP, int ** const ptabP) { /*---------------------------------------------------------------------------- Read the header of the XPM file on stream 'stream'. Assume the - getline() stream is presently positioned to the beginning of the + getLine() stream is presently positioned to the beginning of the file and it is a Version 1 XPM file. Leave the stream positioned after the header. @@ -476,7 +476,7 @@ readXpm1Header(FILE * const stream, int * const widthP, int * const heightP, /* Read the initial defines. */ processedStaticChar = FALSE; while (!processedStaticChar) { - getline(line, sizeof(line), stream); + getLine(line, sizeof(line), stream); if (sscanf(line, "#define %s %d", str1, &v) == 2) { char *t1; @@ -524,7 +524,7 @@ readXpm1Header(FILE * const stream, int * const widthP, int * const heightP, /* If there's a monochrome color table, skip it. */ if (!strncmp(t1, "mono", 4)) { for (;;) { - getline(line, sizeof(line), stream); + getLine(line, sizeof(line), stream); if (!strncmp(line, "static char", 11)) break; } @@ -547,7 +547,7 @@ readXpm1Header(FILE * const stream, int * const widthP, int * const heightP, /* Read color table. */ for (i = 0; i < *ncolorsP; ++i) { - getline(line, sizeof(line), stream); + getLine(line, sizeof(line), stream); if ((t1 = strchr(line, '"')) == NULL) pm_error("D error scanning color table"); @@ -583,7 +583,7 @@ readXpm1Header(FILE * const stream, int * const widthP, int * const heightP, "static char ..."). */ for (;;) { - getline(line, sizeof(line), stream); + getLine(line, sizeof(line), stream); if (strncmp(line, "static char", 11) == 0) break; } @@ -687,7 +687,7 @@ ReadXPMFile(FILE * const stream, int * const widthP, int * const heightP, backup = FALSE; /* Read the header line */ - getline(line, sizeof(line), stream); + getLine(line, sizeof(line), stream); backup = TRUE; /* back up so next read reads this line again */ rc = sscanf(line, "/* %s */", str1); @@ -707,7 +707,7 @@ ReadXPMFile(FILE * const stream, int * const widthP, int * const heightP, pm_error("Could not get %d bytes of memory for image", totalpixels); cursor = *dataP; maxcursor = *dataP + totalpixels - 1; - getline(line, sizeof(line), stream); + getLine(line, sizeof(line), stream); /* read next line (first line may not always start with comment) */ while (cursor <= maxcursor) { if (strncmp(line, "/*", 2) == 0) { @@ -717,7 +717,7 @@ ReadXPMFile(FILE * const stream, int * const widthP, int * const heightP, ncolors, ptab, &cursor, maxcursor); } if (cursor <= maxcursor) - getline(line, sizeof(line), stream); + getLine(line, sizeof(line), stream); } if (ptab) free(ptab); } diff --git a/doc/HISTORY b/doc/HISTORY index 3f8aaf15..1d32e85a 100644 --- a/doc/HISTORY +++ b/doc/HISTORY @@ -4,6 +4,14 @@ Netpbm. CHANGE HISTORY -------------- +12.07.23 BJH Release 10.35.86 + + ppmtobmp: fix failure with "internal error" message on all + uses. Broken in 10.35.78. + + Build: rename getline() in xpmtoppm.c to avoid collision + with some libc. Always broken. + 12.06.21 BJH Release 10.35.85 configure: work around Perl bug that causes 'configure' to |