home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The C Users' Group Library 1994 August
/
wc-cdrom-cusersgrouplibrary-1994-08.iso
/
vol_300
/
334_02
/
readme.bug
< prev
next >
Wrap
Text File
|
1991-02-05
|
2KB
|
47 lines
These two programs demonstrate some of the bugs in the SunOS stdio
library. The explanation, from `help bugs` in gnuplot:
The most important known bug is actually in the stdio library for the
Sun4 operating system (SunOS Sys4-3.2). The "%g" format for `printf`
sometimes incorrectly prints numbers (e.g., 200000.0 as "2"). Thus,
tic mark labels may be incorrect on a Sun4 version of gnuplot. You
may work around it by rescaling your data or by using the `set format`
command to change the tic mark format to "%7.0f" or some other
appropriate format. This appears to have been fixed in SunOS 4.0.
Another bug: On a Sun3 under SunOS 4.0, and on Sun4's under Sys4-3.2
and SunOS 4.0, the `sscanf` routine incorrectly parses "00 12" with
the format "%f %f" and reads 0 and 0 instead of 0 and 12. This
affects data input. If your data file contains X coordinates that are
zero but are specified like '00', '000', etc, then you will read the
wrong Y values. Check your data files or do not use a Sun4 until they
fix the bug. It does NOT appear that this has been fixed in SunOS
4.0, at least by 4.0.3.
compile with
cc printf.c -o printf
cc scanf.c -o scanf
David Kotz
December 1989
----------------
The program mscbug.c demonstrates a bug in Microsoft C 5.1.
The explanation, from `help bugs` in gnuplot:
Microsoft C 5.1 has a nasty bug associated with the %g format for
printf. When any of the formats "%.2g", "%.1g", "%.0g", "%.g" are
used, printf will incorrectly print numbers in the range 1e-4 to 1e-1.
Numbers that should be printed in the %e format are incorrectly
printed in the %f format, with the wrong number of zeros after the
decimal point.
To work around this problem, use the %e or %f formats explicitly.
compile with
cl mscbug.c
Russell Lang
January 1990