Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 31 May 1999 19:19:08 +0900 (JST)
From:      candy@kgc.co.jp
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   ports/11956: fix: netpbm can't handle comments int rgb.txt
Message-ID:  <199905311019.TAA42511@xxx.kgc.co.jp>

next in thread | raw e-mail | index | archive | help

>Number:         11956
>Category:       ports
>Synopsis:       fix: netpbm can't handle comments int rgb.txt
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon May 31 03:30:00 PDT 1999
>Closed-Date:
>Last-Modified:
>Originator:     candy
>Release:        FreeBSD 3.2-RELEASE i386
>Organization:
>Environment:

	ports/current

>Description:

	netpbm programs which link ppm/libppm4.c can't handle
	comment line (begins with `!') in /usr/X11R6/lib/X11/rgb.txt

>How-To-Repeat:

	$ ppmtogif -transparent white
	ppmtogif: can't parse color names database line - "! $XConsortium: rgb.txt,v 10.41 94/02/20 18:39:36 rws Exp $

>Fix:

cd /usr/ports/graphics/netpbm
make patch
cd work/netpbm
patch -p < this_patch

--- ppm/libppm4.c.orig	Mon Oct  4 18:12:13 1993
+++ ppm/libppm4.c	Thu Nov  5 16:17:48 1998
@@ -217,6 +217,7 @@
 #endif /* A_RGBENV */
         canonstr( colorname );
         while ( fgets( buf1, sizeof(buf1), f ) != NULL )
+        if (buf1[0] != '!')
             {
             if ( sscanf( buf1, "%ld %ld %ld %[^\n]", &r, &g, &b, buf2 ) != 4 )
                 {
@@ -298,6 +299,7 @@
 #endif /* A_RGBENV */
     best_diff = 32767;
     while ( fgets( buf, sizeof(buf), f ) != NULL )
+        if (buf[0] != '!')
         {
         if ( sscanf( buf, "%d %d %d %[^\n]", &this_r, &this_g, &this_b,
                      this_colorname ) != 4 )

>Release-Note:
>Audit-Trail:
>Unformatted:


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199905311019.TAA42511>