kolibrios/programs/develop/SPForth/devel/~mak/lib/map.f
Kirill Lipatov (Leency) 09488af869 KolSPForth12 uploaded to SVN
git-svn-id: svn://kolibrios.org@4867 a494cfbc-eb01-0410-851d-a64ba20cac60
2014-04-21 19:22:58 +00:00

36 lines
634 B
Forth

\ ~mak/want.f WANT #define
0 VALUE M#define-CODE
: M#define CREATE PARSE-WORD EVALUATE ,
DOES> [ HERE 5 - TO M#define-CODE ] @ ;
: Archive_
PARSE-WORD EVALUATE
' DUP 1+ REL@ CELL+ M#define-CODE =
IF
>BODY ! EXIT
THEN 1 THROW ;
: Archive \ F7_ED
BEGIN
PARSE-WORD DUP 0=
IF NIP REFILL 0= IF DROP TRUE THEN
ELSE S" size" COMPARE 0= THEN
UNTIL
REFILL DROP
BEGIN REFILL 0= IF \EOF EXIT THEN
SOURCE NIP
WHILE M#define
REPEAT
BEGIN REFILL
WHILE SOURCE NIP 40 >
IF
['] Archive_ CATCH DROP
THEN
REPEAT POSTPONE \
;