--- gforth/ans-report.fs 2003/01/25 20:11:30 1.9 +++ gforth/ans-report.fs 2005/12/31 15:46:07 1.13 @@ -1,6 +1,6 @@ \ report words used from the various wordsets -\ Copyright (C) 1996,1998,1999 Free Software Foundation, Inc. +\ Copyright (C) 1996,1998,1999,2003,2005 Free Software Foundation, Inc. \ This file is part of Gforth. @@ -42,11 +42,11 @@ vocabulary ans-report-words ans-report-words definitions : wordset ( "name" -- ) - lastxt >body + latestxt >body create 0 , \ link to next wordset 0 0 2, \ array of nfas - ( lastlinkp ) last @ swap ! \ set link ptr of last wordset + ( lastlinkp ) latest swap ! \ set link ptr of last wordset ; wordlist constant wordsets wordsets set-current @@ -140,6 +140,18 @@ ans-report-words definitions >body ['] branch xt>threaded over ! cell+ >r >body r> ! ; +: print-names ( endaddr startaddr -- ) + space 1 -rot + u+do ( pos ) + i @ name>string nip 1+ { len } + len + ( newpos ) + dup cols 4 - >= if + cr space drop len 1+ + endif + i @ .name + cell +loop + drop ; + forth definitions ans-report-words @@ -153,12 +165,7 @@ ans-report-words dup >r name>int >body dup @ swap cell+ 2@ dup if ." from " r@ .name ." :" cr - bounds - u+do - i @ .name - cell - +loop - cr + bounds print-names cr else 2drop endif