From: Dirk B. <db...@us...> - 2006-02-04 10:40:46
|
Update of /cvsroot/win32forth/win32forth/src/tools In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19124/src/tools Modified Files: DexH-CreateDocs.f DexH-Glossary.f DexH.f W32fdexh.f Log Message: Changed DexH to create a glossary file (w32f-glossary.csv) in the doc folder. This file can be used to create a glossary file for win32forth as HTML. Index: DexH-Glossary.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/src/tools/DexH-Glossary.f,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** DexH-Glossary.f 20 Dec 2005 18:00:49 -0000 1.1 --- DexH-Glossary.f 4 Feb 2006 10:40:36 -0000 1.2 *************** *** 1,9 **** ! \ Word2Table.f ! \ Written June 13th, 2003 by di...@sc... (dbu) ! \ last changed on June 15th, 2003 - 10:15 (dbu) ! \ last changed on June 29th, 2003 - 10:16 (dbu) ! ! create OutputFile ," w32f-Glossary.txt" \ **************************************************************************** --- 1,6 ---- ! \ DexH-Glossary.f ! \ Creating a glossary for Win32Forth. + create OutputFile$ ," doc\w32f-glossary.csv" \ **************************************************************************** *************** *** 37,44 **** [UNDEFINED] OutputFileHandle [if] ! 0 value OutputFileHandle \ hold's the handle of the output file [then] ! : output-close ( -- ) \ close output file OutputFileHandle ?dup if close-file drop --- 34,43 ---- [UNDEFINED] OutputFileHandle [if] ! 0 value OutputFileHandle ! \ *G The handle of the output file for the glossary. [then] ! : output-close ( -- ) ! \ *G Close the output file for the glossary. OutputFileHandle ?dup if close-file drop *************** *** 46,76 **** then ; ! : output-open ( -- falg ) \ open output-file ! output-close ! OutputFile count r/w open-file swap to OutputFileHandle ! dup INVALID_HANDLE_VALUE = ! if drop OutputFile count r/w create-file swap to OutputFileHandle ! else drop OutputFileHandle file-append then ; ! : output-string ( addr count -- ) \ write a string to the output-file ! OutputFileHandle write-file drop ! ; ! : output-char ( char -- ) \ write a char to the output-file ! here c! here 1 output-string ! ; ! : output-tab ( -- ) \ write TAB to the output-file ! 9 output-char ! ; ! : output-cr ( -- ) \ write CR to the output-file 13 output-char ! 10 output-char ! ; ! : output-header ( -- ) \ write the header line to the output-file s" Name" output-string output-tab s" Stack" output-string output-tab --- 45,91 ---- then ; ! : OutputFile ( -- addr len ) ! \ *G Get name of output file for the glossary (including path). ! OutputFile$ count Prepend<home>\ ; ! : output-open ( -- f ) ! \ *G Open the output file for the glossary. ! \ ** If the file already exist the append mode for the file is set. ! output-close ! OutputFile r/w open-file swap to OutputFileHandle 0= ! if OutputFileHandle file-append 0= ! else OutputFile r/w create-file swap to OutputFileHandle 0= then ; ! : output-delete ( -- ) ! OutputFile delete-file drop ; ! : (output-string) ( addr count -- ) ! \ *G Write a string to the output-file. ! OutputFileHandle write-file drop ; ! : output-char ( char -- ) ! \ *G Write a char to the output-file. ! here c! here 1 (output-string) ; ! : output-string ( addr count -- ) ! \ *G Write a string to the output-file. ! \ ** The string will be quoated with " . ! [char] " output-char ! (output-string) ! [char] " output-char ; ! ! : output-tab ( -- ) ! \ *G Write TAB to the output-file. ! \ 9 output-char ; ! [char] , output-char ; ! ! : output-cr ( -- ) ! \ *G Write CR to the output-file. 13 output-char ! 10 output-char ; ! : output-header ( -- ) ! \ *G Write the header line to the output-file. s" Name" output-string output-tab s" Stack" output-string output-tab *************** *** 78,84 **** s" Type" output-string output-tab s" Class" output-string output-tab ! s" File" output-string output-cr ! ; \ **************************************************************************** --- 93,105 ---- s" Type" output-string output-tab s" Class" output-string output-tab ! s" File" output-string output-cr ; + : output-new ( -- ) + \ *G Create a new empty glossary file. + output-delete + output-open if + output-header + output-close + then ; \ **************************************************************************** *************** *** 109,113 **** IsCloseingClass? if $class-name off ! then ; : print-line { addr count char fSaveName -- addr' count' } \ write line to output file; stop on char --- 130,135 ---- IsCloseingClass? if $class-name off ! then ! ; : print-line { addr count char fSaveName -- addr' count' } \ write line to output file; stop on char *************** *** 213,223 **** 2dup s" ;CLASS" is-definition-type if 10 set-definition-type false to InClass? exit then 2dup s" ;OBJECT" is-definition-type if 11 set-definition-type false to InClass? exit then ! ; ! \ 2drop ; : print-class-name ( -- ) InClass? IsClass? 0= and if $class-name count ! else s" " then output-string ; --- 235,244 ---- 2dup s" ;CLASS" is-definition-type if 10 set-definition-type false to InClass? exit then 2dup s" ;OBJECT" is-definition-type if 11 set-definition-type false to InClass? exit then ! 2drop ; : print-class-name ( -- ) InClass? IsClass? 0= and if $class-name count ! else s" " then output-string ; Index: DexH-CreateDocs.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/src/tools/DexH-CreateDocs.f,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** DexH-CreateDocs.f 17 Jan 2006 17:52:00 -0000 1.9 --- DexH-CreateDocs.f 4 Feb 2006 10:40:36 -0000 1.10 *************** *** 10,16 **** \ ** the source files \ classes W32FClassDocs ! \ Windows, dialogs and controls s" src\generic.f" create-doc --- 10,20 ---- \ ** the source files + \ create a new gloassary file if needed + create-glossary-file? + if output-new then + \ classes W32FClassDocs ! \ \ Windows, dialogs and controls s" src\generic.f" create-doc *************** *** 22,34 **** -tr s" src\controls.f" create-doc +tr s" src\lib\excontrols.f" create-doc ! s" src\lib\MdiDialog.f" create-doc s" src\lib\AXControl.F" create-doc ! -tr s" src\lib\HTMLcontrol.F" create-doc +tr s" demos\HtmlControlDemo.f" create-doc -tr s" src\lib\Mdi.F" create-doc +tr s" demos\MdiExample.f" create-doc ! \ GDI class library s" src\gdi\gdiStruct.f" create-doc --- 26,38 ---- -tr s" src\controls.f" create-doc +tr s" src\lib\excontrols.f" create-doc ! \ s" src\lib\MdiDialog.f" create-doc s" src\lib\AXControl.F" create-doc ! \ -tr s" src\lib\HTMLcontrol.F" create-doc +tr s" demos\HtmlControlDemo.f" create-doc -tr s" src\lib\Mdi.F" create-doc +tr s" demos\MdiExample.f" create-doc ! \ \ GDI class library s" src\gdi\gdiStruct.f" create-doc *************** *** 42,57 **** s" src\gdi\gdiWindowDC.f" create-doc s" src\gdi\gdiMetafileDC.f" create-doc ! \ other classes s" src\lib\file.f" create-doc ! \ other documentation W32FDocs ! s" src\lib\AcceleratorTables.f" create-doc ; module cls create-docs --- 46,66 ---- s" src\gdi\gdiWindowDC.f" create-doc s" src\gdi\gdiMetafileDC.f" create-doc ! \ \ other classes s" src\lib\file.f" create-doc ! \ \ other documentation W32FDocs ! \ s" src\lib\AcceleratorTables.f" create-doc + s" src\FLOAT.F" create-doc ; module + \ also hidden + \ debug create-doc + cls create-docs + Index: W32fdexh.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/src/tools/W32fdexh.f,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** W32fdexh.f 15 Jan 2006 09:25:50 -0000 1.3 --- W32fdexh.f 4 Feb 2006 10:40:36 -0000 1.4 *************** *** 3,6 **** --- 3,7 ---- needs tools/dexh + anew -w32fdexh.f internal *************** *** 76,80 **** : -tr ( -- ) ! \ *G Stop output of the HTML trailer OLDtrailer 0= if HTMLtrailer to OLDtrailer --- 77,81 ---- : -tr ( -- ) ! \ *G Stop output of the HTML trailer. OLDtrailer 0= if HTMLtrailer to OLDtrailer *************** *** 83,87 **** : +tr ( -- ) ! \ *G Restart output of the HTML trailer OLDtrailer ?DUP if to HTMLtrailer --- 84,88 ---- : +tr ( -- ) ! \ *G Restart output of the HTML trailer. OLDtrailer ?DUP if to HTMLtrailer *************** *** 94,98 **** Prepend<home>\ (dex) ; cr .( DexH -- Document Extractor loaded ) cr ! cr .( Usage:" dex <filename> ) --- 95,123 ---- Prepend<home>\ (dex) ; + internal + in-application + + FileOpenDialog DexFile "Dex Forth File" "Forth Files (*.f)|*.f|All Files (*.*)|*.*|" + + in-system + external + + : DEXF ( -- ) + ( *G Choose a file and convert it to HTML. Output filenames are included in the ) + ( ** source file. ) + conhndl start: DexFile count ?dup + if (dex) + else drop + then ; + + [defined] dexh [if] + ' DEXF is dexh \ link into w32f console menu + [then] + + module + cr .( DexH -- Document Extractor loaded ) cr ! cr .( Usage: " DEX <filename> " to convert the file <filenname> ) ! cr .( or " DEXF " to choose a file and convert it. ) ! Index: DexH.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/src/tools/DexH.f,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** DexH.f 22 Jan 2006 10:44:16 -0000 1.3 --- DexH.f 4 Feb 2006 10:40:36 -0000 1.4 *************** *** 44,50 **** \ Set to true when a seperate glossary.txt should be created \ Still work in progress... (dbu) ! 0 constant create-glossary-file? ! ! external ( *P DexH is ANS Forth except for the need for BOUNDS, SCAN, SKIP and LCOUNT. ) --- 44,48 ---- \ Set to true when a seperate glossary.txt should be created \ Still work in progress... (dbu) ! 1 constant create-glossary-file? ( *P DexH is ANS Forth except for the need for BOUNDS, SCAN, SKIP and LCOUNT. ) *************** *** 73,76 **** --- 71,76 ---- : ,| ( <text> -- ) [CHAR] | WORD COUNT -TRAILING (,$) ; + external + CREATE DexHTMLheader ,| <?xml version="1.0"?> | *************** *** 104,107 **** --- 104,109 ---- DexHTMLtrailer value HTMLtrailer + internal + 0 VALUE outfile \ The current output file 0 VALUE infile *************** *** 282,286 **** : gl-open ( -- ) ! \ *G Open glossary File create-glossary-file? if output-open drop --- 284,288 ---- : gl-open ( -- ) ! \ *G Open glossary File. create-glossary-file? if output-open drop *************** *** 288,292 **** : gl-close ( -- ) ! \ *G Close glossary File create-glossary-file? if output-close --- 290,294 ---- : gl-close ( -- ) ! \ *G Close glossary File. create-glossary-file? if output-close *************** *** 294,298 **** : gl-ancor ( -- ) ! \ *G Write ancor number #gl-ancor s>d (D.) out ; --- 296,300 ---- : gl-ancor ( -- ) ! \ *G Write ancor number. #gl-ancor s>d (D.) out ; *************** *** 313,321 **** then ; - \ debug gl-entry - : gl-create-entry ( -- ) - \ cr ." gl-create-entry: " prevline LCOUNT type \ *G Create a glossary entry +n gl-ancor -n prevline LCOUNT outh -a --- 315,321 ---- then ; : gl-create-entry ( -- ) \ *G Create a glossary entry + \ cr ." gl-create-entry: " prevline LCOUNT type +n gl-ancor -n prevline LCOUNT outh -a *************** *** 370,373 **** --- 370,375 ---- ( *S Glossary ) + external + : (dex) ( addr len -- ) ( *G Convert a file or files to HTML. Output filenames are included in the ) *************** *** 398,411 **** BL PARSE (dex) ; - [defined] dexh [if] - ' DEX is dexh \ link into w32f console menu - [then] - : q ( <string> -- ) ( *G Test a single line of text, outputting to the screen. ) 1 TO testing -1 PARSE inbuf OVER ! inbuf CELL+ SWAP MOVE process-line ; ! \ *W <hr /><p>This file generated by <a href="dexh03.F">DexH</a></p> \ *Z module --- 400,414 ---- BL PARSE (dex) ; : q ( <string> -- ) ( *G Test a single line of text, outputting to the screen. ) 1 TO testing -1 PARSE inbuf OVER ! inbuf CELL+ SWAP MOVE process-line ; ! ! \ *W <hr /><p>This file generated by <a href="dexh.F">DexH</a></p> \ *Z module + + \ also hidden + \ debug gl-create-entry + \ dex c:\test.f |