SC 6.14 bug in 'F' command

Lowell Skoog lowell at tc.fluke.COM
Tue Apr 2 11:30:23 AEST 1991


I feel a little funny posting this bug report here since I don't
think SC 6.14 has been posted to comp.sources yet, but here goes...
I have sent a copy of this report to Jeff Buhrt.

The 'F' (format a cell) command does not work right in the SC 6.14
distribution.  The following patch seems to fix the problem.  Please
excuse the "FLUKE" comments.  I need them to locate the fix so that I
can merge or delete it when I receive the next source distribution.

----------------------- start patch ----------------------------------
diff -c sc/format.c:1.1.1.5 sc/format.c:1.2
*** sc/format.c:1.1.1.5	Mon Apr  1 17:07:31 1991
--- sc/format.c	Mon Apr  1 17:07:31 1991
***************
*** 3,9 ****
   * Mark Nagel <nagel at ics.uci.edu>
   * 20 July 1989
   *
!  * $Revision: 1.1.1.5 $
   *
   * bool
   * format(fmt, num, buf, buflen)
--- 3,9 ----
   * Mark Nagel <nagel at ics.uci.edu>
   * 20 July 1989
   *
!  * $Revision: 1.2 $
   *
   * bool
   * format(fmt, num, buf, buflen)
***************
*** 132,138 ****
--- 132,143 ----
  
    if (strlen(fmt) + 1 > fmtlen)
    {	fmtlen = strlen(fmt) + 40;
+ /*
+ FLUKE - bug fix - replace:
  	fmt = tmpfmt1 = xrealloc(tmpfmt1, fmtlen);
+ with the following line:
+ */
+ 	tmpfmt1 = xrealloc(tmpfmt1, fmtlen);
  	tmpfmt2 = xrealloc(tmpfmt2, fmtlen);
  	exptmp = xrealloc(exptmp, fmtlen);
    }
***************
*** 198,204 ****
--- 203,214 ----
      }
    }
    *tp = EOS;
+ /*
+ FLUKE - bug fix - replace:
    fmt = tmpfmt1;
+ with the following line:
+ */
+   fmt = tmpfmt2;
    
    /*
     * extract the exponent from the format if present
----------------------- end patch ------------------------------------

----------------------------------------------------------------------
Lowell Skoog  M/S 223B                             lowell at tc.fluke.COM
John Fluke Mfg. Co. Inc.        {uw-beaver,microsoft,sun}!fluke!lowell
P.O. Box 9090
Everett, WA, USA  98206-9090                            (206) 356-5283



More information about the Comp.sources.bugs mailing list