version 1.14, 2001/11/11 22:33:31
|
version 1.18, 2003/01/22 10:59:54
|
Line 99 Create jfif $FF c, $D8 c, $FF c, $E0 c
|
Line 99 Create jfif $FF c, $D8 c, $FF c, $E0 c
|
: bw@ ( addr -- x ) 0 swap 2 bounds ?DO 8 lshift I c@ + LOOP ; |
: bw@ ( addr -- x ) 0 swap 2 bounds ?DO 8 lshift I c@ + LOOP ; |
|
|
: gif? ( -- flag ) |
: gif? ( -- flag ) |
s" GIF89a" imgbuf over compare 0= |
s" GIF89a" imgbuf over str= |
s" GIF87a" imgbuf over compare 0= or ; |
s" GIF87a" imgbuf over str= or ; |
: gif-size ( -- w h ) |
: gif-size ( -- w h ) |
imgbuf 8 + c@ imgbuf 9 + c@ 8 lshift + |
imgbuf 8 + c@ imgbuf 9 + c@ 8 lshift + |
imgbuf 6 + c@ imgbuf 7 + c@ 8 lshift + ; |
imgbuf 6 + c@ imgbuf 7 + c@ 8 lshift + ; |
|
|
: png? ( -- flag ) |
: png? ( -- flag ) |
pngsig 8 imgbuf over compare 0= ; |
pngsig 8 imgbuf over str= ; |
: png-size ( -- w h ) |
: png-size ( -- w h ) |
imgbuf $14 + b@ imgbuf $10 + b@ ; |
imgbuf $14 + b@ imgbuf $10 + b@ ; |
|
|
: jpg? ( -- flag ) |
: jpg? ( -- flag ) |
jfif 10 imgbuf over compare 0= ; |
jfif 10 imgbuf over str= ; |
: jpg-size ( fd -- w h ) >r |
: jpg-size ( fd -- w h ) >r |
2. BEGIN |
2. BEGIN |
2dup r@ reposition-file throw |
2dup r@ reposition-file throw |
Line 195 Defer parse-line
|
Line 195 Defer parse-line
|
over c@ '% = over 0> and IF do-size on 1 /string THEN |
over c@ '% = over 0> and IF do-size on 1 /string THEN |
over c@ '\ = over 0> and IF do-icon off 1 /string THEN ; |
over c@ '\ = over 0> and IF do-icon off 1 /string THEN ; |
|
|
|
s" Gforth" environment? [IF] s" 0.5.0" str= [IF] |
|
: parse-string ( c-addr u -- ) \ core,block |
|
s" *evaluated string*" loadfilename>r |
|
push-file #tib ! >tib ! |
|
>in off blk off loadfile off -1 loadline ! |
|
['] parse-line catch |
|
pop-file r>loadfilename throw ; |
|
[ELSE] |
: parse-string ( addr u -- ) |
: parse-string ( addr u -- ) |
evaluate-input cell new-tib #tib ! tib ! |
evaluate-input cell new-tib #tib ! tib ! |
['] parse-line catch pop-file throw ; |
['] parse-line catch pop-file throw ; |
|
[THEN] [THEN] |
|
|
: .link ( addr u -- ) dup >r '| -$split dup r> = IF 2swap THEN |
: .link ( addr u -- ) dup >r '| -$split dup r> = IF 2swap THEN |
link-options link $! |
link-options link $! |
Line 287 wordlist Constant autoreplacements
|
Line 296 wordlist Constant autoreplacements
|
: get-rest ( addr -- ) 0 parse -trailing rot $! ; |
: get-rest ( addr -- ) 0 parse -trailing rot $! ; |
Create $lf 1 c, #lf c, |
Create $lf 1 c, #lf c, |
: get-par ( addr -- ) >r s" " r@ $+! |
: get-par ( addr -- ) >r s" " r@ $+! |
BEGIN 0 parse 2dup s" ." compare WHILE |
BEGIN 0 parse 2dup s" ." str= 0= WHILE |
r@ $@len IF $lf count r@ $+! THEN r@ $+! |
r@ $@len IF $lf count r@ $+! THEN r@ $+! |
refill 0= UNTIL ELSE 2drop THEN |
refill 0= UNTIL ELSE 2drop THEN |
rdrop ; |
rdrop ; |
Line 395 longtags set-current
|
Line 404 longtags set-current
|
: . end-sec on 0 indent ; |
: . end-sec on 0 indent ; |
: :code s" pre" >env |
: :code s" pre" >env |
BEGIN source >in @ /string type cr refill WHILE |
BEGIN source >in @ /string type cr refill WHILE |
source s" :endcode" compare 0= UNTIL THEN |
source s" :endcode" str= UNTIL THEN |
-env ; |
-env ; |
: \ postpone \ ; |
: \ postpone \ ; |
|
|