From: Ezra B. <ezr...@us...> - 2008-08-24 04:07:00
|
Update of /cvsroot/win32forth/win32forth/src/lib In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv32134/src/lib Modified Files: ExUtils.f FileLister.f FolderView.f file.f Log Message: Slight enhancements. Folderview no longer needs conhndl. EAB Index: file.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/src/lib/file.f,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** file.f 13 Jan 2006 17:50:33 -0000 1.7 --- file.f 24 Aug 2008 04:06:56 -0000 1.8 *************** *** 257,262 **** --- 257,264 ---- \ *G load a file into the file-buffer, f=true on success Setname: self + mode >r \ save current mode r/o SetMode: self Open: self + r> SetMode: self \ restore mode if false exitm then FileSize: self drop AllocBuffer: self Index: FolderView.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/src/lib/FolderView.f,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** FolderView.f 30 Dec 2007 03:41:09 -0000 1.1 --- FolderView.f 24 Aug 2008 04:06:56 -0000 1.2 *************** *** 145,148 **** --- 145,149 ---- max-path 1+ bytes itemname int iconhandle + int itemhandle \ parent handle cell bytes index *************** *** 195,198 **** --- 196,200 ---- Win32_Find_Data sizeof(Win32_Find_Data) erase 0 to iconhandle + 0 to itemhandle -1 index ! ;M *************** *** 206,210 **** \ transfer the info _Win32-Find-Data Win32_Find_Data sizeof(Win32_Find_Data) move ! index itemname conhndl Call ExtractAssociatedIcon to iconhandle ;M --- 208,212 ---- \ transfer the info _Win32-Find-Data Win32_Find_Data sizeof(Win32_Find_Data) move ! index itemname itemhandle Call ExtractAssociatedIcon to iconhandle ;M *************** *** 218,221 **** --- 220,226 ---- iconhandle ;M + :M SetHandle: ( hwnd -- ) + to itemhandle ;M + ;Class *************** *** 365,370 **** ?do i >Link#: FolderList Data@: FolderList to item ! IconHandle: item ! hwndSmallIcons Call ImageList_AddIcon drop loop ; --- 370,375 ---- ?do i >Link#: FolderList Data@: FolderList to item ! IconHandle: item ?dup if ! hwndSmallIcons Call ImageList_AddIcon drop then loop ; *************** *** 374,379 **** ?do i >Link#: FolderList Data@: FolderList to item ! IconHandle: item ! hwndLargeIcons Call ImageList_AddIcon drop loop ; --- 379,384 ---- ?do i >Link#: FolderList Data@: FolderList to item ! IconHandle: item ?dup if ! hwndLargeIcons Call ImageList_AddIcon drop then loop ; *************** *** 383,386 **** --- 388,392 ---- if AddLink: FolderList then New> FolderItem dup Data!: FolderList to ThisItem + hwnd SetHandle: ThisItem ( str cnt ) SetUp: ThisItem ; Index: FileLister.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/src/lib/FileLister.f,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** FileLister.f 29 Jun 2008 05:12:40 -0000 1.8 --- FileLister.f 24 Aug 2008 04:06:56 -0000 1.9 *************** *** 106,109 **** --- 106,110 ---- int iconhandle + int itemhandle \ parent handle cell bytes index *************** *** 208,214 **** :M AddIcon: ( -- ) ! index itemname conhndl Call ExtractAssociatedIcon to iconhandle ;M \ Windows API say the following isn't necessary \ :M ~: ( -- ) --- 209,218 ---- :M AddIcon: ( -- ) ! index itemname itemhandle Call ExtractAssociatedIcon to iconhandle ;M + :M SetHandle: ( hwnd -- ) + to itemhandle ;M + \ Windows API say the following isn't necessary \ :M ~: ( -- ) *************** *** 448,451 **** --- 452,456 ---- if AddLink: FolderList then New> FolderItem dup Data!: FolderList to ThisItem + hwnd SetHandle: ThisItem ( str cnt ) UpdateList ; Index: ExUtils.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/src/lib/ExUtils.f,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** ExUtils.f 29 Jun 2008 05:12:40 -0000 1.11 --- ExUtils.f 24 Aug 2008 04:06:56 -0000 1.12 *************** *** 100,113 **** then addr cnt str2 cnt2 ; ! : (fload-buffer) { s1 c1 -- } \ compile a memory file \ We need to save the string because if interpreting a line and a value is \ left on the stack, e.g from "if", the system hangs somewhat begin c1 ! while s1 c1 readline-memory to c1 to s1 ! evaluate ! repeat ; ! : fload-buffer ( addr cnt -- ) ! TheBuffer (fload-buffer) ; \ : ExecuteFile { addr cnt hndl \ temp$ -- } \ open file using default application --- 100,133 ---- then addr cnt str2 cnt2 ; ! : (fload-buffer) { s1 c1 \ curstr curlen lcnt -- f } \ compile a memory file \ We need to save the string because if interpreting a line and a value is \ left on the stack, e.g from "if", the system hangs somewhat + 0 to lcnt begin c1 ! while 1 +to lcnt ! s1 c1 readline-memory to c1 to s1 ! 2dup to curlen to curstr ! ['] evaluate catch ?dup ! if new$ >r ! s" Compile error!\nLine " r@ place ! lcnt (.) r@ +place ! s" : " r@ +place ! curstr curlen r@ +place ! true dup r> count ?MessageBox ! exit ! then ! repeat false ; ! \ : (fload-buffer) { s1 c1 -- } \ compile a memory file ! \ We need to save the string because if interpreting a line and a value is ! \ left on the stack, e.g from "if", the system hangs somewhat ! \ begin c1 ! \ while s1 c1 readline-memory to c1 to s1 ! \ evaluate ! \ repeat ; ! ! ! : fload-buffer ( addr cnt -- ) ! TheBuffer (fload-buffer) drop ; \ : ExecuteFile { addr cnt hndl \ temp$ -- } \ open file using default application |