[gforth] / gforth / doc / makedoc.fs  

gforth: gforth/doc/makedoc.fs

Diff for /gforth/doc/makedoc.fs between version 1.1 and 1.2

version 1.1, Wed May 21 20:40:04 1997 UTC version 1.2, Sun Aug 3 20:21:55 1997 UTC
Line 23 
Line 23 
 \ it takes the name of the doc-file to be generated.  \ it takes the name of the doc-file to be generated.
   
 \ the forth source must have the following format:  \ the forth source must have the following format:
 \  .... name ( stack-effect ) \ 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 Forth source file that looks like this:
 \ doc-entry name stack-effect ) wordset [pronountiation]  \ doc[-prefix]-entry name stack-effect ) wordset [pronountiation]
 \ 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 67 
Line 67 
     if      if
         s" " doc-file-id write-line throw          s" " doc-file-id write-line throw
         s" make-doc " doc-file-id write-file throw          s" make-doc " doc-file-id write-file throw
         last @ name>string doc-file-id write-file throw          >in @ >r
         >in @  
         [char] ( parse 2drop          [char] ( parse 2drop
         [char] ) parse doc-file-id write-file throw          [char] ) parse
         s"  )" doc-file-id write-file throw  
         [char] \ parse 2drop          [char] \ parse 2drop
           >in @
           bl word  dup c@
           IF
               dup count 1- chars + c@ [char] - =
               IF
                   s" --" doc-file-id write-file throw
                   count doc-file-id write-file throw drop
               ELSE
                   drop >in !
               THEN
           ELSE
               drop >in !
           THEN
           last @ name>string doc-file-id write-file throw
           doc-file-id write-file throw
           s"  )" doc-file-id write-file throw
         POSTPONE \g          POSTPONE \g
         >in !          r> >in !
     endif ;      endif ;
   
 : (doc-header) ( -- )  : (doc-header) ( -- )


Generate output suitable for use with a patch program
Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

CVS Admin

Powered by ViewCVS 1.0-dev
(Powered by ViewCVS)

ViewCVS and CVS Help