[12002] in Athena Bugs

home help back first fref pref prev next nref lref last post

pic bug

daemon@ATHENA.MIT.EDU (scs@MIT.EDU)
Tue May 3 07:50:58 1994

From: scs@MIT.EDU
Date: Tue, 3 May 94 07:50:47 -0400
To: bugs@MIT.EDU
Cc: cfields@MIT.EDU, scs@MIT.EDU

I've noticed for a while that pic on athena machines doesn't
always work well.  The problem only shows up if you try to set
non-default dimensions for things, and it does *not* show up on
Vaxen, although it seems to show up on all other host types.

You can reproduce the problem with the following command:

	(echo ".sp 1i"; echo .PS; echo 'box ht 1 wid 1 "hello," "world"'; echo .PE) | pic | psroff -t | lpr

When run on a Vax, this will produce a box one inch square with
some words in it.  On any other host, if will produce a
microscopic, vestigial box (which you may not even be able to
see) with some words on top of it.

The fact that the failure is inability to read explicit sizes
correctly suggests that atof() is misdeclared in pic's lexer.
In fact, I happen to have an old (ca. 1986) copy of the pic
sources, and I notice that atof() is declared in pic.h as
returning float.  (Don't worry, my copy of the source is on a
magtape in Seattle; it's not going to get you guys in trouble :-) .)
Since modern, ANSI-compatible compilers occasionally treat
float-valued functions differently (rather than defaulting them,
like practically all other floats in Classic C, to double), I
strongly suspect that this misdeclaration persists in athena's
copy of the pic sources, and that it's the cause of this problem.

Please note that far as I'm concerned, this bug report has
"dogwash" priority.  I don't use pic that often, and I can always
get to a Vax.  More importantly, this is a guest account; I feel
uncomfortable seeming to request that things be fixed for me at
all.  If someone could at least check athena's copy of the pic
sources to see how atof() is declared, I'd appreciate it, as I'll
probably be sending a note to pic's author about the problem.

Thanks.

home help back first fref pref prev next nref lref last post