From: Jos v.d.V. <jo...@us...> - 2007-10-28 13:15:12
|
Update of /cvsroot/win32forth/win32forth/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv3495 Added Files: ExtendNew.f Log Message: Jos: Added for the new console --- NEW FILE: ExtendNew.f --- \ ExtendNew.f Extend the kernel with the new console \ ( ******** ) files to be removed later cr .( -- META EXTEND.F ) cr sys-FLOAD src\comment.f FLOAD src\numconv.f \ general number conversions ( ******** ) FLOAD src\console\console.f \ Console I/O part 1 FLOAD src\primutil.f \ primitive utilities sys-FLOAD src\nforget.f sys-FLOAD src\order.f \ vocabulary support sys-FLOAD src\module.f \ scoping support for modules sys-FLOAD src\interpif.f \ interpretive conditionals FLOAD src\paths.f \ multi path support words sys-fload src\imageman.f \ fsave, application & turnkey words sys-FLOAD src\486asm.f \ Jim's 486 assembler sys-FLOAD src\asmmac.f \ Jim's 486 macros sys-FLOAD src\asmwin32.f \ NEXT for Win32forth FLOAD src\pointer.f FLOAD src\callback.f \ windows callback support FLOAD src\primhash.f \ primitive hash functions for OOP later 8 constant B/FLOAT \ default to 8 byte floating point numbers FLOAD src\float.f \ floating point support sys-FLOAD src\see.f sys-FLOAD src\dis486.f \ load the disassembler sys-FLOAD src\dthread.f \ display threads sys-FLOAD src\winlib.f \ windows proc and memory debug words sys-FLOAD src\words.f FLOAD src\tools\dump.f \ HEX dump ( ******** ) FLOAD src\console\console2.f \ Console I/O part 2 sys-FLOAD src\debug.f FLOAD src\class.f \ ***** Object Oriented Programming Support ***** FLOAD src\scrnctrl.f \ screen control words FLOAD src\registry.f \ Win32 Registry support FLOAD src\ansfile.f \ ansi file words FLOAD src\keyboard.f \ function and special key constants FLOAD src\mapfile.f \ Windows32 file into memory mapping words sys-FLOAD src\environ.f \ environment? support FLOAD src\editor_io.f \ Communication between the editor and the console ( ******** ) FLOAD src\console\lineedit.f \ a line editor utility FLOAD src\Shell.f \ load SHELL utility words FLOAD src\utils.f \ load other misc utility words fload src\exceptio.f \ utility words to support windows exception handling sys-FLOAD src\dbgsrc1.f \ source level debugging support part one sys-FLOAD src\dbgsrc2.f \ source level debugging support part two sys-FLOAD src\classdbg.f \ Object Debugging FLOAD src\colors.f FLOAD src\fonts.f \ font class fload src\xfiledlg.f \ xcall replacements for open dialogs FLOAD src\PrintSupport.f \ replacement for the w32fPrint.dll FLOAD src\dc.f \ device context class FLOAD src\generic.f \ generic window class FLOAD src\window.f FLOAD src\childwnd.f \ child windows FLOAD src\winmsg.f FLOAD src\control.f FLOAD src\controls.f FLOAD src\button.f FLOAD src\dialog.f FLOAD src\menu.f FLOAD src\lib\BROWSEFLD.F \ SHBrowseForFolder() support ( ******** ) FLOAD src\console\forthdlg.f \ some dialogs for the console FLOAD src\keysave.f \ keyboard macro recording FLOAD src\tools\tools.f \ load various tool's when they are needed FLOAD src\lib\LoadProject.f \ Loads the latest known project FLOAD src\console\ConsoleMenu.f \ menu bar for the console ( ******** ) sys-FLOAD src\console\ConsoleStatBar.f \ status bar for the console window : oo ; FLOAD NewConsole.f create config$ ," WIN32FOR.CFG" create userconfig$ ," WIN32FORUSER.CFG" \ ........ set the default system access strings .......... \ -rbs make shell work in other drives : set-shell winver winnt351 >= if s" CMD.EXE " else s" c:\command.com " then 2dup dos$ place shell$ place s" /c " shell$ +place ; : .mem-free ( -- ) app-free 1000 / 1 u,.r ." k bytes free" ; in-system \ set title of the console window \ August 31st, 2003 - 13:24 dbu (SF-ID 778673) \ \ Note: If the window title for a stand alone Forth console window is changed here \ the word BuildWin32ForthName in SciEdit, WinEd and the IDE must be changed, too !!! : (ConsoleTitle) { \ $buff -- } 256 LocalAlloc: $buff S" Win32Forth " $buff place base @ decimal version# ((version)) $buff +place base ! $buff +NULL $buff 1+ CONHNDL call SetWindowText drop ; DEFER ConsoleTitle ' (ConsoleTitle) is ConsoleTitle : HELLO { \ doing-app? -- } \ startup stuff only forth also definitions action-of default-application ['] bye <> to doing-app? init-console \ -- f1 dup \ init if we created a console IF \ !!!! HAVE TO DO THE INITIALIZATION CHAIN !!!! \ !!!! BEFORE WE USE ANY WINDOWS SYSTEM CALLS !!!! initialization-chain do-chain ConsoleTitle \ set title of console window THEN \ normal-console c_init-console drop 0 call SetFocus drop NewConsole cls hidecursor: cmd exception@ 0= \ -- f1 f2 doing-app? 0= and \ if no app, display info IF cls set-shell THEN \ f1 -- IF doing-app? 0= \ if no app, display more info \ and load config file IF config$ count "path-file nip nip 0= \ if found IF config$ ['] $fload catch ?dup IF MESSAGE RESET-STACKS QUIT THEN \ tell the Editor that we are ready 0 ED_ALIVE editor-message THEN THEN ELSE exception@ IF CMDLINE DROP OFF \ reset commandline length .exception ELSE cr ." ** Warm Start Performed **" THEN THEN exception@ 0= \ if no exception doing-app? and \ and have an application to run IF default-application \ then run the users application bye \ and terminate when it's done THEN SetFocus: ConsoleWindow ; \in-system-ok ' hello is boot : LoadUserConfig ( -- ) \ load user configuration file userconfig$ COUNT "path-file NIP NIP 0= IF userconfig$ $FLOAD THEN ; in-application here fence ! mark empty cur-file off \ clear the default file cur-line off \ clear the current line cr cr .( Extensions Loaded, ) count-words . .( words in dictionary) cr \+ SaveInfo SaveInfo WIN32FOR.DBG \ save debugger information fsave Win32for \ save Win32For.EXE fload lib\Resources.f s" src\res\Win32For.ico" s" Win32for.exe" AddAppIcon 1 pause-seconds |