2011-05-11 18:16 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* contrib/hbnf/rand1.prg
* contrib/hbnf/mouse1.prg
* contrib/hbnf/pegs.prg
* contrib/hbnf/menu1.prg
* contrib/hbnf/popadder.prg
* contrib/hbnf/scregion.prg
* contrib/hbnf/mouse2.prg
* contrib/hbnf/menutonf.prg
* contrib/hbnf/pvid.prg
* contrib/hbnf/datecnfg.prg
* contrib/hbnf/ntow.prg
* contrib/hbnf/pending.prg
! fixed STATICs for MT
* marked const STATICs as such
This commit is contained in:
@@ -16,6 +16,22 @@
|
||||
The license applies to all entries newer than 2009-04-28.
|
||||
*/
|
||||
|
||||
2011-05-11 18:16 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
|
||||
* contrib/hbnf/rand1.prg
|
||||
* contrib/hbnf/mouse1.prg
|
||||
* contrib/hbnf/pegs.prg
|
||||
* contrib/hbnf/menu1.prg
|
||||
* contrib/hbnf/popadder.prg
|
||||
* contrib/hbnf/scregion.prg
|
||||
* contrib/hbnf/mouse2.prg
|
||||
* contrib/hbnf/menutonf.prg
|
||||
* contrib/hbnf/pvid.prg
|
||||
* contrib/hbnf/datecnfg.prg
|
||||
* contrib/hbnf/ntow.prg
|
||||
* contrib/hbnf/pending.prg
|
||||
! fixed STATICs for MT
|
||||
* marked const STATICs as such
|
||||
|
||||
2011-05-11 18:04 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
|
||||
* contrib/hbnf/scancode.prg
|
||||
* contrib/hbnf/vidmode.prg
|
||||
|
||||
@@ -231,7 +231,7 @@
|
||||
|
||||
FUNCTION FT_DATECNFG( cFYStart ,nDow )
|
||||
|
||||
STATIC aDatePar := { "1980.01.01", 1 }
|
||||
THREAD STATIC aDatePar := { "1980.01.01", 1 }
|
||||
|
||||
LOCAL dCheck, cDateFormat := SET(_SET_DATEFORMAT)
|
||||
|
||||
|
||||
@@ -62,8 +62,8 @@
|
||||
#define SCNONE 0
|
||||
#define SCNORMAL 1
|
||||
|
||||
STATIC ACHOICES := {}, AVALIDKEYS := {}
|
||||
STATIC NHPOS, NVPOS, NMAXROW, NMAXCOL
|
||||
THREAD STATIC ACHOICES := {}, AVALIDKEYS := {}
|
||||
THREAD STATIC NHPOS, NVPOS, NMAXROW, NMAXCOL
|
||||
|
||||
// BEGINNING OF DEMO PROGRAM
|
||||
#IFDEF FT_TEST
|
||||
|
||||
@@ -59,25 +59,25 @@
|
||||
|
||||
// These arrays hold information about each menu item
|
||||
|
||||
static aRow := {{}}
|
||||
static aCol := {{}}
|
||||
static aPrompt := {{}}
|
||||
static aColor := {{}}
|
||||
static aMsgRow := {{}}
|
||||
static aMsgCol := {{}}
|
||||
static aMessage := {{}}
|
||||
static aMsgColor := {{}}
|
||||
static aTrigger := {{}}
|
||||
static aTriggerInkey := {{}}
|
||||
static aTriggerColor := {{}}
|
||||
static aHome := {{}}
|
||||
static aEnd := {{}}
|
||||
static aUp := {{}}
|
||||
static aDown := {{}}
|
||||
static aLeft := {{}}
|
||||
static aRight := {{}}
|
||||
static aExecute := {{}}
|
||||
static nLevel := 1
|
||||
THREAD static aRow := {{}}
|
||||
THREAD static aCol := {{}}
|
||||
THREAD static aPrompt := {{}}
|
||||
THREAD static aColor := {{}}
|
||||
THREAD static aMsgRow := {{}}
|
||||
THREAD static aMsgCol := {{}}
|
||||
THREAD static aMessage := {{}}
|
||||
THREAD static aMsgColor := {{}}
|
||||
THREAD static aTrigger := {{}}
|
||||
THREAD static aTriggerInkey := {{}}
|
||||
THREAD static aTriggerColor := {{}}
|
||||
THREAD static aHome := {{}}
|
||||
THREAD static aEnd := {{}}
|
||||
THREAD static aUp := {{}}
|
||||
THREAD static aDown := {{}}
|
||||
THREAD static aLeft := {{}}
|
||||
THREAD static aRight := {{}}
|
||||
THREAD static aExecute := {{}}
|
||||
THREAD static nLevel := 1
|
||||
|
||||
function FT_Prompt( nRow, nCol, cPrompt, cColor, ;
|
||||
nMsgRow, nMsgCol, cMessage, cMsgColor, ;
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
static s_lCrsState:=.F.
|
||||
static s_lMinit:=.F.
|
||||
THREAD static s_lCrsState:=.F.
|
||||
THREAD static s_lMinit:=.F.
|
||||
|
||||
#ifdef FT_TEST
|
||||
|
||||
|
||||
@@ -66,9 +66,9 @@
|
||||
|
||||
#include "ftint86.ch"
|
||||
|
||||
static aReg[10]
|
||||
static lCrsState:=.F.
|
||||
static lMinit:=.F.
|
||||
THREAD static aReg[10]
|
||||
THREAD static lCrsState:=.F.
|
||||
THREAD static lMinit:=.F.
|
||||
|
||||
#ifdef FT_TEST
|
||||
|
||||
|
||||
@@ -21,20 +21,20 @@
|
||||
*
|
||||
*/
|
||||
|
||||
static ones := { "", " One", " Two", " Three", " Four", " Five", ;
|
||||
" Six", " Seven", " Eight", " Nine" ;
|
||||
}
|
||||
static sc_ones := { "", " One", " Two", " Three", " Four", " Five", ;
|
||||
" Six", " Seven", " Eight", " Nine" ;
|
||||
}
|
||||
|
||||
static teens := { " Ten", " Eleven", " Twelve", ;
|
||||
" Thirteen", " Fourteen", " Fifteen", ;
|
||||
" Sixteen", " Seventeen", " Eighteen", ;
|
||||
" Nineteen" ;
|
||||
}
|
||||
static sc_teens := { " Ten", " Eleven", " Twelve", ;
|
||||
" Thirteen", " Fourteen", " Fifteen", ;
|
||||
" Sixteen", " Seventeen", " Eighteen", ;
|
||||
" Nineteen" ;
|
||||
}
|
||||
|
||||
static tens := { "", "", " Twenty", " Thirty", " Forty", " Fifty", ;
|
||||
" Sixty", " Seventy", " Eighty", " Ninety" }
|
||||
static sc_tens := { "", "", " Twenty", " Thirty", " Forty", " Fifty", ;
|
||||
" Sixty", " Seventy", " Eighty", " Ninety" }
|
||||
|
||||
static qualifiers := { "", " Thousand", " Million", " Billion", " Trillion" }
|
||||
static sc_qualifiers := { "", " Thousand", " Million", " Billion", " Trillion" }
|
||||
|
||||
#ifdef FT_TEST
|
||||
function main( cNum )
|
||||
@@ -48,7 +48,7 @@ function ft_ntow(nAmount)
|
||||
nTemp := int(nAmount % nDiv)
|
||||
nAmount := int(nAmount / nDiv)
|
||||
nQualNo := int( sol10( nDiv ) / 3 ) + 1
|
||||
sResult += grp_to_words(nAmount, qualifiers[ nQualNo ] )
|
||||
sResult += grp_to_words(nAmount, sc_qualifiers[ nQualNo ] )
|
||||
|
||||
if nTemp > (nDiv /= 1000) .and. (nDiv > 1)
|
||||
sResult += ft_ntow( nTemp, nDiv )
|
||||
@@ -62,16 +62,16 @@ static function grp_to_words(nGrp, sQual)
|
||||
|
||||
nTemp := int(nGrp % 100)
|
||||
nGrp := int(nGrp / 100)
|
||||
sResult += ones[ nGrp + 1 ] + iif( nGrp > 0, " Hundred", "")
|
||||
sResult += sc_ones[ nGrp + 1 ] + iif( nGrp > 0, " Hundred", "")
|
||||
|
||||
do case
|
||||
case nTemp > 19
|
||||
sResult += tens[ int( nTemp / 10 ) + 1 ]
|
||||
sResult += ones[ int( nTemp % 10 ) + 1 ]
|
||||
sResult += sc_tens[ int( nTemp / 10 ) + 1 ]
|
||||
sResult += sc_ones[ int( nTemp % 10 ) + 1 ]
|
||||
case nTemp < 20 .and. nTemp > 9
|
||||
sResult += teens[ int( nTemp % 10 ) + 1 ]
|
||||
sResult += sc_teens[ int( nTemp % 10 ) + 1 ]
|
||||
case nTemp < 10 .and. nTemp > 0
|
||||
sResult += ones[ int( nTemp) + 1 ]
|
||||
sResult += sc_ones[ int( nTemp) + 1 ]
|
||||
endcase
|
||||
return sResult + sQual
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ memvar getlist
|
||||
board_[xx, 3] - subarray containing all target locations
|
||||
board_[xx, 4] - is the location occupied or not? .T. -> Yes, .F. -> No
|
||||
*/
|
||||
static board_ := { { {0, 29, 2, 34}, {2, 4}, {3, 9}, .T. } , ;
|
||||
THREAD static board_ := { { {0, 29, 2, 34}, {2, 4}, {3, 9}, .T. } , ;
|
||||
{ {0, 37, 2, 42}, {5}, {10}, .T.} , ;
|
||||
{ {0, 45, 2, 50}, {2, 6}, {1, 11}, .T. } , ;
|
||||
{ {3, 29, 5, 34}, {5, 9}, {6, 16}, .T. } , ;
|
||||
|
||||
@@ -34,8 +34,8 @@
|
||||
#endif
|
||||
|
||||
FUNCTION FT_PENDING (cMsg, nRow, nCol, nWait, cColor)
|
||||
STATIC nLast_Time := 0, nRow1 := 24, nCol1 := 0
|
||||
STATIC nWait1 := 5, cColor1 := 'W+/R,X'
|
||||
THREAD STATIC nLast_Time := 0, nRow1 := 24, nCol1 := 0
|
||||
THREAD STATIC nWait1 := 5, cColor1 := 'W+/R,X'
|
||||
LOCAL nThis_Time, nTiny := 0.1, cSavColor
|
||||
|
||||
*
|
||||
|
||||
@@ -120,7 +120,7 @@
|
||||
#define cTapeScr aAdder[23]
|
||||
|
||||
// I still use a few of STATICS, but most are set to NIL when quiting...
|
||||
STATIC lAdderOpen := .F., ;
|
||||
THREAD STATIC lAdderOpen := .F., ;
|
||||
aKeys, aWindow, nWinColor, aWinColor, aStdColor
|
||||
|
||||
#ifdef FT_TEST
|
||||
@@ -1255,7 +1255,7 @@ RETURN xVarVal
|
||||
*/
|
||||
FUNCTION _ftAdderTapeUDF(mode,cur_elem,rel_pos)
|
||||
LOCAL nKey,nRtnVal
|
||||
STATIC ac_exit_ok := .F.
|
||||
THREAD STATIC ac_exit_ok := .F.
|
||||
|
||||
HB_SYMBOL_UNUSED( cur_elem )
|
||||
HB_SYMBOL_UNUSED( rel_pos )
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
#define PV_MAXCOL 9
|
||||
#define PV_SCORE 10
|
||||
|
||||
static aVideo := {}
|
||||
THREAD static aVideo := {}
|
||||
|
||||
function FT_PushVid()
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
#endif
|
||||
|
||||
function ft_rand1(nMax)
|
||||
static nSeed
|
||||
THREAD static nSeed
|
||||
local m := 100000000, b := 31415621
|
||||
|
||||
nSeed := iif( nSeed == NIL, seconds(), nSeed ) // init_seed()
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
STATIC aRgnStack := {}
|
||||
THREAD STATIC aRgnStack := {}
|
||||
|
||||
FUNCTION FT_SAVRGN(nTop, nLeft, nBottom, nRight)
|
||||
|
||||
@@ -50,7 +50,7 @@ FUNCTION FT_RSTRGN(cScreen, nTop, nLeft)
|
||||
|
||||
FUNCTION FT_RGNSTACK(cAction, nTop, nLeft, nBottom, nRight)
|
||||
|
||||
STATIC nStackPtr := 0
|
||||
THREAD STATIC nStackPtr := 0
|
||||
LOCAL nPopTop
|
||||
|
||||
IF cAction == "push"
|
||||
|
||||
Reference in New Issue
Block a user