From: Dirk B. <db...@us...> - 2008-12-19 12:46:46
|
Update of /cvsroot/win32forth/win32forth/src/kernel In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv21324/src/kernel Modified Files: fkernel.f Log Message: Moved &FORTHDIR into the kernel. Index: fkernel.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/src/kernel/fkernel.f,v retrieving revision 1.60 retrieving revision 1.61 diff -C2 -d -r1.60 -r1.61 *** fkernel.f 17 Dec 2008 10:17:23 -0000 1.60 --- fkernel.f 19 Dec 2008 12:46:36 -0000 1.61 *************** *** 5603,5610 **** 3 PROC GetModuleFileName ! 0 VALUE &PROGNAM \ pointer to program name buffer ! maxstring 6 * tiblen + equ buffs-len |: MAIN ( -- ) \ MAIN start forth main entry point --- 5603,5617 ---- 3 PROC GetModuleFileName + 1 PROC PathRemoveFileSpec ! 0 VALUE &PROGNAM ! \ *G The program name buffer ! \ ** (the name of the exe-file including the full path). ! 0 VALUE &FORTHDIR ! \ *G The Win32Forth installation directory ! \ ** (in turnkey applications it's the path of the exe-file). ! ! maxstring 7 * tiblen + equ buffs-len |: MAIN ( -- ) \ MAIN start forth main entry point *************** *** 5620,5627 **** maxstring + dup to SPCS maxstring + dup to &PROGNAM tiblen + (source) cell+ ! sys-size if \ when not turnkeyed sys-here locals-len sys-allot to LOCALS-AREA \ allocate buffers ! LOCALS-VOCINIT \ initialise then --- 5627,5635 ---- maxstring + dup to SPCS maxstring + dup to &PROGNAM + maxstring + dup to &FORTHDIR tiblen + (source) cell+ ! sys-size if \ when not turnkeyed sys-here locals-len sys-allot to LOCALS-AREA \ allocate buffers ! LOCALS-VOCINIT \ initialise then *************** *** 5632,5635 **** --- 5640,5651 ---- &prognam c! + MAXSTRING &forthdir char+ \ installation directory + appInst call GetModuleFileName dup + &forthdir c! + if &forthdir char+ dup call PathRemoveFileSpec drop + zcount nip &forthdir c! + s" \" &forthdir +place &forthdir +null + then + GETCMDLINE \ prepare the cmdline |