From: Dirk B. <db...@us...> - 2005-05-01 06:28:47
|
Update of /cvsroot/win32forth/win32forth/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29354/src Modified Files: WORDS.F Log Message: Fixed a bug in CONSTANTS Index: WORDS.F =================================================================== RCS file: /cvsroot/win32forth/win32forth/src/WORDS.F,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** WORDS.F 28 Apr 2005 16:01:25 -0000 1.2 --- WORDS.F 1 May 2005 06:28:38 -0000 1.3 *************** *** 5,8 **** --- 5,10 ---- only forth also definitions + in-system + \ display words from one or two patterns *************** *** 78,112 **** 0 value constant-cnt 0 value constant-tot - 0 value count-only? ! 3 CALLBACK: .WinConstant ( abs_adr len value -- f ) ! count-only? 0= ! if drop \ discard the constant's value ! 2dup match? ! if type 20 #tab space 20 ?cr ! 1 +to constant-cnt ! else 2drop ! then 1 +to constant-tot ! nuf? 0= ! else 3drop ! 1 +to constant-tot ! 1 ! then ; ! \ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ! \ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ! EXTERNAL ! : count-constants ( -- n1 ) \ count the constants available to system ! WinConPtr proc>cfa @ dodefer = \ Leave if 'wcFindWin32Constant' ! if 0 EXIT \ hasn't already been resolved ! then ! TRUE to count-only? ! 0 to constant-tot ! &.WinConstant ! 0 here ! CALL wcEnumWin32Constants DROP ! constant-tot ; : .words ( -- ) --- 80,103 ---- 0 value constant-cnt 0 value constant-tot ! 3 CALLBACK: .WinConstantCount ( abs_adr len value -- f ) ! 3drop 1 +to constant-tot 1 ; ! 3 CALLBACK: .WinConstant ( abs_adr len value -- f ) ! drop \ discard the constant's value ! 2dup match? ! if type 20 #tab space 20 ?cr ! 1 +to constant-cnt ! else 2drop ! then nuf? 0= ; ! : count-constants ( -- n1 ) \ count the constants available to system ! constant-tot 0= \ only count if not counted... ! if WinConPtr proc>cfa @ dodefer = \ Leave if 'wcFindWin32Constant' ! if 0 EXIT then \ hasn't already been resolved ! &.WinConstantCount 0 here CALL wcEnumWin32Constants DROP ! then constant-tot ; ! EXTERNAL : .words ( -- ) *************** *** 119,139 **** : CONSTANTS ( -<optional_name>- ) cr ! WinConPtr proc>cfa @ dodefer = \ Leave if 'wcFindWin32Constant' ! if ." WINCON.DLL missing" ! EXIT \ hasn't already been resolved ! then cr ." ----------- Windows Constants " horizontal-line ! 0 to constant-cnt ! 0 to constant-tot ! FALSE to count-only? ! &.WinConstant bl word ?uppercase count words-pocket place bl word ?uppercase drop ! 0 here ! CALL wcEnumWin32Constants DROP cr horizontal-line cr ." Displayed " constant-cnt . ." of the " ! constant-tot . ." Windows Constants in the system." ; : with-address ( -- ) --- 110,127 ---- : CONSTANTS ( -<optional_name>- ) cr ! ! WinConPtr proc>cfa @ dodefer = \ Leave if 'wcFindWin32Constant' ! if ." WINCON.DLL missing" EXIT then \ hasn't already been resolved ! cr ." ----------- Windows Constants " horizontal-line ! bl word ?uppercase count words-pocket place bl word ?uppercase drop ! &.WinConstant 0 here CALL wcEnumWin32Constants DROP ! cr horizontal-line cr ." Displayed " constant-cnt . ." of the " ! count-constants . ." Windows Constants in the system." ; : with-address ( -- ) *************** *** 162,168 **** then 0 to with-address? base @ >r decimal cr horizontal-line ! ." Displayed " words-cnt . ." of the " ! count-words . ." words in the system." cr ." ** Use: WORDS <substring> to limit the list **" cr ." ** Use: CONSTANTS <substring> to display Windows Constants **" --- 150,156 ---- then 0 to with-address? base @ >r decimal + cr horizontal-line ! ." Displayed " words-cnt . ." of the " count-words . ." words in the system." cr ." ** Use: WORDS <substring> to limit the list **" cr ." ** Use: CONSTANTS <substring> to display Windows Constants **" *************** *** 173,178 **** : WORDS ( -<optional_name>- ) \ WORDS partial-string will focus the list ! true to with-tabs? _words ! ; : on-allwords { theCFA \ vocBuf -- } --- 161,165 ---- : WORDS ( -<optional_name>- ) \ WORDS partial-string will focus the list ! true to with-tabs? _words ; : on-allwords { theCFA \ vocBuf -- } *************** *** 194,197 **** --- 181,185 ---- until drop ; + in-application MODULE \ end of the module |