pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/graphics/netpbm Change getline() to get_line()
details: https://anonhg.NetBSD.org/pkgsrc/rev/01e4b712c89d
branches: trunk
changeset: 396039:01e4b712c89d
user: smb <smb%pkgsrc.org@localhost>
date: Sat Jul 18 03:04:41 2009 +0000
description:
Change getline() to get_line()
diffstat:
graphics/netpbm/Makefile | 4 +-
graphics/netpbm/distinfo | 4 +-
graphics/netpbm/patches/patch-ea | 39 ++++++++++
graphics/netpbm/patches/patch-eb | 147 +++++++++++++++++++++++++++++++++++++++
4 files changed, 191 insertions(+), 3 deletions(-)
diffs (223 lines):
diff -r 277e23d28f26 -r 01e4b712c89d graphics/netpbm/Makefile
--- a/graphics/netpbm/Makefile Sat Jul 18 02:49:15 2009 +0000
+++ b/graphics/netpbm/Makefile Sat Jul 18 03:04:41 2009 +0000
@@ -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 -r 277e23d28f26 -r 01e4b712c89d graphics/netpbm/distinfo
--- a/graphics/netpbm/distinfo Sat Jul 18 02:49:15 2009 +0000
+++ b/graphics/netpbm/distinfo Sat Jul 18 03:04:41 2009 +0000
@@ -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-db) = 028f1c8b879d640f3f04dfb252c5efca21949031
SHA1 (patch-dc) = 8ed1365dccf5abb0e158a4f7a65749ff5b244ef3
SHA1 (patch-dd) = b64f1826549ffd949e19cb986e1e367918ccf5ba
+SHA1 (patch-ea) = 49a135fe2466636f73e328ec67202dca065ce764
+SHA1 (patch-eb) = 5c3dfac08038fce372fabc7c526081bb8051e908
SHA1 (patch-ppmdraw) = d901a690f8f21a1af940129d1edef509b369ea1a
diff -r 277e23d28f26 -r 01e4b712c89d graphics/netpbm/patches/patch-ea
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/netpbm/patches/patch-ea Sat Jul 18 03:04:41 2009 +0000
@@ -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 -r 277e23d28f26 -r 01e4b712c89d graphics/netpbm/patches/patch-eb
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/netpbm/patches/patch-eb Sat Jul 18 03:04:41 2009 +0000
@@ -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);
+ }
Home |
Main Index |
Thread Index |
Old Index