From: Dirk B. <db...@us...> - 2005-12-24 11:53:45
|
Update of /cvsroot/win32forth/win32forth/src/tools In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12285/src/tools Modified Files: DexH.f Log Message: *D command added, to set the current output folder for *.htm files. Index: DexH.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/src/tools/DexH.f,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** DexH.f 20 Dec 2005 18:00:50 -0000 1.1 --- DexH.f 24 Dec 2005 11:53:35 -0000 1.2 *************** *** 5,8 **** --- 5,9 ---- \ *Q Version 3 \ ** Primary contributors: Brad Eckert br...@SP... + \ ** Modified for use in Win32Forth by George Hubert and Dirk Busch ( *Q Abstract ) ( ** DexH is a simple literate programming tool inspired by MPE's DOCGEN. DexH ) *************** *** 21,24 **** --- 22,26 ---- ( *| Command | Effect | ) ( *| ** | continuation of G, E or P | ) + ( *| *D | Select a new output folder | ) \ dbu ( *| *! | create and select a new output file | ) ( *| *> | select an existing file to add text to | ) *************** *** 248,260 **** 0 value #gl-ancor ! : switchfile ( -- $other $name io ) end closeout line BL _parse \ get filename (minus extension) >R XPAD R@ MOVE S" .htm" XPAD R@ CHARS + SWAP MOVE \ add file extension ! ! xpad R@ 4 CHARS + $infile lplace \ save file name 0 to #gl-ancor \ reset ancor - XPAD R> 4 CHARS + w/o ; --- 250,266 ---- 0 value #gl-ancor ! : switchfolder ( -- ) \ Set new output folder ! end closeout line ! BL _parse \ get folder ! Prepend<home>\ "chdir \ set current directory ! 2drop ; ! ! : switchfile ( -- $other $name io ) \ Set new output file end closeout line BL _parse \ get filename (minus extension) >R XPAD R@ MOVE S" .htm" XPAD R@ CHARS + SWAP MOVE \ add file extension ! xpad R@ 4 CHARS + $infile lplace \ save file name 0 to #gl-ancor \ reset ancor XPAD R> 4 CHARS + w/o ; *************** *** 300,304 **** : gl-entry ( addr len -- ) ! cr 2dup type 2dup gl-get-type if $line lplace --- 306,310 ---- : gl-entry ( addr len -- ) ! \ cr 2dup type 2dup gl-get-type if $line lplace *************** *** 347,350 **** --- 353,357 ---- [CHAR] | OF S" <tr>" out table| S" </tr>" outln ENDOF [CHAR] Z OF end HTMLtrailer boiler ENDOF + [CHAR] D OF switchfolder ENDOF \ dbu ENDCASE ; *************** *** 363,374 **** ( *S Glossary ) ! :noname ( <filename> -- ) ( *G Convert a file or files to HTML. Output filenames are included in the ) ( ** source file. ) 0 TO testing \ output to file 0 TO echoing 0 TO plain 0 TO mode \ reset modes 0 escape ! - BL PARSE - 2dup cr ." Processing file: " type R/O OPEN-FILE ABORT" Missing input file" TO infile gl-open --- 370,380 ---- ( *S Glossary ) ! : (dex) ( addr len -- ) ( *G Convert a file or files to HTML. Output filenames are included in the ) ( ** source file. ) + 2dup cr ." Processing file: " type 0 TO testing \ output to file 0 TO echoing 0 TO plain 0 TO mode \ reset modes 0 escape ! R/O OPEN-FILE ABORT" Missing input file" TO infile gl-open *************** *** 385,391 **** REPEAT DROP closeout infile CLOSE-FILE DROP \ close files ! \in-system-ok gl-close ; is dexh ! ' dexh alias dex : q ( <string> -- ) --- 391,404 ---- REPEAT DROP closeout infile CLOSE-FILE DROP \ close files ! gl-close ; ! : DEX ( <filename> -- ) ! ( *G Convert a file or files to HTML. Output filenames are included in the ) ! ( ** source file. ) ! BL PARSE (dex) ; ! ! [defined] dexh [if] ! ' DEX is dexh \ link into w32f console menu ! [then] : q ( <string> -- ) |