Deleted Added
full compact
116a117,129
> ** 5. The whole inner interpreter is screwed up. It ought to be detached
> ** from ficlExec. Also, it should fall in line with exception
> ** handling by saving state. (sobral)
> ** 6. EXCEPTION should be cleaned. Right now, it doubles ficlExec's
> ** inner interpreter. (sobral)
> ** 7. colonParen must get the inner interpreter working on it's "case"
> ** *before* returning, so that it becomes possible to execute them
> ** inside other definitions without recreating the inner interpreter
> ** or other such hacks. (sobral)
> ** 8. We now have EXCEPTION word set. Let's:
> ** 8.1. Use the appropriate exceptions throughout the code.
> ** 8.2. Print the error messages at ficlExec, so someone can catch
> ** them first. (sobral)
155a169,177
> **
> ** 12 Jan 1999 (sobral) Corrected EVALUATE behavior. Now TIB has an
> ** "end" field, and all words respect this. ficlExec is passed a "size"
> ** of TIB, as well as vmPushTib. This size is used to calculate the "end"
> ** of the string, ie, base+size. If the size is not known, pass -1.
> **
> ** 10 Jan 1999 (sobral) EXCEPTION word set has been added, and existing
> ** words has been modified to conform to EXCEPTION EXT word set.
> **
294a317,324
> **
> ** Since this structure also holds the size of the input buffer,
> ** and since evaluate requires that, let's put the size here.
> ** The size is stored as an end-pointer because that is what the
> ** null-terminated string aware functions find most easy to deal
> ** with.
> ** Notice, though, that nobody really uses this except evaluate,
> ** so it might just be moved to FICL_VM instead. (sobral)
298a329
> char *end;
473,477c504,510
< #define VM_OUTOFTEXT 1 /* hungry - normal exit */
< #define VM_RESTART 2 /* word needs more text to suxcceed - re-run it */
< #define VM_USEREXIT 3 /* user wants to quit */
< #define VM_ERREXIT 4 /* interp found an error */
< #define VM_QUIT 5 /* like errexit, but leave pStack & base alone */
---
> #define VM_OUTOFTEXT -256 /* hungry - normal exit */
> #define VM_RESTART -257 /* word needs more text to suxcceed - re-run it */
> #define VM_USEREXIT -258 /* user wants to quit */
> #define VM_ERREXIT -259 /* interp found an error */
> #define VM_ABORT -1 /* like errexit -- abort */
> #define VM_ABORTQ -2 /* like errexit -- abort" */
> #define VM_QUIT -56 /* like errexit, but leave pStack & base alone */
516c549
< void vmPushTib(FICL_VM *pVM, char *text, TIB *pSaveTib);
---
> void vmPushTib(FICL_VM *pVM, char *text, INT32 size, TIB *pSaveTib);
538c571
< char *skipSpace(char *cp);
---
> char *skipSpace(char *cp,char *end);
680c713,714
< ** interpreter's output function
---
> ** interpreter's output function. If the size of the input
> ** is not known, pass -1.
691a726,727
> ** VM_ABORT and VM_ABORTQ are generated by 'abort' and 'abort"'
> ** commands.
695c731
< int ficlExec(FICL_VM *pVM, char *pText);
---
> int ficlExec(FICL_VM *pVM, char *pText, INT32 size);