Diff for /gforth/doc/makedoc.fs between versions 1.2 and 1.7

version 1.2, 1997/08/03 20:21:55 version 1.7, 2003/03/22 10:04:08
Line 1 Line 1
 \ create a documentation file  \ create a documentation file
   
 \ Copyright (C) 1995 Free Software Foundation, Inc.  \ Copyright (C) 1995,1999,2000 Free Software Foundation, Inc.
   
 \ This file is part of Gforth.  \ This file is part of Gforth.
   
Line 16 Line 16
   
 \ You should have received a copy of the GNU General Public License  \ You should have received a copy of the GNU General Public License
 \ along with this program; if not, write to the Free Software  \ along with this program; if not, write to the Free Software
 \ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  \ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
   
   
 \ the stack effect of loading this file is: ( addr u -- )  \ the stack effect of loading this file is: ( addr u -- )
Line 26 Line 26
 \  .... name ( stack-effect ) \ [prefix-] wordset [pronounciation]  \  .... name ( stack-effect ) \ [prefix-] wordset [pronounciation]
 \ \G description ...  \ \G description ...
   
 \ The output is a Forth source file that looks like this:  \ The output is a file of entries that look like this:
 \ doc[-prefix]-entry name stack-effect ) wordset [pronountiation]  \ make-doc [--prefix]-entry name stack-effect ) wordset [pronounciation]
 \ description  \ description
 \  \
 \ (i.e., the entry is terminated by an empty line or the end-of-file)  \ (i.e., the entry is terminated by an empty line or the end-of-file)
Line 57  r/w create-file throw value doc-file-id Line 57  r/w create-file throw value doc-file-id
   
 s" \ automatically generated by makedoc.fs" doc-file-id write-line throw  s" \ automatically generated by makedoc.fs" doc-file-id write-line throw
   
   : >fileCR ( c-addr u -- )
       doc-file-id write-line throw ;
   : >file    ( c-addr u -- )
       doc-file-id write-file throw ;
   
 : \G ( -- )  : \G ( -- )
     source >in @ /string doc-file-id write-line throw      source >in @ /string >fileCR
     source >in ! drop ; immediate      source >in ! drop ; immediate
   
 : put-doc-entry ( -- )  : put-doc-entry ( -- )
     locals-list @ 0=    \ not in a colon def, i.e., not a local name      locals-list @ 0=    \ not in a colon def, i.e., not a local name
     last @ 0<> and      \ not an anonymous (i.e. noname) header      latest 0<> and      \ not an anonymous (i.e. noname) header
     if      if
         s" " doc-file-id write-line throw          s" " >fileCR
         s" make-doc " doc-file-id write-file throw          s" make-doc " >file
         >in @ >r          >in @ >r
         [char] ( parse 2drop          [char] ( parse 2drop
         [char] ) parse          [char] ) parse
Line 76  s" \ automatically generated by makedoc. Line 81  s" \ automatically generated by makedoc.
         IF          IF
             dup count 1- chars + c@ [char] - =              dup count 1- chars + c@ [char] - =
             IF              IF
                 s" --" doc-file-id write-file throw                  s" --" >file
                 count doc-file-id write-file throw drop                  count >file drop
             ELSE              ELSE
                 drop >in !                  drop >in !
             THEN              THEN
         ELSE          ELSE
             drop >in !              drop >in !
         THEN          THEN
         last @ name>string doc-file-id write-file throw          latest name>string >file
         doc-file-id write-file throw          >file
         s"  )" doc-file-id write-file throw          s"  )" >file
         POSTPONE \g          POSTPONE \g
         r> >in !          r> >in !
     endif ;      endif ;

Removed from v.1.2  
changed lines
  Added in v.1.7


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>