home: hub: 9ficl

Download patch

ref: 3975ad15dfc5f2c7b741573927e3933c6a3f6280
parent: 1e19b99e18494baf943329c1d205d1d2c98e9b75
author: jsadler <jsadler@ficl.sf.net>
date: Thu May 17 08:51:27 CDT 2001

Bug fixes in ALLOT, ficlwin debugger, HERE
Debugger enhancements

--- a/ReadMe.txt
+++ b/ReadMe.txt
@@ -1,10 +1,5 @@
-to do:
-fix dorky key handling in ficlwin
-debugger out command
-debugger breakpoints
+rel 2.06 -- May 2001 (feast or famine around here)
 
-rel -- May 2001 (feast or famine around here)
-
 - Debugger changes:
   New debugger command "x" to execute the rest of the command line as ficl
   New debugger command "l" lists the source of the innermost word being debugged
@@ -20,6 +15,9 @@
 - Win32 console version now handles exceptions more gracefully rather than crashing - uses win32
   structured exception handling.
 - Fixed BASE bug from 2.05 (was returning the value rather than the address) 
+- Fixed ALLOT bug - feeds address units to dictCheck, which expects Cells. Changed dictCheck
+  to expect AU. 
+- Float stack display word renamed to f.s from .f to be consistent with r.s and .s
 
 
 rel 2.05 -- April 2001
--- a/dict.c
+++ b/dict.c
@@ -3,7 +3,7 @@
 ** Forth Inspired Command Language - dictionary methods
 ** Author: John Sadler (john_sadler@alum.mit.edu)
 ** Created: 19 July 1997
-** $Id: dict.c,v 1.9 2001/05/16 14:56:17 jsadler Exp $
+** $Id: dict.c,v 1.10 2001/05/17 13:51:25 jsadler Exp $
 *******************************************************************/
 /*
 ** This file implements the dictionary -- FICL's model of 
@@ -291,16 +291,19 @@
 /**************************************************************************
                         d i c t C h e c k
 ** Checks the dictionary for corruption and throws appropriate
-** errors
+** errors.
+** Input: +n number of ADDRESS UNITS (not Cells) proposed to allot
+**        -n number of ADDRESS UNITS proposed to de-allot
+**         0 just do a consistency check
 **************************************************************************/
-void dictCheck(FICL_DICT *pDict, FICL_VM *pVM, int nCells)
+void dictCheck(FICL_DICT *pDict, FICL_VM *pVM, int n)
 {
-    if ((nCells >= 0) && (dictCellsAvail(pDict) < nCells))
+    if ((n >= 0) && (dictCellsAvail(pDict) * (int)sizeof(CELL) < n))
     {
         vmThrowErr(pVM, "Error: dictionary full");
     }
 
-    if ((nCells <= 0) && (dictCellsUsed(pDict) < -nCells))
+    if ((n <= 0) && (dictCellsUsed(pDict) * (int)sizeof(CELL) < -n))
     {
         vmThrowErr(pVM, "Error: dictionary underflow");
     }
--- a/ficl.h
+++ b/ficl.h
@@ -3,7 +3,7 @@
 ** Forth Inspired Command Language
 ** Author: John Sadler (john_sadler@alum.mit.edu)
 ** Created: 19 July 1997
-** $Id: ficl.h,v 1.13 2001/05/16 14:56:19 jsadler Exp $
+** $Id: ficl.h,v 1.14 2001/05/17 13:51:27 jsadler Exp $
 *******************************************************************/
 /*
 ** Copyright (c) 1997-2001 John Sadler (john_sadler@alum.mit.edu)
@@ -751,7 +751,7 @@
 void        dictAppendUNS(FICL_DICT *pDict, FICL_UNS u);
 int         dictCellsAvail(FICL_DICT *pDict);
 int         dictCellsUsed (FICL_DICT *pDict);
-void        dictCheck(FICL_DICT *pDict, FICL_VM *pVM, int nCells);
+void        dictCheck(FICL_DICT *pDict, FICL_VM *pVM, int n);
 FICL_DICT  *dictCreate(unsigned nCELLS);
 FICL_DICT  *dictCreateHashed(unsigned nCells, unsigned nHash);
 FICL_HASH  *dictCreateWordlist(FICL_DICT *dp, int nBuckets);