--- gforth/wf.fs 2006/10/11 19:18:51 1.49 +++ gforth/wf.fs 2007/12/31 18:40:24 1.53 @@ -1,12 +1,12 @@ \ wiki forth -\ Copyright (C) 2003,2004,2005 Free Software Foundation, Inc. +\ Copyright (C) 2003,2004,2005,2006,2007 Free Software Foundation, Inc. \ This file is part of Gforth. \ Gforth is free software; you can redistribute it and/or \ modify it under the terms of the GNU General Public License -\ as published by the Free Software Foundation; either version 2 +\ as published by the Free Software Foundation, either version 3 \ of the License, or (at your option) any later version. \ This program is distributed in the hope that it will be useful, @@ -15,8 +15,7 @@ \ GNU General Public License for more details. \ You should have received a copy of the GNU General Public License -\ along with this program; if not, write to the Free Software -\ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA. +\ along with this program. If not, see http://www.gnu.org/licenses/. require string.fs @@ -354,7 +353,7 @@ Variable expand-postfix \ line handling -: char? ( -- c ) >in @ char swap >in ! ; +: char? ( -- c ) >in @ char swap >in ! $FF umin ; : parse-tag ( addr u char -- ) >r r@ parse .type @@ -456,9 +455,10 @@ Create nav-buf 0 c, bounds ?DO I c@ dup 'A 'Z 1+ within IF bl + nav+ ELSE dup 'a 'z 1+ within IF nav+ - ELSE dup '0 '9 1+ within IF nav+ - ELSE dup bl = swap '- = or IF '- nav+ - THEN THEN THEN THEN + ELSE dup '0 '9 1+ within IF nav+ + ELSE dup bl = over '- = or IF '- nav+ + ELSE nav+ + THEN THEN THEN THEN LOOP ; : >nav ( addr u -- addr' u' ) nav-name $! create-navs @ 0= @@ -519,7 +519,7 @@ true Value toc-image 3 OF s" down" class= ENDOF ENDCASE THEN - s" a" tag parse-string s" a" /tag + s" a" tag parse-string s" a" /tag ." " THEN rdrop 1 toc-index +! toc-index @ /toc-line mod 0=