--- gforth/wf.fs 2005/06/28 15:22:45 1.38 +++ gforth/wf.fs 2006/02/25 14:01:19 1.43 @@ -1,6 +1,6 @@ \ wiki forth -\ Copyright (C) 2003,2004 Free Software Foundation, Inc. +\ Copyright (C) 2003,2004,2005 Free Software Foundation, Inc. \ This file is part of Gforth. @@ -42,7 +42,7 @@ require string.fs case '& of ." &" endof '< of ." <" endof - '¤ of ." €" endof +\ '¤ of ." €" endof dup emit endcase LOOP ; @@ -193,6 +193,7 @@ Create jfif $FF c, $D8 c, $FF c, $E0 c dup IF '. emit THEN type ; 12.9e FConstant pixels +FVariable factor 1e factor f! : size-does> ( -- ) DOES> ( -- ) ." img." dup body> >name .name @@ -216,7 +217,10 @@ Create jfif $FF c, $D8 c, $FF c, $E0 c 2dup img-sizes search-wordlist IF drop 2drop ELSE get-current >r img-sizes set-current - nextname Create 2dup , , size-does> + nextname Create 2dup + s>d d>f factor f@ f* f>d d>s , + s>d d>f factor f@ f* f>d d>s , + size-does> r> set-current THEN ; @@ -651,10 +655,11 @@ definitions Variable css-file Variable content -Variable lang +Variable _lang +Variable _favicon : lang@ ( -- addr u ) - lang @ IF lang $@ ELSE s" en" THEN ; + _lang @ IF _lang $@ ELSE s" en" THEN ; : .css ( -- ) css-file @ IF css-file $@len IF s" StyleSheet" s" rel" opt @@ -671,6 +676,11 @@ Variable lang s" Content-Type" s" http-equiv" opt content $@ s" content" opt s" meta" tag/ cr .css + _favicon @ IF + s" shortcut icon" s" rel" opt + _favicon $@ href= + s" image/x-icon" s" type" opt + s" link" tag/ cr THEN s" title" tagged cr -env ; @@ -714,7 +724,9 @@ charset iso-8859-1 : icons bl sword icon-prefix $! ; : lang - bl sword lang $! ; + bl sword _lang $! ; +: favicon + bl sword _favicon $! ; : expands '# sword expand-prefix $! bl sword expand-postfix $! ; icons icons