Index: vendor/ficl/4.1.0/word.c =================================================================== --- vendor/ficl/4.1.0/word.c (revision 282799) +++ vendor/ficl/4.1.0/word.c (nonexistent) @@ -1,144 +0,0 @@ -#include "ficl.h" - - -/************************************************************************** - w o r d I s I m m e d i a t e -** -**************************************************************************/ -int ficlWordIsImmediate(ficlWord *word) -{ - return ((word != NULL) && (word->flags & FICL_WORD_IMMEDIATE)); -} - - -/************************************************************************** - w o r d I s C o m p i l e O n l y -** -**************************************************************************/ -int ficlWordIsCompileOnly(ficlWord *word) -{ - return ((word != NULL) && (word->flags & FICL_WORD_COMPILE_ONLY)); -} - - -/************************************************************************** - f i c l W o r d C l a s s i f y -** This public function helps to classify word types for SEE -** and the debugger in tools.c. Given an pointer to a word, it returns -** a member of WOR -**************************************************************************/ -ficlWordKind ficlWordClassify(ficlWord *word) -{ - ficlPrimitive code; - ficlInstruction i; - ficlWordKind iType; - - if ( (((ficlInstruction)word) > ficlInstructionInvalid) - && (((ficlInstruction)word) < ficlInstructionLast) ) - { - i = (ficlInstruction)word; - iType = FICL_WORDKIND_INSTRUCTION; - goto IS_INSTRUCTION; - } - - code = word->code; - - if ((ficlInstruction)code < ficlInstructionLast) - { - i = (ficlInstruction)code; - iType = FICL_WORDKIND_INSTRUCTION_WORD; - goto IS_INSTRUCTION; - } - - return FICL_WORDKIND_PRIMITIVE; - -IS_INSTRUCTION: - - switch (i) - { - case ficlInstructionConstantParen: -#if FICL_WANT_FLOAT - case ficlInstructionFConstantParen: -#endif /* FICL_WANT_FLOAT */ - return FICL_WORDKIND_CONSTANT; - - case ficlInstruction2ConstantParen: -#if FICL_WANT_FLOAT - case ficlInstructionF2ConstantParen: -#endif /* FICL_WANT_FLOAT */ - return FICL_WORDKIND_2CONSTANT; - -#if FICL_WANT_LOCALS - case ficlInstructionToLocalParen: - case ficlInstructionTo2LocalParen: -#if FICL_WANT_FLOAT - case ficlInstructionToFLocalParen: - case ficlInstructionToF2LocalParen: -#endif /* FICL_WANT_FLOAT */ - return FICL_WORDKIND_INSTRUCTION_WITH_ARGUMENT; -#endif /* FICL_WANT_LOCALS */ - -#if FICL_WANT_USER - case ficlInstructionUserParen: - return FICL_WORDKIND_USER; -#endif - - case ficlInstruction2LiteralParen: - return FICL_WORDKIND_2LITERAL; - -#if FICL_WANT_FLOAT - case ficlInstructionFLiteralParen: - return FICL_WORDKIND_FLITERAL; -#endif - - case ficlInstructionCreateParen: - return FICL_WORDKIND_CREATE; - - case ficlInstructionCStringLiteralParen: - return FICL_WORDKIND_CSTRING_LITERAL; - - case ficlInstructionStringLiteralParen: - return FICL_WORDKIND_STRING_LITERAL; - - case ficlInstructionColonParen: - return FICL_WORDKIND_COLON; - - case ficlInstructionDoDoes: - return FICL_WORDKIND_DOES; - - case ficlInstructionDoParen: - return FICL_WORDKIND_DO; - - case ficlInstructionQDoParen: - return FICL_WORDKIND_QDO; - - case ficlInstructionVariableParen: - return FICL_WORDKIND_VARIABLE; - - case ficlInstructionBranchParenWithCheck: - case ficlInstructionBranchParen: - return FICL_WORDKIND_BRANCH; - - case ficlInstructionBranch0ParenWithCheck: - case ficlInstructionBranch0Paren: - return FICL_WORDKIND_BRANCH0; - - case ficlInstructionLiteralParen: - return FICL_WORDKIND_LITERAL; - - case ficlInstructionLoopParen: - return FICL_WORDKIND_LOOP; - - case ficlInstructionOfParen: - return FICL_WORDKIND_OF; - - case ficlInstructionPlusLoopParen: - return FICL_WORDKIND_PLOOP; - - default: - return iType; - } -} - - - Property changes on: vendor/ficl/4.1.0/word.c ___________________________________________________________________ Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: vendor/ficl/4.1.0/softcore/make.bat =================================================================== --- vendor/ficl/4.1.0/softcore/make.bat (revision 282799) +++ vendor/ficl/4.1.0/softcore/make.bat (nonexistent) @@ -1,22 +0,0 @@ -@echo off - -if "%1" == "clean" goto CLEAN - -if exist makesoftcore.exe goto SKIPCL -cl /Zi /Od makesoftcore.c ..\lzcompress.c ..\bit.c -goto MAKESOFTCORE - -:SKIPCL -echo makesoftcore.exe exists, skipping building it. - -:MAKESOFTCORE -echo on -makesoftcore softcore.fr ifbrack.fr prefix.fr ficl.fr jhlocal.fr marker.fr oo.fr classes.fr string.fr win32.fr ficllocal.fr fileaccess.fr -goto EXIT - -:CLEAN -del *.obj -del makesoftcore.exe -del ..\softcore.c - -:EXIT Index: vendor/ficl/4.1.0/softcore/string.fr =================================================================== --- vendor/ficl/4.1.0/softcore/string.fr (revision 282799) +++ vendor/ficl/4.1.0/softcore/string.fr (nonexistent) @@ -1,149 +0,0 @@ -S" FICL_WANT_OOP" ENVIRONMENT? drop [if] -\ ** ficl/softwords/string.fr -\ A useful dynamic string class -\ John Sadler 14 Sep 1998 -\ -\ ** C - S T R I N G -\ counted string, buffer sized dynamically -\ Creation example: -\ c-string --> new str -\ s" arf arf!!" str --> set -\ s" woof woof woof " str --> cat -\ str --> type cr -\ - -.( loading ficl string class ) cr -also oop definitions - -object subclass c-string - c-cell obj: .count - c-cell obj: .buflen - c-ptr obj: .buf - 32 constant min-buf - - : get-count ( 2:this -- count ) my=[ .count get ] ; - : set-count ( count 2:this -- ) my=[ .count set ] ; - - : ?empty ( 2:this -- flag ) --> get-count 0= ; - - : get-buflen ( 2:this -- len ) my=[ .buflen get ] ; - : set-buflen ( len 2:this -- ) my=[ .buflen set ] ; - - : get-buf ( 2:this -- ptr ) my=[ .buf get-ptr ] ; - : set-buf { ptr len 2:this -- } - ptr this my=[ .buf set-ptr ] - len this my=> set-buflen - ; - - \ set buffer to null and buflen to zero - : clr-buf ( 2:this -- ) - 0 0 2over my=> set-buf - 0 -rot my=> set-count - ; - - \ free the buffer if there is one, set buf pointer to null - : free-buf { 2:this -- } - this my=> get-buf - ?dup if - free - abort" c-string free failed" - this my=> clr-buf - endif - ; - - \ guarantee buffer is large enough to hold size chars - : size-buf { size 2:this -- } - size 0< abort" need positive size for size-buf" - size 0= if - this --> free-buf exit - endif - - \ force buflen to be a positive multiple of min-buf chars - my=> min-buf size over / 1+ * chars to size - - \ if buffer is null, allocate one, else resize it - this --> get-buflen 0= - if - size allocate - abort" out of memory" - size this --> set-buf - size this --> set-buflen - exit - endif - - size this --> get-buflen > if - this --> get-buf size resize - abort" out of memory" - size this --> set-buf - endif - ; - - : set { c-addr u 2:this -- } - u this --> size-buf - u this --> set-count - c-addr this --> get-buf u move - ; - - : get { 2:this -- c-addr u } - this --> get-buf - this --> get-count - ; - - \ append string to existing one - : cat { c-addr u 2:this -- } - this --> get-count u + dup >r - this --> size-buf - c-addr this --> get-buf this --> get-count + u move - r> this --> set-count - ; - - : type { 2:this -- } - this --> ?empty if ." (empty) " exit endif - this --> .buf --> get-ptr - this --> .count --> get - type - ; - - : compare ( 2string 2:this -- n ) - --> get - 2swap - --> get - 2swap compare - ; - - : hashcode ( 2:this -- hashcode ) - --> get hash - ; - - \ destructor method (overrides object --> free) - : free ( 2:this -- ) 2dup --> free-buf object => free ; - -end-class - -c-string subclass c-hashstring - c-2byte obj: .hashcode - - : set-hashcode { 2:this -- } - this --> super --> hashcode - this --> .hashcode --> set - ; - - : get-hashcode ( 2:this -- hashcode ) - --> .hashcode --> get - ; - - : set ( c-addr u 2:this -- ) - 2swap 2over --> super --> set - --> set-hashcode - ; - - : cat ( c-addr u 2:this -- ) - 2swap 2over --> super --> cat - --> set-hashcode - ; - -end-class - -previous definitions - -[endif] Index: vendor/ficl/4.1.0/softcore/ifbrack.fr =================================================================== --- vendor/ficl/4.1.0/softcore/ifbrack.fr (revision 282799) +++ vendor/ficl/4.1.0/softcore/ifbrack.fr (nonexistent) @@ -1,48 +0,0 @@ -\ ** ficl/softwords/ifbrack.fr -\ ** ANS conditional compile directives [if] [else] [then] -\ ** Requires ficl 2.0 or greater... - -hide - -: ?[if] ( c-addr u -- c-addr u flag ) - 2dup s" [if]" compare-insensitive 0= -; - -: ?[else] ( c-addr u -- c-addr u flag ) - 2dup s" [else]" compare-insensitive 0= -; - -: ?[then] ( c-addr u -- c-addr u flag ) - 2dup s" [then]" compare-insensitive 0= >r - 2dup s" [endif]" compare-insensitive 0= r> - or -; - -set-current - -: [else] ( -- ) - 1 \ ( level ) - begin - begin - parse-word dup while \ ( level addr len ) - ?[if] if \ ( level addr len ) - 2drop 1+ \ ( level ) - else \ ( level addr len ) - ?[else] if \ ( level addr len ) - 2drop 1- dup if 1+ endif - else - ?[then] if 2drop 1- else 2drop endif - endif - endif ?dup 0= if exit endif \ level - repeat 2drop \ level - refill 0= until \ level - drop -; immediate - -: [if] ( flag -- ) -0= if postpone [else] then ; immediate - -: [then] ( -- ) ; immediate -: [endif] ( -- ) ; immediate - -previous Index: vendor/ficl/4.1.0/softcore/softcore.fr =================================================================== --- vendor/ficl/4.1.0/softcore/softcore.fr (revision 282799) +++ vendor/ficl/4.1.0/softcore/softcore.fr (nonexistent) @@ -1,152 +0,0 @@ -\ ** ficl/softwords/softcore.fr -\ ** FICL soft extensions -\ ** John Sadler (john_sadler@alum.mit.edu) -\ ** September, 1998 - - -\ ** ficl extras -\ EMPTY cleans the parameter stack -: empty ( xn..x1 -- ) depth 0 ?do drop loop ; -\ CELL- undoes CELL+ -: cell- ( addr -- addr ) [ 1 cells ] literal - ; -: -rot ( a b c -- c a b ) 2 -roll ; - -\ ** CORE -: abs ( x -- x ) - dup 0< if negate endif ; -decimal 32 constant bl - -: space ( -- ) bl emit ; - -: spaces ( n -- ) 0 ?do space loop ; - -: abort" - state @ if - postpone if - postpone ." - postpone cr - -2 - postpone literal - postpone throw - postpone endif - else - [char] " parse - rot if - type - cr - -2 throw - else - 2drop - endif - endif -; immediate - - -\ ** CORE EXT -.( loading CORE EXT words ) cr -0 constant false -false invert constant true -: <> = 0= ; -: 0<> 0= 0= ; -: compile, , ; -: convert char+ 65535 >number drop ; \ cribbed from DPANS A.6.2.0970 -: erase ( addr u -- ) 0 fill ; -variable span -: expect ( c-addr u1 -- ) accept span ! ; -\ see marker.fr for MARKER implementation -: nip ( y x -- x ) swap drop ; -: tuck ( y x -- x y x) swap over ; -: within ( test low high -- flag ) over - >r - r> u< ; - - - -\ ** TOOLS word set... -: ? ( addr -- ) @ . ; -: dump ( addr u -- ) - 0 ?do - dup c@ . 1+ - i 7 and 7 = if cr endif - loop drop -; - -\ ** SEARCH+EXT words and ficl helpers -.( loading SEARCH & SEARCH-EXT words ) cr -\ BRAND-WORDLIST is a helper for ficl-named-wordlist. Usage idiom: -\ wordlist dup create , brand-wordlist -\ gets the name of the word made by create and applies it to the wordlist... -: brand-wordlist ( wid -- ) last-word >name drop wid-set-name ; - -: ficl-named-wordlist \ ( hash-size name -- ) run: ( -- wid ) - ficl-wordlist dup create , brand-wordlist does> @ ; - -: wordlist ( -- ) - 1 ficl-wordlist ; - -\ FICL-SET-CURRENT sets the compile wordlist and pushes the previous value -: ficl-set-current ( wid -- old-wid ) - get-current swap set-current ; - -\ DO_VOCABULARY handles the DOES> part of a VOCABULARY -\ When executed, new voc replaces top of search stack -: do-vocabulary ( -- ) - does> @ search> drop >search ; - -: ficl-vocabulary ( nBuckets name -- ) - ficl-named-wordlist do-vocabulary ; - -: vocabulary ( name -- ) - 1 ficl-vocabulary ; - -\ PREVIOUS drops the search order stack -: previous ( -- ) search> drop ; - -\ HIDDEN vocabulary is a place to keep helper words from cluttering the namespace -\ USAGE: -\ hide -\ -\ set-current -\