summaryrefslogtreecommitdiff
path: root/graphics/netpbm
diff options
context:
space:
mode:
authorsmb <smb@pkgsrc.org>2009-07-18 03:04:41 +0000
committersmb <smb@pkgsrc.org>2009-07-18 03:04:41 +0000
commit5c2b93992d9ef832939b20f7bd7d906d4ca6f528 (patch)
tree1093c81e70f2304c0461320f9351cad166d93f9a /graphics/netpbm
parent0113700998bbc016f4da3b8fed1dbe528c2657e8 (diff)
downloadpkgsrc-5c2b93992d9ef832939b20f7bd7d906d4ca6f528.tar.gz
Change getline() to get_line()
Diffstat (limited to 'graphics/netpbm')
-rw-r--r--graphics/netpbm/Makefile4
-rw-r--r--graphics/netpbm/distinfo4
-rw-r--r--graphics/netpbm/patches/patch-ea39
-rw-r--r--graphics/netpbm/patches/patch-eb147
4 files changed, 191 insertions, 3 deletions
diff --git a/graphics/netpbm/Makefile b/graphics/netpbm/Makefile
index 1eabff58ff1..e322601c10d 100644
--- a/graphics/netpbm/Makefile
+++ b/graphics/netpbm/Makefile
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.161 2009/06/14 22:58:01 joerg Exp $
+# $NetBSD: Makefile,v 1.162 2009/07/18 03:04:41 smb Exp $
DISTNAME= netpbm-10.34
-PKGREVISION= 1
+PKGREVISION= 2
CATEGORIES= graphics
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=netpbm/}
EXTRACT_SUFX= .tgz
diff --git a/graphics/netpbm/distinfo b/graphics/netpbm/distinfo
index a2d769c1e5a..afd9bc4cf57 100644
--- a/graphics/netpbm/distinfo
+++ b/graphics/netpbm/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.67 2009/04/07 08:09:06 hasso Exp $
+$NetBSD: distinfo,v 1.68 2009/07/18 03:04:41 smb Exp $
SHA1 (netpbm-10.34.tgz) = 530458871f9d3dc763a1bf82f227eeb79098c601
RMD160 (netpbm-10.34.tgz) = 57a596efa6cacb981135d554a72cbaffc4cfe72c
@@ -34,4 +34,6 @@ SHA1 (patch-da) = 37b30f7b6674150685d406570802a7250dce51a6
SHA1 (patch-db) = 028f1c8b879d640f3f04dfb252c5efca21949031
SHA1 (patch-dc) = 8ed1365dccf5abb0e158a4f7a65749ff5b244ef3
SHA1 (patch-dd) = b64f1826549ffd949e19cb986e1e367918ccf5ba
+SHA1 (patch-ea) = 49a135fe2466636f73e328ec67202dca065ce764
+SHA1 (patch-eb) = 5c3dfac08038fce372fabc7c526081bb8051e908
SHA1 (patch-ppmdraw) = d901a690f8f21a1af940129d1edef509b369ea1a
diff --git a/graphics/netpbm/patches/patch-ea b/graphics/netpbm/patches/patch-ea
new file mode 100644
index 00000000000..80032f0df9a
--- /dev/null
+++ b/graphics/netpbm/patches/patch-ea
@@ -0,0 +1,39 @@
+$NetBSD: patch-ea,v 1.1 2009/07/18 03:04:41 smb Exp $
+
+--- converter/ppm/xvminitoppm.c.orig 2009-07-17 22:51:05.000000000 -0400
++++ converter/ppm/xvminitoppm.c 2009-07-17 22:51:42.000000000 -0400
+@@ -52,7 +52,7 @@
+
+
+ static void
+-getline(FILE * const ifP,
++get_line(FILE * const ifP,
+ char * const buf,
+ size_t const size) {
+
+@@ -105,7 +105,7 @@
+ int rc;
+ bool endOfComments;
+
+- getline(ifP, buf, sizeof(buf));
++ get_line(ifP, buf, sizeof(buf));
+
+ if (!STRNEQ(buf, "P7 332", 6))
+ pm_error("Input is not a XV thumbnail picture. It does not "
+@@ -113,14 +113,14 @@
+
+ endOfComments = FALSE;
+ while (!endOfComments) {
+- getline(ifP, buf, sizeof(buf));
++ get_line(ifP, buf, sizeof(buf));
+ if (STRNEQ(buf, "#END_OF_COMMENTS", 16))
+ endOfComments = TRUE;
+ else if (STRNEQ(buf, "#BUILTIN", 8))
+ pm_error("This program does not know how to "
+ "convert builtin XV thumbnail pictures");
+ }
+- getline(ifP, buf, sizeof(buf));
++ get_line(ifP, buf, sizeof(buf));
+ rc = sscanf(buf, "%u %u %u", &cols, &rows, &maxval);
+ if (rc != 3)
+ pm_error("error parsing dimension info '%s'. "
diff --git a/graphics/netpbm/patches/patch-eb b/graphics/netpbm/patches/patch-eb
new file mode 100644
index 00000000000..5e177baab8f
--- /dev/null
+++ b/graphics/netpbm/patches/patch-eb
@@ -0,0 +1,147 @@
+$NetBSD: patch-eb,v 1.1 2009/07/18 03:04:41 smb Exp $
+
+--- converter/ppm/xpmtoppm.c.orig 2009-07-17 22:51:13.000000000 -0400
++++ converter/ppm/xpmtoppm.c 2009-07-17 22:51:33.000000000 -0400
+@@ -121,7 +121,7 @@
+
+
+ static void
+-getline(char * const line,
++get_line(char * const line,
+ size_t const size,
+ FILE * const stream) {
+ /*----------------------------------------------------------------------------
+@@ -139,7 +139,7 @@
+ 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: get_line() received 'size' parameter "
+ "which is out of bounds");
+
+ if (backup) {
+@@ -355,7 +355,7 @@
+ 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
++ get_line() 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 @@
+ *widthP = *heightP = *ncolorsP = *chars_per_pixelP = -1;
+
+ /* Read the XPM signature comment */
+- getline(line, sizeof(line), stream);
++ get_line(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);
++ get_line(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);
++ get_line(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);
++ get_line(line, sizeof(line), stream);
++ get_line(line, sizeof(line), stream);
+ }
+ if (sscanf(line, "\"%d %d %d %d\",", widthP, heightP,
+ ncolorsP, chars_per_pixelP) != 4)
+@@ -438,10 +438,10 @@
+ *transparentP = -1; /* initial value */
+
+ for (seqNum = 0; seqNum < *ncolorsP; seqNum++) {
+- getline(line, sizeof(line), stream);
++ get_line(line, sizeof(line), stream);
+ /* skip the comment line if any */
+ if (!strncmp(line, "/*", 2))
+- getline(line, sizeof(line), stream);
++ get_line(line, sizeof(line), stream);
+
+ interpretXpm3ColorTableLine(line, seqNum, *chars_per_pixelP,
+ *colorsP, *ptabP, transparentP);
+@@ -456,7 +456,7 @@
+ 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
++ get_line() 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.
+
+@@ -475,7 +475,7 @@
+ /* Read the initial defines. */
+ processedStaticChar = FALSE;
+ while (!processedStaticChar) {
+- getline(line, sizeof(line), stream);
++ get_line(line, sizeof(line), stream);
+
+ if (sscanf(line, "#define %s %d", str1, &v) == 2) {
+ char *t1;
+@@ -523,7 +523,7 @@
+ /* If there's a monochrome color table, skip it. */
+ if (!strncmp(t1, "mono", 4)) {
+ for (;;) {
+- getline(line, sizeof(line), stream);
++ get_line(line, sizeof(line), stream);
+ if (!strncmp(line, "static char", 11))
+ break;
+ }
+@@ -546,7 +546,7 @@
+
+ /* Read color table. */
+ for (i = 0; i < *ncolorsP; ++i) {
+- getline(line, sizeof(line), stream);
++ get_line(line, sizeof(line), stream);
+
+ if ((t1 = strchr(line, '"')) == NULL)
+ pm_error("D error scanning color table");
+@@ -582,7 +582,7 @@
+ "static char ...").
+ */
+ for (;;) {
+- getline(line, sizeof(line), stream);
++ get_line(line, sizeof(line), stream);
+ if (strncmp(line, "static char", 11) == 0)
+ break;
+ }
+@@ -686,7 +686,7 @@
+ backup = FALSE;
+
+ /* Read the header line */
+- getline(line, sizeof(line), stream);
++ get_line(line, sizeof(line), stream);
+ backup = TRUE; /* back up so next read reads this line again */
+
+ rc = sscanf(line, "/* %s */", str1);
+@@ -706,7 +706,7 @@
+ pm_error("Could not get %d bytes of memory for image", totalpixels);
+ cursor = *dataP;
+ maxcursor = *dataP + totalpixels - 1;
+- getline(line, sizeof(line), stream);
++ get_line(line, sizeof(line), stream);
+ /* read next line (first line may not always start with comment) */
+ while (cursor <= maxcursor) {
+ if (strncmp(line, "/*", 2) == 0) {
+@@ -716,7 +716,7 @@
+ ncolors, ptab, &cursor, maxcursor);
+ }
+ if (cursor <= maxcursor)
+- getline(line, sizeof(line), stream);
++ get_line(line, sizeof(line), stream);
+ }
+ if (ptab) free(ptab);
+ }