--- gforth/wf.fs 2008/08/24 12:28:11 1.56 +++ gforth/wf.fs 2008/10/29 20:45:33 1.60 @@ -270,9 +270,13 @@ Defer parse-line s" ]" link-suffix $+! link-suffix $@ alt= ; +: replace.- ( addr u -- ) + bounds ?DO I c@ '. = IF '- I c! THEN LOOP ; + : get-icon ( addr u -- ) iconpath @ IF 2drop EXIT THEN - link-suffix $! s" .*" link-suffix $+! - icon-prefix $@ open-dir throw >r + link-suffix $! link-suffix $@ replace.- + s" .*" link-suffix $+! + icon-prefix $@ open-dir IF drop EXIT THEN >r BEGIN pad $100 r@ read-dir throw WHILE pad swap 2dup link-suffix $@ filename-match @@ -380,6 +384,7 @@ Create do-words $100 0 [DO] ' .text , [ : >tag '\ parse type '\ parse tag ; char>tag * b +char>tag / i char>tag _ em char>tag # code :noname '~ parse .type '~ parse .type ; '~ cells do-words + ! @@ -462,7 +467,7 @@ Create nav-buf 0 c, ELSE dup 'a 'z 1+ within IF nav+ ELSE dup '0 '9 1+ within IF nav+ ELSE dup bl = over '- = or IF '- nav+ - ELSE nav+ + ELSE drop THEN THEN THEN THEN LOOP ; : >nav ( addr u -- addr' u' ) @@ -730,7 +735,7 @@ Variable orig-date s" Mail|@/mail.gif" .img mail $@ mailto: mail-name $@ s" a" tagged public-key @ IF 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 -envs ; @@ -740,7 +745,7 @@ Variable orig-date '< sword -trailing mail-name $! '> sword mail $! ; : pgp-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 $! ; charset iso-8859-1