version 1.25, 2004/06/24 20:50:40
|
version 1.27, 2004/08/29 20:54:48
|
Line 177 Variable link
|
Line 177 Variable link
|
Variable link-sig |
Variable link-sig |
Variable link-suffix |
Variable link-suffix |
Variable iconpath |
Variable iconpath |
|
Variable icon-prefix |
|
Variable icon-tmp |
|
|
Variable do-size |
Variable do-size |
Variable do-icon |
Variable do-icon |
|
|
Defer parse-line |
Defer parse-line |
|
|
: .img ( addr u -- ) dup >r '| -$split dup r> = IF 2swap THEN |
: .img ( addr u -- ) |
|
dup >r '@ -$split dup r> = IF 2swap 2drop |
|
ELSE 2swap icon-tmp $! icon-prefix $@ icon-tmp $+! icon-tmp $+! |
|
icon-tmp $@ THEN |
|
dup >r '| -$split dup r> = IF 2swap THEN |
dup IF 2swap alt= ELSE 2drop THEN |
dup IF 2swap alt= ELSE 2drop THEN |
tag-option $@len >r over c@ >align tag-option $@len r> = 1+ /string |
tag-option $@len >r over c@ >align tag-option $@len r> = 1+ /string |
tag-option $@len >r over c@ >border tag-option $@len r> = 1+ /string |
tag-option $@len >r over c@ >border tag-option $@len r> = 1+ /string |
Line 198 Defer parse-line
|
Line 204 Defer parse-line
|
|
|
: get-icon ( addr u -- ) iconpath @ IF 2drop EXIT THEN |
: get-icon ( addr u -- ) iconpath @ IF 2drop EXIT THEN |
link-suffix $! s" .*" link-suffix $+! |
link-suffix $! s" .*" link-suffix $+! |
s" icons" open-dir throw >r |
icon-prefix $@ open-dir throw >r |
BEGIN |
BEGIN |
pad $100 r@ read-dir throw WHILE |
pad $100 r@ read-dir throw WHILE |
pad swap 2dup link-suffix $@ filename-match |
pad swap 2dup link-suffix $@ filename-match |
IF s" icons/" iconpath $! iconpath $+! |
IF icon-prefix $@ iconpath $! s" /" iconpath $+! iconpath $+! |
iconpath $@ 2dup .img-size src= '- >border |
iconpath $@ 2dup .img-size src= '- >border |
alt-suffix s" img" tag/ true |
alt-suffix s" img" tag/ true |
ELSE 2drop false THEN |
ELSE 2drop false THEN |
Line 228 Defer parse-line
|
Line 234 Defer parse-line
|
link-sig $@ r/o open-file IF drop EXIT THEN |
link-sig $@ r/o open-file IF drop EXIT THEN |
close-file throw |
close-file throw |
." (" link-sig $@ href= s" a" tag |
." (" link-sig $@ href= s" a" tag |
s" |-icons/sig.gif" .img ." sig" s" /a" tag ." )" ; |
s" |-@/sig.gif" .img ." sig" s" /a" tag ." )" ; |
|
|
: link-warn? ( -- ) \ local links only |
: link-warn? ( -- ) \ local links only |
link $@ ': scan nip ?EXIT |
link $@ ': scan nip ?EXIT |
link $@ r/o open-file nip IF |
link $@ '# $split 2drop r/o open-file nip IF |
s" Dead Link '" stderr write-file throw |
s" Dead Link '" stderr write-file throw |
link $@ stderr write-file throw |
link $@ stderr write-file throw |
s\" ' !!!\n" stderr write-file throw |
s\" ' !!!\n" stderr write-file throw |
Line 399 Variable toc-index
|
Line 405 Variable toc-index
|
$@ .img swap |
$@ .img swap |
IF |
IF |
case |
case |
2 of s" ^]|-icons/arrow_up.jpg" .img endof |
2 of s" ^]|-@/arrow_up.jpg" .img endof |
3 of |
3 of |
r@ 0= IF s" *]|-icons/circle.jpg" |
r@ 0= IF s" *]|-@/circle.jpg" |
ELSE s" v]|-icons/arrow_down.jpg" THEN .img endof |
ELSE s" v]|-@/arrow_down.jpg" THEN .img endof |
endcase |
endcase |
ELSE |
ELSE |
case |
case |
0 of s" ^]|-icons/arrow_up.jpg" .img endof |
0 of s" ^]|-@/arrow_up.jpg" .img endof |
1 of s" >]|-icons/arrow_right.jpg" .img endof |
1 of s" >]|-@/arrow_right.jpg" .img endof |
2 of s" *]|-icons/circle.jpg" .img endof |
2 of s" *]|-@/circle.jpg" .img endof |
3 of s" v]|-icons/arrow_down.jpg" .img endof |
3 of s" v]|-@/arrow_down.jpg" .img endof |
endcase |
endcase |
THEN |
THEN |
s" a" /tag rdrop ." <!--" cr ." -->" |
s" a" /tag rdrop ." <!--" cr ." -->" |
Line 579 Variable orig-date
|
Line 585 Variable orig-date
|
orig-date @ IF ." Created " orig-date $@ type ." . " THEN |
orig-date @ IF ." Created " orig-date $@ type ." . " THEN |
.lastmod |
.lastmod |
." by " |
." by " |
s" Mail|icons/mail.gif" .img mail $@ mailto: mail-name $@ s" a" tagged |
s" Mail|@/mail.gif" .img mail $@ mailto: mail-name $@ s" a" tagged |
-envs ; |
-envs ; |
|
|
\ top word |
\ top word |
Line 588 Variable orig-date
|
Line 594 Variable orig-date
|
'< sword -trailing mail-name $! '> sword mail $! ; |
'< sword -trailing mail-name $! '> sword mail $! ; |
: created ( -- ) |
: created ( -- ) |
bl sword orig-date $! ; |
bl sword orig-date $! ; |
|
: icons |
|
bl sword icon-prefix $! ; |
|
icons icons |
|
|
Variable style$ |
Variable style$ |
: style> style$ @ 0= IF s" " style$ $! THEN style$ $@ tag-option $! ; |
: style> style$ @ 0= IF s" " style$ $! THEN style$ $@ tag-option $! ; |