From: George H. <geo...@us...> - 2007-05-17 11:10:27
|
Update of /cvsroot/win32forth/win32forth/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv31044/win32forth/src Modified Files: ANSFILE.F CALLBACK.f Dialog.f Primutil.f Log Message: gah:moved caps-compare and caps-search to ansfile.f (as in the STC version) plus minor spelling corrections. Index: Primutil.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/src/Primutil.f,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** Primutil.f 10 Mar 2007 15:05:02 -0000 1.22 --- Primutil.f 17 May 2007 11:10:22 -0000 1.23 *************** *** 706,710 **** endof endcase to winver ! r>drop _localfree ; --- 706,710 ---- endof endcase to winver ! rdrop _localfree ; *************** *** 818,866 **** LCOUNT + 0 SWAP C! ; - - \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ - \ Some case insensitive version of search and compare - \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ - - \ enhanced caps-search for source string > 255 bytes - \ search for t-adr,t-len within string s-adr,s-len. f1=true if string was found - : CAPS-SEARCH ( c-addr1 u1 c-addr2 u2 -- c-addr3 u3 flag ) - \ *G Search the string specified by c-addr1 u1 for the string specified by c-addr2 u2, - \ ** using a case-insensitive search. \n - \ ** If flag is true, a match was found at c-addr3 with u3 characters remaining. \n - \ ** If flag is false there was no match and c-addr3 is c-addr1 and u3 is u1. - { s-adr s-len t-adr t-len \ t-buf t-str -- adr len flag } - MAXSTRING localalloc: t-str - s-len cell+ ALLOCATE 0= - IF to t-buf \ make a buffer big enough for s-adr - t-adr t-len t-str place - t-str count upper - s-adr t-buf s-len move - t-buf s-len upper - t-buf s-len t-str count search - IF nip \ discard found address - s-len swap - \ offset where string was found - s-adr s-len rot /string - \ location of found string in original buf - TRUE - ELSE 2drop - s-adr s-len FALSE - THEN - t-buf FREE drop - ELSE s-adr s-len FALSE \ failed, couldn't allocate buffer - THEN ; - - \ COMPARE compares two strings, ignoring case. The return value is: - \ - \ 0 = string1 = string2 - \ -1 = string1 < string2 - \ 1 = string1 > string2 - : CAPS-COMPARE { sa1 sn1 sa2 sn2 \ st1 st2 -- f1 } - MAXSTRING LocalAlloc: st1 - MAXSTRING LocalAlloc: st2 - sa1 sn1 st1 place st1 count upper - sa2 sn2 st2 place st2 count upper - st1 count st2 count compare ; - in-system --- 818,821 ---- Index: CALLBACK.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/src/CALLBACK.f,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** CALLBACK.f 12 May 2007 07:51:19 -0000 1.9 --- CALLBACK.f 17 May 2007 11:10:21 -0000 1.10 *************** *** 265,269 **** \ *G This windows message definition for WM_WIN32FORTH, provides a way for \ ** multiple Win32Forth applications to interact between themselves ! \ ** wile running. \ changed Sonntag, August 22 2004 dbu --- 265,269 ---- \ *G This windows message definition for WM_WIN32FORTH, provides a way for \ ** multiple Win32Forth applications to interact between themselves ! \ ** while running. \ changed Sonntag, August 22 2004 dbu Index: Dialog.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/src/Dialog.f,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Dialog.f 6 Feb 2006 17:48:17 -0000 1.5 --- Dialog.f 17 May 2007 11:10:22 -0000 1.6 *************** *** 32,36 **** lcount begin over r@ dialogID? ! if r>drop \ discard the ID drop \ discard the length \ return the template header address --- 32,36 ---- lcount begin over r@ dialogID? ! if rdrop \ discard the ID drop \ discard the length \ return the template header address *************** *** 82,86 **** :CLASS Dialog <SUPER Dialog&Control \ *G Dialog class. \n ! \ ** To use this class you have to create a ressource file (*.res) whitch must contain \ ** the dialog resource. Since Win32Forth doesn't provide any tool's to create a dialog \ ** resource you should use ForthForm to create your dialog windows instead. --- 82,86 ---- :CLASS Dialog <SUPER Dialog&Control \ *G Dialog class. \n ! \ ** To use this class you have to create a ressource file (*.res) which must contain \ ** the dialog resource. Since Win32Forth doesn't provide any tool's to create a dialog \ ** resource you should use ForthForm to create your dialog windows instead. *************** *** 199,203 **** :Class ModelessDialog <SUPER Dialog \ *G Modless Dialog class \n ! \ ** To use this class you have to create a ressource file (*.res) whitch must contain \ ** the dialog resource. Since Win32Forth doesn't provide any tool's to create a dialog \ ** resource you should use ForthForm to create your dialog windows instead. --- 199,203 ---- :Class ModelessDialog <SUPER Dialog \ *G Modless Dialog class \n ! \ ** To use this class you have to create a ressource file (*.res) which must contain \ ** the dialog resource. Since Win32Forth doesn't provide any tool's to create a dialog \ ** resource you should use ForthForm to create your dialog windows instead. Index: ANSFILE.F =================================================================== RCS file: /cvsroot/win32forth/win32forth/src/ANSFILE.F,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** ANSFILE.F 23 Sep 2006 09:49:37 -0000 1.9 --- ANSFILE.F 17 May 2007 11:10:21 -0000 1.10 *************** *** 73,76 **** --- 73,121 ---- 2 newuser wMilliseconds + \ ------------------------------------------------------------------------ + \ Some case insensitive version of search and compare + \ ------------------------------------------------------------------------ + + \ enhanced caps-search for source string > 255 bytes + \ search for t-adr,t-len within string s-adr,s-len. f1=true if string was found + : CAPS-SEARCH ( c-addr1 u1 c-addr2 u2 -- c-addr3 u3 flag ) + \ *G Search the string specified by c-addr1 u1 for the string specified by c-addr2 u2, + \ ** using a case-insensitive search. \n + \ ** If flag is true, a match was found at c-addr3 with u3 characters remaining. \n + \ ** If flag is false there was no match and c-addr3 is c-addr1 and u3 is u1. + { s-adr s-len t-adr t-len \ t-buf t-str -- adr len flag } + MAXSTRING localalloc: t-str + s-len cell+ ALLOCATE 0= + IF to t-buf \ make a buffer big enough for s-adr + t-adr t-len t-str place + t-str count upper + s-adr t-buf s-len move + t-buf s-len upper + t-buf s-len t-str count search + IF nip \ discard found address + s-len swap - \ offset where string was found + s-adr s-len rot /string + \ location of found string in original buf + TRUE + ELSE 2drop + s-adr s-len FALSE + THEN + t-buf FREE drop + ELSE s-adr s-len FALSE \ failed, couldn't allocate buffer + THEN ; + + \ COMPARE compares two strings, ignoring case. The return value is: + \ + \ 0 = string1 = string2 + \ -1 = string1 < string2 + \ 1 = string1 > string2 + : CAPS-COMPARE { sa1 sn1 sa2 sn2 \ st1 st2 -- f1 } + MAXSTRING LocalAlloc: st1 + MAXSTRING LocalAlloc: st2 + sa1 sn1 st1 place st1 count upper + sa2 sn2 st2 place st2 count upper + st1 count st2 count compare ; + + : get-fspace { zroot \ clus freclus b/sec s/clus -- as bs cs ds } \ *G Get a drive's free space, cluster and sector information |