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 >
Text File  |  1991-02-05  |  2KB  |  47 lines

  1. These two programs demonstrate some of the bugs in the SunOS stdio
  2. library. The explanation, from `help bugs` in gnuplot:
  3.  
  4.  The most important known bug is actually in the stdio library for the
  5.  Sun4 operating system (SunOS Sys4-3.2). The "%g" format for `printf`
  6.  sometimes incorrectly prints numbers (e.g., 200000.0 as "2").  Thus,
  7.  tic mark labels may be incorrect on a Sun4 version of gnuplot.  You
  8.  may work around it by rescaling your data or by using the `set format`
  9.  command to change the tic mark format to "%7.0f" or some other
  10.  appropriate format. This appears to have been fixed in SunOS 4.0.
  11.  
  12.  Another bug: On a Sun3 under SunOS 4.0, and on Sun4's under Sys4-3.2
  13.  and SunOS 4.0, the `sscanf` routine incorrectly parses "00 12" with
  14.  the format "%f %f" and reads 0 and 0 instead of 0 and 12.  This
  15.  affects data input. If your data file contains X coordinates that are
  16.  zero but are specified like '00', '000', etc, then you will read the
  17.  wrong Y values. Check your data files or do not use a Sun4 until they
  18.  fix the bug. It does NOT appear that this has been fixed in SunOS
  19.  4.0, at least by 4.0.3.
  20.  
  21.  
  22. compile with
  23.   cc printf.c -o printf
  24.   cc scanf.c -o scanf
  25.  
  26. David Kotz
  27. December 1989
  28.  
  29. ----------------
  30.  
  31. The program mscbug.c demonstrates a bug in Microsoft C 5.1.
  32.  
  33. The explanation, from `help bugs` in gnuplot:
  34.  Microsoft C 5.1 has a nasty bug associated with the %g format for
  35.  printf.  When any of the formats "%.2g", "%.1g", "%.0g", "%.g" are
  36.  used, printf will incorrectly print numbers in the range 1e-4 to 1e-1.  
  37.  Numbers that should be printed in the %e format are incorrectly 
  38.  printed in the %f format, with the wrong number of zeros after the 
  39.  decimal point.
  40.  To work around this problem, use the %e or %f formats explicitly.
  41.  
  42. compile with
  43.   cl mscbug.c
  44.  
  45. Russell Lang
  46. January 1990
  47.