version 1.58, 2008/10/08 09:33:13
|
version 1.62, 2010/12/31 18:09:02
|
Line 1
|
Line 1
|
\ wiki forth |
\ wiki forth |
|
|
\ Copyright (C) 2003,2004,2005,2006,2007,2008 Free Software Foundation, Inc. |
\ Copyright (C) 2003,2004,2005,2006,2007,2008,2010 Free Software Foundation, Inc. |
|
|
\ This file is part of Gforth. |
\ This file is part of Gforth. |
|
|
Line 270 Defer parse-line
|
Line 270 Defer parse-line
|
s" ]" link-suffix $+! |
s" ]" link-suffix $+! |
link-suffix $@ alt= ; |
link-suffix $@ alt= ; |
|
|
|
: replace.- ( addr u -- ) |
|
bounds ?DO I c@ '. = IF '- I c! THEN LOOP ; |
|
|
: 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 $! link-suffix $@ replace.- |
|
s" .*" link-suffix $+! |
icon-prefix $@ open-dir IF drop EXIT THEN >r |
icon-prefix $@ open-dir IF drop EXIT THEN >r |
BEGIN |
BEGIN |
pad $100 r@ read-dir throw WHILE |
pad $100 r@ read-dir throw WHILE |
Line 463 Create nav-buf 0 c,
|
Line 467 Create nav-buf 0 c,
|
ELSE dup 'a 'z 1+ within IF nav+ |
ELSE dup 'a 'z 1+ within IF nav+ |
ELSE dup '0 '9 1+ within IF nav+ |
ELSE dup '0 '9 1+ within IF nav+ |
ELSE dup bl = over '- = or IF '- nav+ |
ELSE dup bl = over '- = or IF '- nav+ |
ELSE nav+ |
ELSE drop |
THEN THEN THEN THEN |
THEN THEN THEN THEN |
LOOP ; |
LOOP ; |
: >nav ( addr u -- addr' u' ) |
: >nav ( addr u -- addr' u' ) |
Line 550 true Value toc-image
|
Line 554 true Value toc-image
|
indentlevel @ over |
indentlevel @ over |
indentlevel ! |
indentlevel ! |
2dup < IF swap DO -env LOOP EXIT THEN |
2dup < IF swap DO -env LOOP EXIT THEN |
2dup > IF DO s" div" >env LOOP EXIT THEN |
2dup > IF DO indent= s" div" >env LOOP EXIT THEN |
2dup = IF drop IF -env s" div" >env THEN THEN |
2dup = IF drop IF -env indent= s" div" >env THEN THEN |
; |
|
: +indent ( -- ) |
|
indentlevel @ IF -env indent= s" div" >env THEN |
|
; |
; |
|
|
wordlist constant longtags |
wordlist constant longtags |
Line 564 Variable divs
|
Line 565 Variable divs
|
longtags set-current |
longtags set-current |
|
|
: --- 0 indent cr s" hr" tag/ cr ; |
: --- 0 indent cr s" hr" tag/ cr ; |
: * 1 indent +indent s" h1" dclass= s" h1" par s" " dclass= ; |
: * 1 indent s" h1" dclass= s" h1" par s" " dclass= ; |
: ** 1 indent +indent s" h2" dclass= s" h2" par s" " dclass= ; |
: ** 1 indent s" h2" dclass= s" h2" par s" " dclass= ; |
: *** 2 indent +indent s" h3" dclass= s" h3" par s" " dclass= ; |
: *** 2 indent s" h3" dclass= s" h3" par s" " dclass= ; |
: -- 0 indent cr print-toc ; |
: -- 0 indent cr print-toc ; |
: && 0 parse id= ; |
: && 0 parse id= ; |
: - s" ul" env s" li" par ; |
: - s" ul" env s" li" par ; |
Line 731 Variable orig-date
|
Line 732 Variable orig-date
|
s" Mail|@/mail.gif" .img mail $@ mailto: mail-name $@ s" a" tagged |
s" Mail|@/mail.gif" .img mail $@ mailto: mail-name $@ s" a" tagged |
public-key @ IF |
public-key @ IF |
public-key $@ href= s" a" tag |
public-key $@ href= s" a" tag |
s" PGP key|-@/gpg.asc.gif" .img s" a" /tag |
s" PGP key|-@/gpg-asc.gif" .img s" a" /tag |
THEN |
THEN |
-envs ; |
-envs ; |
|
|
Line 741 Variable orig-date
|
Line 742 Variable orig-date
|
'< sword -trailing mail-name $! '> sword mail $! ; |
'< sword -trailing mail-name $! '> sword mail $! ; |
: pgp-key ( -- ) |
: pgp-key ( -- ) |
bl sword -trailing public-key $! ; |
bl sword -trailing public-key $! ; |
: charset ( -- ) s" text/xhtml; charset=" content $! |
: charset ( -- ) s" application/xhtml+xml; charset=" content $! |
bl sword -trailing 2dup content $+! _charset $! ; |
bl sword -trailing 2dup content $+! _charset $! ; |
|
|
charset iso-8859-1 |
charset iso-8859-1 |