Bug 57909 - xpmtoppm generates false errors
xpmtoppm generates false errors
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: netpbm (Show other bugs)
7.2
All Linux
medium Severity medium
: ---
: ---
Assigned To: Phil Knirsch
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-12-31 17:44 EST by Kyle Bateman
Modified: 2015-03-04 20:10 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2002-02-24 12:43:42 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Kyle Bateman 2001-12-31 17:44:46 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.6+) Gecko/20011218

Description of problem:
xpmtoppm sometimes breaks (in a different way) on both format 1 and format
3 xpm files.  Some old format 1 xpm's just start out with no /* XPM */
header.  xpmtoppm gobbles this first line up, expecting it to always be a
header when in some cases, it has the first #define line on it (on older
xpm's).

xpmtoppm also fails on some format 3 xpms as I will demonstrate below.  I'm
not sure what causes this problem.



Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1.xpmtoppm /etc/X11/xdm/pixmaps/XFree86.xpm
2.
3.
	

Actual Results:  I get the error message:

xpmtoppm: error scanning assignment line

Expected Results:  I should get a bunch of ppm pixel data output.


Additional info:

I couldn't find any format 1 xpms in the distribution so here is an example
of one from the tgif distribution that used to work with xpmtoppm. 
xpmtoppm fails to translate this file now.

#define tgificon1_format 1
#define tgificon1_width 53
#define tgificon1_height 53
#define tgificon1_ncolors 13
#define tgificon1_chars_per_pixel 2
static char *tgificon1_colors[] = {
   "``", "None",
   "a1", "White",
   "a2", "#00000000c000",
   "a3", "yellow",
   "a4", "#820782070000",
   "a5", "#ffff00000000",
   "a6", "#3cf3fbee34d2",
   "a7", "#3cf3fbed34d3",
   "a8", "#ffffa6990000",
   "a9", "#ffff0000fffe",
   "b0", "black",
   "b1", "#fffe0000fffe",
   "b2", "#fffe00000000"
};
static char *tgificon1_pixels[] = {
"````````````````````````````````````````````````a2a2a2````````````````````````````````````````````````````",
"``````````````````````````````````````````````a2a2a2a2a2``````````````````````````````````````````````````",
"````````````````````````````````````````````a2a2a2a2a2a2a2````````````````````````````````````````````````",
"``````````````````````````````````````````a2a2a2a2a2a2a2a2a2``````````````````````````````````````````````",
"````````````````````````````````````````a2a2a2a2a2a3a2a2a2a2a2````````````````````````````````````````````",
"``````````````````````````````````````a2a2a2a2a2a3a3a3a2a2a2a2a2``````````````````````````````````````````",
"````````````````````````````````````a2a2a2a2a2a3a3a3a3a3a2a2a2a2a2````````````````````````````````````````",
"``````````````````````````````````a2a2a2a2a2a3a3a3a3a3a3a3a2a2a2a2a2``````````````````````````````````````",
"````````````````````````````````a2a2a2a2a2a3a3a3a3a3a3a3a3a3a2a2a2a2a2````````````````````````````````````",
"``````````````````````````````a2a2a2a2a2a3a3a3a3a3a3a3a3a3a3a3a2a2a2a2a2``````````````````````````````````",
"````````````````````````````a2a2a2a2a2a3a3a3a3a3a3a3a3a3a3a3a3a3a2a2a2a2a2````````````````````````````````",
"``````````````````````````a2a2a2a2a2a3a3a3a3a3a3a3a3a3a3a3a3a3a3a3a2a2a2a2a2``````````````````````````````",
"````````````````````````a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2````````````````````````````",
"``````````````````````a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2``````````````````````````",
"````````````````````a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2````````````````````````",
"``````````````````a2a2a2a2a2a2a3a3a3a3a3a3a3a3a3a2a2a2a2a2a2a3a3a3a3a3a3a3a2a2a2a2a2``````````````````````",
"````````````````a2a2a2a2a2a2a2a3a3a3a3a3a3a3a3a3a2a2a2a2a2a2a2a3a3a3a3a3a3a3a2a2a2a2a2````````````````````",
"``````````````a2a2a2a2a2a2a2a2a3a3a3a3a3a3a3a3a3a2a2a2a2a2a2a2a2a3a3a3a3a3a3a3a2a2a2a2a2``````````````````",
"````````````a2a2a2a2a2a3a2a2a2a3a3a3a3a3a3a3a3a3a2a2a2a3a2a2a2a2a2a3a3a3a3a3a3a3a2a2a2a2a2````````````````",
"``````````a2a2a2a2a2a3a3a2a2a2a3a3a3a3a3a3a3a3a3a2a2a2a3a3a2a2a2a2a2a3a3a3a3a3a3a3a2a2a2a2a2``````````````",
"````````a2a2a2a2a2a3a3a3a2a2a2a3a3a3a3a3a3a3a3a3a2a2a2a3a3a3a2a2a2a2a2a3a3a3a3a3a3a3a2a2a2a2a2````````````",
"``````a2a2a2a2a2a3a3a3a3a2a2a2a3a3a3a3a3a3a3a3a3a2a2a2a3a3a3a3a2a2a2a2a2a3a3a3a3a3a3a3a2a2a2a2a2``````````",
"````a2a2a2a2a2a3a3a3a3a3a2a2a2a3a3a3a3a3a3a3a3a3a2a2a2a3a3a3a3a3a2a2a2a2a2a3a3a3a3a3a3a3a2a2a2a2a2````````",
"``a2a2a2a2a2a3a3a3a3a3a3a2a2a2a3a3a3a3a3a3a3a3a3a2a2a2a3a3a3a3a3a3a2a2a2a2a2a3a3a3a3a3a3a3a2a2a2a2a2``````",
"a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2````",
"a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a4``",
"a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a4a4",
"``a2a2a2a2a2a3a3a3a3a3a3a3a3a3a3a3a3a3a3a3a3a3a3a2a2a2a3a3a3a3a3a3a3a3a3a3a3a3a3a3a3a3a3a3a2a2a2a2a2a4a4a4",
"````a2a2a2a2a2a3a3a3a3a3a3a3a3a3a3a3a3a3a3a3a3a3a2a2a2a3a3a3a3a3a3a3a3a3a3a3a3a3a3a3a3a3a2a2a2a2a2a4a4a4a4",
"``````a2a2a2a2a2a3a3a5a5a5a5a5a5a5a5a3a3a3a3a6a6a6a6a2a3a3a3a3a8a8a3a3a3a9a9a9a9a9a9a9a2a2a2a2a2a4a4a4a4``",
"````````a2a2a2a2a2a5a5a5a5a5a5a5a5b0b0a3a6a6a6a6a6a6a6a3a3a3a3a8a8b0a3a3a9a9a9a9a9a9a9b0a2a2a2a4a4a4a4````",
"``````````a2a2a2a2a2b0b0a5a5b0b0b0b0a3a6a6a6b0b0b0a6a6a6a3a3a3a8a8b0a3a3a9a9b0b0b0b0b0b0a2a2a4a4a4a4``````",
"````````````a2a2a2a2a2a3a5a5b0a3a3a3a3a6a6b0b0a3a2a2a6a6b0a3a8a8a8b0a3a9a9a9b0a3a2a2a2a2a2a4a4a4a4````````",
"``````````````a2a2a2a2a2a5a5b0a3a3a3a6a6b0b0a3a3a2a2a2b0b0a3a8a8b0b0a3a9a9a9a9a9a9a9a2a2a4a4a4a4``````````",
"````````````````a2a2a2a5a5b0b0a3a3a3a6a6b0a3a3a6a6a6a6a6a3a3a8a8b0a3a3a9a9a9a9a9a9a9b0a4a4a4a4````````````",
"``````````````````a2a2a5a5b0a3a3a3a3a6a6b0a3a3a6a6a6a6b0b0a3a8a8b0a3a3a9a9b0b0b0b0b0b0a4a4a4``````````````",
"````````````````````a2a5a5b0a2a3a3a3a6a6b0a3a3a3b0a6a6b0a3a8a8a8b0a3a3a9a9b0a2a2a2a4a4a4a4````````````````",
"````````````````````a5a5b0b0a2a2a3a3a6a6a6a3a3a3a6a6a6b0a3a8a8b0b0a3a9a9a9b0a2a2a4a4a4a4``````````````````",
"````````````````````a5a5b0a2a2a2a2a3a3a6a6a6a6a6a6a6a6b0a3a8a8b0a3a3a9a9b0b0a2a4a4a4a4````````````````````",
"````````````````````a5a5b0a2a2a2a2a2a3a3a6a6a6a6b0a6a6b0a3a8a8b0a3a2a9a9b0a2a4a4a4a4``````````````````````",
"``````````````````````b0b0``a2a2a2a2a2a3a3b0b0b0b0a2b0b0a3a3b0b0a2a2a2b0b0a4a4a4a4````````````````````````",
"``````````````````````````````a2a2a2a2a2a3a3a3a3a2a2a2a3a3a3a3a2a2a2a2a2a4a4a4a4``````````````````````````",
"````````````````````````````````a2a2a2a2a2a3a3a3a2a2a2a3a3a3a2a2a2a2a2a4a4a4a4````````````````````````````",
"``````````````````````````````````a2a2a2a2a2a3a3a2a2a2a3a3a2a2a2a2a2a4a4a4a4``````````````````````````````",
"````````````````````````````````````a2a2a2a2a2a3a2a2a2a3a2a2a2a2a2a4a4a4a4````````````````````````````````",
"``````````````````````````````````````a2a2a2a2a2a2a2a2a2a2a2a2a2a4a4a4a4``````````````````````````````````",
"````````````````````````````````````````a2a2a2a2a2a2a2a2a2a2a2a4a4a4a4````````````````````````````````````",
"``````````````````````````````````````````a2a2a2a2a2a2a2a2a2a4a4a4a4``````````````````````````````````````",
"````````````````````````````````````````````a2a2a2a2a2a2a2a4a4a4a4````````````````````````````````````````",
"``````````````````````````````````````````````a2a2a2a2a2a4a4a4a4``````````````````````````````````````````",
"````````````````````````````````````````````````a2a2a2a4a4a4a4````````````````````````````````````````````",
"``````````````````````````````````````````````````a4a4a4a4a4``````````````````````````````````````````````",
"````````````````````````````````````````````````````a4a4a4````````````````````````````````````````````````"
};
Comment 1 Phil Knirsch 2002-02-24 12:43:38 EST
I've looked at the problem, it's a bug in the parser. I am not sure, but maybe
the rawhide version of netpbm (9.20-2) has it already fixed (don't remember the
official changelog anymore ;-).

If you could give that version a shot and report if it fixes that problem i'd
greately appreciate it.

Thanks,

Read ya, Phil
Comment 2 Phil Knirsch 2002-03-12 09:44:32 EST
OK, the latest version of netpbm seems to have a fixed parser, at least i works
with the given example again (with the exception of 'None' not being defined as
a color).

Packages sould appear over the next few days in rawhide.

Read ya, Phil

Note You need to log in before you can comment on or make changes to this bug.