2012-09-29 17:24 UTC+0200 Viktor Szakats (harbour syenar.net)
* contrib/hbnf/aading.prg
* contrib/hbnf/clrsel.prg
* contrib/hbnf/dispmsg.prg
* contrib/hbnf/e2d.prg
* contrib/hbnf/elapsed.prg
* contrib/hbnf/floptst.prg
* contrib/hbnf/linked.prg
* contrib/hbnf/menutonf.prg
* contrib/hbnf/miltime.prg
* contrib/hbnf/ntow.prg
* contrib/hbnf/pchr.prg
* contrib/hbnf/pegs.prg
* contrib/hbnf/popadder.prg
* contrib/hbnf/tbwhile.prg
* contrib/hbnf/wda.prg
* manual formatting
* contrib/hbpre.hbm
* contrib/make.hb
! disable hbmk.hbm when detecting depdencies and building
contribs (contrib/hbnf/hbmk.hbm could cause troubles)
This commit is contained in:
@@ -16,6 +16,29 @@
|
||||
The license applies to all entries newer than 2009-04-28.
|
||||
*/
|
||||
|
||||
2012-09-29 17:24 UTC+0200 Viktor Szakats (harbour syenar.net)
|
||||
* contrib/hbnf/aading.prg
|
||||
* contrib/hbnf/clrsel.prg
|
||||
* contrib/hbnf/dispmsg.prg
|
||||
* contrib/hbnf/e2d.prg
|
||||
* contrib/hbnf/elapsed.prg
|
||||
* contrib/hbnf/floptst.prg
|
||||
* contrib/hbnf/linked.prg
|
||||
* contrib/hbnf/menutonf.prg
|
||||
* contrib/hbnf/miltime.prg
|
||||
* contrib/hbnf/ntow.prg
|
||||
* contrib/hbnf/pchr.prg
|
||||
* contrib/hbnf/pegs.prg
|
||||
* contrib/hbnf/popadder.prg
|
||||
* contrib/hbnf/tbwhile.prg
|
||||
* contrib/hbnf/wda.prg
|
||||
* manual formatting
|
||||
|
||||
* contrib/hbpre.hbm
|
||||
* contrib/make.hb
|
||||
! disable hbmk.hbm when detecting depdencies and building
|
||||
contribs (contrib/hbnf/hbmk.hbm could cause troubles)
|
||||
|
||||
2012-09-28 20:18 UTC+0200 Viktor Szakats (harbour syenar.net)
|
||||
* contrib/rddads/adsfunc.c
|
||||
! one other fix for ADS 6.00
|
||||
@@ -82,7 +105,7 @@
|
||||
|
||||
2012-09-28 01:20 UTC+0200 Viktor Szakats (harbour syenar.net)
|
||||
+ contrib/hbnf/hbmk.hbm
|
||||
+ added .hbm for to make it easy to build embedded test
|
||||
+ added automatic .hbm to make it easy to build embedded test
|
||||
code protected by FT_TEST macro
|
||||
(note most/some test code will fail in -w3 mode)
|
||||
|
||||
|
||||
@@ -68,7 +68,7 @@ FUNCTION FT_AADDITION( aList1, aList2, lTrimmer, lCaseSens )
|
||||
LOCAL nElement, nPos, bScanCode
|
||||
LOCAL aNewArray := AClone( aList1 )
|
||||
|
||||
// Set default parameters as necessary.
|
||||
// Set default parameters as necessary.
|
||||
IF lCaseSens == NIL
|
||||
lCaseSens := .T.
|
||||
ENDIF
|
||||
@@ -77,7 +77,7 @@ FUNCTION FT_AADDITION( aList1, aList2, lTrimmer, lCaseSens )
|
||||
lTrimmer := .T.
|
||||
ENDIF
|
||||
|
||||
// Assign code blocks according to case sensitivity and trim.
|
||||
// Assign code blocks according to case sensitivity and trim.
|
||||
IF lCaseSens
|
||||
|
||||
IF lTrimmer // Ignore spaces.
|
||||
@@ -101,7 +101,7 @@ FUNCTION FT_AADDITION( aList1, aList2, lTrimmer, lCaseSens )
|
||||
ENDIF
|
||||
ENDIF
|
||||
|
||||
// Add the unique elements of aList2 to aList1.
|
||||
// Add the unique elements of aList2 to aList1.
|
||||
FOR nElement := 1 TO Len( aList2 )
|
||||
|
||||
nPos := AScan( aList1, bScanCode )
|
||||
|
||||
@@ -63,17 +63,17 @@
|
||||
#define C_CHAR 4
|
||||
|
||||
#translate Single( <t>, <l>, <b>, <r> ) =>;
|
||||
@ < t > , < l > , < b > , < r > BOX hb_UTF8ToStr( "┌─┐│┘─└│" )
|
||||
@ <t>, <l>, <b>, <r> BOX hb_UTF8ToStr( "┌─┐│┘─└│" )
|
||||
|
||||
|
||||
#translate Double( <t>, <l>, <b>, <r> ) =>;
|
||||
@ < t > , < l > , < b > , < r > BOX hb_UTF8ToStr( "╔═╗║╝═╚║" )
|
||||
@ <t>, <l>, <b>, <r> BOX hb_UTF8ToStr( "╔═╗║╝═╚║" )
|
||||
|
||||
#translate ClearS( <t>, <l>, <b>, <r> ) =>;
|
||||
@ < t > , < l > CLEAR TO < b > , < r >
|
||||
@ <t>, <l> CLEAR TO <b>, <r>
|
||||
|
||||
#translate BkGrnd( <t>, <l>, <b>, <r>, <c> ) =>;
|
||||
DispBox( < t > , < l > , < b > , < r > , Replicate( < c > ,9 ) )
|
||||
DispBox( <t>, <l>, <b>, <r>, Replicate( <c>, 9 ) )
|
||||
|
||||
//------------------------------------------------
|
||||
// Demo of FT_ClrSel()
|
||||
|
||||
@@ -71,16 +71,16 @@ PROCEDURE Main()
|
||||
|
||||
FT_DispMsg( { { "[Esc] To Abort Changes [PgDn] To Continue" }, { cNormN, , cNormH } }, , nMaxRow - 5 )
|
||||
|
||||
FT_DispMsg( { { "[E]dit [P]rint [D]elete", ;
|
||||
"[Esc]ape [Alt-Q]" }, ;
|
||||
FT_DispMsg( { { "[E]dit [P]rint [D]elete", ;
|
||||
"[Esc]ape [Alt-Q]" }, ;
|
||||
{ cErrN, cErrN, cErrH } }, , 2 )
|
||||
|
||||
nType := FT_DispMsg( { { ;
|
||||
"Create Or Edit [I]nvoice", ;
|
||||
"Create Or Edit [O]rder", ;
|
||||
"Create Or Edit [B]ack Order", ;
|
||||
"Create Or Edit [Q]uote", ;
|
||||
"[Esc] To Exit" }, ;
|
||||
"Create Or Edit [I]nvoice" ,;
|
||||
"Create Or Edit [O]rder" ,;
|
||||
"Create Or Edit [B]ack Order" ,;
|
||||
"Create Or Edit [Q]uote" ,;
|
||||
"[Esc] To Exit" } ,;
|
||||
{ cWindN, , , , , cWindH } }, "BIOQ" + Chr( K_ESC ) )
|
||||
|
||||
HB_SYMBOL_UNUSED( nType )
|
||||
@@ -154,8 +154,8 @@ FUNCTION FT_DispMsg( aInfo, cKey, nBoxTop, nBoxLeft, cnBoxString, lShadow )
|
||||
ENDIF
|
||||
nBoxBottom := nBoxTop + Len( aInfo[ 1 ] ) + 1
|
||||
|
||||
// following is to keep from breaking old code and to be
|
||||
// consistent with DISPBOX()
|
||||
// following is to keep from breaking old code and to be
|
||||
// consistent with DISPBOX()
|
||||
|
||||
IF cnBoxString == NIL .OR. cnBoxString == 2
|
||||
cnBoxString := hb_UTF8ToStr( "╔═╗║╝═╚║ " )
|
||||
@@ -169,7 +169,7 @@ FUNCTION FT_DispMsg( aInfo, cKey, nBoxTop, nBoxLeft, cnBoxString, lShadow )
|
||||
|
||||
cOldCursor := SetCursor( SC_NONE )
|
||||
|
||||
// draw box
|
||||
// draw box
|
||||
cOldColor := SetColor( aInfo[ 2, Len( aInfo[ 2 ] ) ] )
|
||||
|
||||
DispBox( nBoxTop, nBoxLeft, nBoxBottom, nBoxRight, cnBoxString, ;
|
||||
@@ -204,10 +204,10 @@ FUNCTION FT_DispMsg( aInfo, cKey, nBoxTop, nBoxLeft, cnBoxString, lShadow )
|
||||
FOR i := 1 TO Len( aPos )
|
||||
FOR j := 1 TO Len( aPos[ i ] )
|
||||
|
||||
FT_SetAttr( nBoxTop + i, ;
|
||||
aPos[ i, j, 1 ] + aLeft[ i ] - 1, ;
|
||||
nBoxTop + i, ;
|
||||
aPos[ i, j, 2 ] + aLeft[ i ] - 1, ;
|
||||
FT_SetAttr( nBoxTop + i, ;
|
||||
aPos[ i, j, 1 ] + aLeft[ i ] - 1, ;
|
||||
nBoxTop + i, ;
|
||||
aPos[ i, j, 2 ] + aLeft[ i ] - 1, ;
|
||||
FT_Color2N( aInfo[ 2, Len( aInfo[ 2 ] ) ] ) )
|
||||
NEXT
|
||||
NEXT
|
||||
|
||||
@@ -38,10 +38,10 @@ FUNCTION ft_e2d( sNumE )
|
||||
LOCAL nMant, nExp
|
||||
|
||||
nMant := Val( Left( sNumE, At( "E", sNumE ) - 1 ) )
|
||||
nExp := Val( SubStr( sNumE, ;
|
||||
At( "E", sNumE ) + 1, ;
|
||||
nExp := Val( SubStr( sNumE, ;
|
||||
At( "E", sNumE ) + 1, ;
|
||||
Len( sNumE ) - At( "E", sNumE ) ;
|
||||
) ;
|
||||
) ;
|
||||
)
|
||||
|
||||
RETURN nMant * 10 ^ nExp
|
||||
|
||||
@@ -39,7 +39,7 @@ PROCEDURE Main()
|
||||
|
||||
aDataTest := FT_ELAPSED( dStart, dEnd, cTimeStart, cTimeEnd )
|
||||
FOR n := 1 TO 4
|
||||
? aDataTest[n,1], Str( aDataTest[n,2], 12, 4 )
|
||||
? aDataTest[ n, 1 ], Str( aDataTest[ n, 2 ], 12, 4 )
|
||||
?? " "
|
||||
?? iif( n == 1, "Days", iif( n == 2, "Hours", iif( n == 3, "Mins.", "Secs." ) ) )
|
||||
NEXT
|
||||
@@ -50,16 +50,16 @@ PROCEDURE Main()
|
||||
|
||||
FUNCTION FT_ELAPSED( dStart, dEnd, cTimeStart, cTimeEnd )
|
||||
|
||||
LOCAL nTotalSec, nCtr, nConstant, nTemp, aRetVal[4,2]
|
||||
LOCAL nTotalSec, nCtr, nConstant, nTemp, aRetVal[ 4, 2 ]
|
||||
|
||||
IF ! ( ValType( dStart ) $ "DC" )
|
||||
IF !( ValType( dStart ) $ "DC" )
|
||||
dStart := Date()
|
||||
ELSEIF HB_ISSTRING( dStart )
|
||||
cTimeStart := dStart
|
||||
dStart := Date()
|
||||
ENDIF
|
||||
|
||||
IF ! ( ValType( dEnd ) $ "DC" )
|
||||
IF !( ValType( dEnd ) $ "DC" )
|
||||
dEnd := Date()
|
||||
ELSEIF HB_ISSTRING( dEnd )
|
||||
cTimeEnd := dEnd
|
||||
@@ -71,7 +71,7 @@ FUNCTION FT_ELAPSED( dStart, dEnd, cTimeStart, cTimeEnd )
|
||||
|
||||
nTotalSec := ( dEnd - dStart ) * 86400 + ;
|
||||
Val( cTimeEnd ) * 3600 + ;
|
||||
Val( SubStr( cTimeEnd, At( ":", cTimeEnd ) + 1,2 ) ) * 60 + ;
|
||||
Val( SubStr( cTimeEnd, At( ":", cTimeEnd ) + 1, 2 ) ) * 60 + ;
|
||||
iif( RAt( ":", cTimeEnd ) == At( ":", cTimeEnd ), 0, ;
|
||||
Val( SubStr( cTimeEnd, RAt( ":", cTimeEnd ) + 1 ) ) ) - ;
|
||||
Val( cTimeStart ) * 3600 - ;
|
||||
|
||||
@@ -35,8 +35,6 @@
|
||||
* File header changed to conform to Toolkit standard.
|
||||
*/
|
||||
|
||||
///
|
||||
|
||||
#include "ftint86.ch"
|
||||
|
||||
#define ERR_WRONG_PARAMETERS -1
|
||||
@@ -63,9 +61,8 @@ PROCEDURE Main( cArg1 )
|
||||
|
||||
#endif
|
||||
|
||||
FUNCTION FT_FLOPTST( ; // error code defined by ERR_*
|
||||
nDriveNum_i ; // letter of floppy drive.
|
||||
)
|
||||
// error code defined by ERR_*
|
||||
FUNCTION FT_FLOPTST( nDriveNum_i /* letter of floppy drive */ )
|
||||
LOCAL cBuffer
|
||||
LOCAL nErrorCode
|
||||
LOCAL nRetCode
|
||||
@@ -112,7 +109,7 @@ STATIC FUNCTION _GetDisketteNum( nDrive_i ) // drive number to query status
|
||||
LOCAL nByte
|
||||
LOCAL nDriveCount
|
||||
|
||||
// ASSERT 0 <= nDrive_i
|
||||
// ASSERT 0 <= nDrive_i
|
||||
|
||||
lRetCode := .F.
|
||||
IF FT_INT86( 1 * 16 + 1, aRegs ) // INT for equipment determination
|
||||
@@ -141,13 +138,13 @@ STATIC PROCEDURE _ResetDisketteSystem()
|
||||
|
||||
#define BUFFER_SIZEOF_SECTOR 512+1
|
||||
|
||||
STATIC FUNCTION _ReadBootSector( ;
|
||||
nDriveNum, ;
|
||||
cBuffer_o, ;
|
||||
nErrCode_o ;
|
||||
STATIC FUNCTION _ReadBootSector( ;
|
||||
nDriveNum, ;
|
||||
cBuffer_o, ;
|
||||
nErrCode_o ;
|
||||
)
|
||||
|
||||
// call BIOS INT 13 for sector read
|
||||
// call BIOS INT 13 for sector read
|
||||
LOCAL aRegs[ INT86_MAX_REGS ]
|
||||
LOCAL cBuffer := Space( BUFFER_SIZEOF_SECTOR )
|
||||
LOCAL lSuccess
|
||||
@@ -167,13 +164,13 @@ STATIC FUNCTION _ReadBootSector( ;
|
||||
|
||||
RETURN lSuccess
|
||||
|
||||
STATIC FUNCTION _WriteBootSector( ;
|
||||
nDriveNum, ;
|
||||
cBuffer_i, ;
|
||||
nErrCode_o ;
|
||||
STATIC FUNCTION _WriteBootSector( ;
|
||||
nDriveNum, ;
|
||||
cBuffer_i, ;
|
||||
nErrCode_o ;
|
||||
)
|
||||
|
||||
// call BIOS INT 13 for sector write
|
||||
// call BIOS INT 13 for sector write
|
||||
LOCAL aRegs[INT86_MAX_REGS]
|
||||
LOCAL lSuccess
|
||||
LOCAL nErrorCode
|
||||
@@ -191,10 +188,10 @@ STATIC FUNCTION _WriteBootSector( ;
|
||||
|
||||
RETURN lSuccess
|
||||
|
||||
STATIC FUNCTION _CallInt13hRetry( ; // logical: did the interrupt succeed?
|
||||
aRegs_io, ; // registers values for INT 13h
|
||||
lCarrySet_o, ; // status of carry flag if return code is true.
|
||||
nDriveStatus_o ; // status of drive ( error code )
|
||||
STATIC FUNCTION _CallInt13hRetry( ; // logical: did the interrupt succeed?
|
||||
aRegs_io, ; // registers values for INT 13h
|
||||
lCarrySet_o, ; // status of carry flag if return code is true.
|
||||
nDriveStatus_o ; // status of drive ( error code )
|
||||
)
|
||||
LOCAL lCarrySet
|
||||
LOCAL aRegisters
|
||||
|
||||
@@ -28,18 +28,17 @@
|
||||
PROCEDURE Main()
|
||||
|
||||
LOCAL aString := { ;
|
||||
"TRIM('abc ')", ;
|
||||
"NotARealFunc()", ;
|
||||
"FT_DispMsg()", ;
|
||||
'TRIM(cVar+"abc"+LEFT(cString)), FOUND()', ;
|
||||
"IsItLinked()", ;
|
||||
"lRetVal := FOUND()", ;
|
||||
"!EOF() .AND. MONTH(DATE())=12 .AND. YeeHa()", ;
|
||||
"!EOF() .AND. MONTH(DATE())=12", ;
|
||||
"!EOF() .AND. MONTH(DATE(YeeHa()))=12", ;
|
||||
"LEFT(SUBSTR(nNum,4,VAL(cChar+ASC(c))))", ;
|
||||
"EOF(>> Note: Syntax IS NOT checked! <<)" ;
|
||||
}
|
||||
"RTrim('abc ')" ,;
|
||||
"NotARealFunc()" ,;
|
||||
"FT_DispMsg()" ,;
|
||||
'RTrim(cVar+"abc"+Left(cString)), Found()' ,;
|
||||
"IsItLinked()" ,;
|
||||
"lRetVal := Found()" ,;
|
||||
"!EOF() .AND. Month(Date())=12 .AND. YeeHa()" ,;
|
||||
"!EOF() .AND. Month(Date())=12" ,;
|
||||
"!EOF() .AND. Month(Date(YeeHa()))=12" ,;
|
||||
"Left(SubStr(nNum,4,Val(cChar+Asc(c))))" ,;
|
||||
"EOF(>> Note: Syntax IS NOT checked! <<)" }
|
||||
|
||||
CLS
|
||||
@ 1, 0 SAY "String Tested Result"
|
||||
@@ -51,15 +50,12 @@ PROCEDURE Main()
|
||||
|
||||
#endif
|
||||
|
||||
//------------------------------------------------
|
||||
|
||||
FUNCTION FT_Linked( cFuncs )
|
||||
|
||||
// A function is detected by the left parenthesis, "(", and it begins
|
||||
// at the space, comma or start-of-string preceeding the "("
|
||||
|
||||
// Returns: .T. if all functions are available,
|
||||
// .F. if not
|
||||
FUNCTION FT_Linked( cFuncs )
|
||||
|
||||
LOCAL aFuncArray := {}, nSpace, nComma, nFEnd, lRetVal := .F.
|
||||
|
||||
|
||||
@@ -37,13 +37,13 @@
|
||||
#include "inkey.ch"
|
||||
|
||||
#xtranslate display( <row>, <col>, <stuff>, <color> ) => ;
|
||||
SetPos( < row > , < col > ) ; DispOut( < stuff > , < color > )
|
||||
SetPos( <row>, <col> ); DispOut( <stuff>, <color> )
|
||||
|
||||
#xtranslate EnhColor( <colorspec> ) => ;
|
||||
SubStr( < colorspec > , At( ",", < colorspec > ) + 1 )
|
||||
SubStr( <colorspec>, At( ",", <colorspec> ) + 1 )
|
||||
|
||||
#xtranslate isOkay( <exp> ) => ;
|
||||
( < exp > \ > 0 .AND. < exp > \ <= nCount )
|
||||
( <exp> \ > 0 .AND. <exp> \ <= nCount )
|
||||
|
||||
#xtranslate isBetween( <val>, <lower>, <upper> ) => ;
|
||||
( < val > \ >= < lower > .AND. < val > \ <= < upper > )
|
||||
@@ -75,18 +75,18 @@ THREAD STATIC t_aRight := { {} }
|
||||
THREAD STATIC t_aExecute := { {} }
|
||||
THREAD STATIC t_nLevel := 1
|
||||
|
||||
FUNCTION FT_Prompt( nRow, nCol, cPrompt, cColor, ;
|
||||
nMsgRow, nMsgCol, cMessage, cMsgColor, ;
|
||||
nTrigger, cTriggerColor, nHome, nEnd, ;
|
||||
nUp, nDown, nLeft, nRight, bExecute )
|
||||
FUNCTION FT_Prompt( nRow, nCol, cPrompt, cColor, ;
|
||||
nMsgRow, nMsgCol, cMessage, cMsgColor, ;
|
||||
nTrigger, cTriggerColor, nHome, nEnd, ;
|
||||
nUp, nDown, nLeft, nRight, bExecute )
|
||||
|
||||
// If the prompt color setting is not specified, use default
|
||||
// If the prompt color setting is not specified, use default
|
||||
|
||||
IF cColor == NIL
|
||||
cColor := SetColor()
|
||||
ENDIF
|
||||
|
||||
// If no message is supplied, set message values to NIL
|
||||
// If no message is supplied, set message values to NIL
|
||||
|
||||
IF cMessage == NIL
|
||||
|
||||
@@ -117,7 +117,7 @@ FUNCTION FT_Prompt( nRow, nCol, cPrompt, cColor, ;
|
||||
ENDIF
|
||||
ENDIF
|
||||
|
||||
// If trigger values not specifed, set the defaults
|
||||
// If trigger values not specifed, set the defaults
|
||||
|
||||
IF nTrigger == NIL
|
||||
nTrigger := 1
|
||||
@@ -126,8 +126,8 @@ FUNCTION FT_Prompt( nRow, nCol, cPrompt, cColor, ;
|
||||
cTriggerColor := cColor
|
||||
ENDIF
|
||||
|
||||
// Now add elements to the static arrays -- t_nLevel indicates the recursion
|
||||
// level, which allows for nested menus.
|
||||
// Now add elements to the static arrays -- t_nLevel indicates the recursion
|
||||
// level, which allows for nested menus.
|
||||
|
||||
AAdd( t_aRow[ t_nLevel ], nRow )
|
||||
AAdd( t_aCol[ t_nLevel ], nCol )
|
||||
@@ -148,7 +148,7 @@ FUNCTION FT_Prompt( nRow, nCol, cPrompt, cColor, ;
|
||||
AAdd( t_aRight[ t_nLevel ], nRight )
|
||||
AAdd( t_aExecute[ t_nLevel ], bExecute )
|
||||
|
||||
// Now display the prompt for the sake of compatibility
|
||||
// Now display the prompt for the sake of compatibility
|
||||
|
||||
DispBegin()
|
||||
DISPLAY( nRow, nCol, cPrompt, cColor )
|
||||
@@ -170,8 +170,8 @@ FUNCTION FT_MenuTo( bGetSet, cReadVar, lCold )
|
||||
lCold := .F.
|
||||
ENDIF
|
||||
|
||||
// Validate the incoming parameters and assign some reasonable defaults
|
||||
// to prevent a crash later.
|
||||
// Validate the incoming parameters and assign some reasonable defaults
|
||||
// to prevent a crash later.
|
||||
|
||||
cReadVar := iif( cReadVar == NIL, "", Upper( cReadVar ) )
|
||||
|
||||
@@ -179,9 +179,9 @@ FUNCTION FT_MenuTo( bGetSet, cReadVar, lCold )
|
||||
bGetSet := {|| 1 }
|
||||
ENDIF
|
||||
|
||||
// Eval the incoming getset block to initialize nActive, which indicates
|
||||
// the menu prompt which is to be active when the menu is first displayed.
|
||||
// If nActive is outside the appropriate limits, a value of 1 is assigned.
|
||||
// Eval the incoming getset block to initialize nActive, which indicates
|
||||
// the menu prompt which is to be active when the menu is first displayed.
|
||||
// If nActive is outside the appropriate limits, a value of 1 is assigned.
|
||||
|
||||
nActive := Eval( bGetSet )
|
||||
|
||||
@@ -189,9 +189,9 @@ FUNCTION FT_MenuTo( bGetSet, cReadVar, lCold )
|
||||
nActive := 1
|
||||
ENDIF
|
||||
|
||||
// Increment the recursion level in case a hotkey procedure
|
||||
// calls FT_Prompt(). This will cause a new set of prompts
|
||||
// to be created without disturbing the current set.
|
||||
// Increment the recursion level in case a hotkey procedure
|
||||
// calls FT_Prompt(). This will cause a new set of prompts
|
||||
// to be created without disturbing the current set.
|
||||
|
||||
AAdd( t_aRow, {} )
|
||||
AAdd( t_aCol, {} )
|
||||
@@ -210,7 +210,7 @@ FUNCTION FT_MenuTo( bGetSet, cReadVar, lCold )
|
||||
AAdd( t_aRight, {} )
|
||||
AAdd( t_aExecute, {} )
|
||||
|
||||
// Loop until Enter or Esc is pressed
|
||||
// Loop until Enter or Esc is pressed
|
||||
|
||||
WHILE ! lChoice
|
||||
|
||||
@@ -386,8 +386,8 @@ FUNCTION FT_MenuTo( bGetSet, cReadVar, lCold )
|
||||
ENDIF
|
||||
ENDDO
|
||||
|
||||
// Now that we're exiting, decrement the recursion level and erase all
|
||||
// the prompt information for the current invocation.
|
||||
// Now that we're exiting, decrement the recursion level and erase all
|
||||
// the prompt information for the current invocation.
|
||||
|
||||
t_nLevel--
|
||||
|
||||
|
||||
@@ -77,19 +77,19 @@ FUNCTION FT_MIL2CIV( cMILTIME )
|
||||
|
||||
LOCAL cHRS, cMINS, nHRS, cCIVTIME
|
||||
|
||||
nHRS := Val( Left( cMILTIME,2 ) )
|
||||
nHRS := Val( Left( cMILTIME, 2 ) )
|
||||
cMINS := Right( cMILTIME, 2 )
|
||||
|
||||
DO CASE
|
||||
CASE ( nHRS == 24 .OR. nHRS == 0 ) .AND. ( cMINS == "00" ) // Midnight
|
||||
CASE ( nHRS == 24 .OR. nHRS == 0 ) .AND. cMINS == "00" // Midnight
|
||||
cCIVTIME := "12:00 m"
|
||||
CASE ( nHRS == 12 ) // Noon to 12:59pm
|
||||
CASE nHRS == 12 // Noon to 12:59pm
|
||||
IF cMINS == "00"
|
||||
cCIVTIME := "12:00 n"
|
||||
ELSE
|
||||
cCIVTIME := "12:" + cMINS + " pm"
|
||||
ENDIF
|
||||
CASE ( nHRS < 12 ) // AM
|
||||
CASE nHRS < 12 // AM
|
||||
IF nHRS == 0
|
||||
cHRS := "12"
|
||||
ELSE
|
||||
@@ -108,15 +108,15 @@ FUNCTION FT_CIV2MIL( cTIME )
|
||||
|
||||
LOCAL cKEY, cMILTIME
|
||||
|
||||
//** Insure leading 0's
|
||||
//** Insure leading 0's
|
||||
cTIME := Replicate( "0", 3 - At( ":", LTrim( cTIME ) ) ) + LTrim( cTIME )
|
||||
|
||||
//** Adjust for popular use of '12' for first hour after noon and midnight
|
||||
//** Adjust for popular use of '12' for first hour after noon and midnight
|
||||
IF Left( LTrim( cTIME ), 2 ) == "12"
|
||||
cTIME := Stuff( cTIME, 1, 2, "00" )
|
||||
ENDIF
|
||||
|
||||
//** am, pm, noon or midnight
|
||||
//** am, pm, noon or midnight
|
||||
cKEY := SubStr( LTrim( cTIME ), 7, 1 )
|
||||
|
||||
DO CASE
|
||||
@@ -139,7 +139,7 @@ FUNCTION FT_CIV2MIL( cTIME )
|
||||
cMILTIME := Right( "00" + hb_ntos( Val( Left( cTIME, 2 ) ) + 12 ), 2 ) + ;
|
||||
SubStr( cTIME, 4, 2 )
|
||||
OTHERWISE
|
||||
cMILTIME := " " // error
|
||||
cMILTIME := " " // error
|
||||
ENDCASE
|
||||
|
||||
RETURN cMILTIME
|
||||
|
||||
@@ -20,14 +20,14 @@
|
||||
*
|
||||
*/
|
||||
|
||||
STATIC sc_ones := { "", " One", " Two", " Three", " Four", " Five", ;
|
||||
" Six", " Seven", " Eight", " Nine" ;
|
||||
STATIC sc_ones := { "", " One", " Two", " Three", " Four", " Five", ;
|
||||
" Six", " Seven", " Eight", " Nine" ;
|
||||
}
|
||||
|
||||
STATIC sc_teens := { " Ten", " Eleven", " Twelve", ;
|
||||
" Thirteen", " Fourteen", " Fifteen", ;
|
||||
STATIC sc_teens := { " Ten", " Eleven", " Twelve", ;
|
||||
" Thirteen", " Fourteen", " Fifteen", ;
|
||||
" Sixteen", " Seventeen", " Eighteen", ;
|
||||
" Nineteen" ;
|
||||
" Nineteen" ;
|
||||
}
|
||||
|
||||
STATIC sc_tens := { "", "", " Twenty", " Thirty", " Forty", " Fifty", ;
|
||||
|
||||
@@ -28,23 +28,25 @@
|
||||
but only if _SET_EXACT was set to .F., Harbour accepts them
|
||||
that way regardless of _SET_EXACT setting. [vszakats] */
|
||||
|
||||
#define LEFTEQUAL( l, r ) ( Left( l, Len( r ) ) == r )
|
||||
|
||||
FUNCTION FT_PCHR( c_nums )
|
||||
|
||||
LOCAL c_ret := "", c_st := 0, c_part, c_st2, c_hex := "0123456789ABCDEF"
|
||||
LOCAL c_upper, c_t1, c_t2
|
||||
|
||||
IF SubStr( c_nums, 1, 1 ) == "," .OR. Trim( c_nums ) == ""
|
||||
IF SubStr( c_nums, 1, 1 ) == "," .OR. RTrim( c_nums ) == ""
|
||||
RETURN ""
|
||||
ENDIF
|
||||
|
||||
c_nums := Trim( c_nums ) + ",~,"
|
||||
c_nums := RTrim( c_nums ) + ",~,"
|
||||
c_part := SubStr( c_nums, c_st + 1, At( ",", SubStr( c_nums, c_st + 2 ) ) )
|
||||
|
||||
DO WHILE ! ( c_part == "~" .OR. c_part == "" )
|
||||
|
||||
IF SubStr( c_part, 1, 1 ) == '"'
|
||||
|
||||
c_st2 := At( '"', SubStr( c_part,2 ) ) + 1
|
||||
c_st2 := At( '"', SubStr( c_part, 2 ) ) + 1
|
||||
c_ret := c_ret + SubStr( c_part, 2, c_st2 - 2 )
|
||||
|
||||
ELSEIF SubStr( c_part, 1, 1 ) == "&"
|
||||
@@ -69,8 +71,6 @@ FUNCTION FT_PCHR( c_nums )
|
||||
|
||||
c_upper := Upper( c_part )
|
||||
|
||||
#define LEFTEQUAL( l, r ) ( Left( l, Len( r ) ) == r )
|
||||
|
||||
DO CASE
|
||||
CASE LEFTEQUAL( c_upper, "/GRAPHIC" )
|
||||
c_ret += hb_BChar( 27 ) + hb_BChar( 116 ) + hb_BChar( 1 )
|
||||
|
||||
@@ -163,7 +163,7 @@ FUNCTION FT_PEGS()
|
||||
STATIC FUNCTION DrawBox( nelement )
|
||||
|
||||
SetColor( iif( t_board_[ nelement ][ 4 ], "+w/rb", "w/n" ) )
|
||||
@ t_board_[ nelement ][ 1, 1 ], t_board_[ nelement ][1,2], t_board_[ nelement ][ 1, 3 ], ;
|
||||
@ t_board_[ nelement ][ 1, 1 ], t_board_[ nelement ][ 1, 2 ], t_board_[ nelement ][ 1, 3 ], ;
|
||||
t_board_[ nelement ][ 1, 4 ] BOX hb_UTF8ToStr( "┌─┐│┘─└│ " )
|
||||
DevPos( t_board_[ nelement ][ 1, 1 ] + 1, t_board_[ nelement ][ 1, 2 ] + 2 )
|
||||
DevOut( hb_ntos( nelement ) )
|
||||
@@ -216,5 +216,3 @@ STATIC FUNCTION moremoves()
|
||||
ENDIF
|
||||
|
||||
RETURN canmove
|
||||
|
||||
//--------------------------------------------------------------------*
|
||||
|
||||
@@ -59,9 +59,9 @@
|
||||
|
||||
#define nTotTran Len( aTrans )
|
||||
|
||||
#command DISPMESSAGE <mess>,<t>,<l>,<b>,<r> => ;
|
||||
_ftPushKeys(); hb_keyPut( { K_CTRL_PGDN, K_CTRL_W } ) ;;
|
||||
MemoEdit( < mess > , < t > , < l > , < b > , < r > , .F. , NIL, ( < r > ) - ( < l > ) + 1 ) ;;
|
||||
#command DISPMESSAGE <mess>,<t>,<l>,<b>,<r> => ;
|
||||
_ftPushKeys(); hb_keyPut( { K_CTRL_PGDN, K_CTRL_W } ) ;;
|
||||
MemoEdit( <mess>, <t>, <l>, <b>, <r>, .F., NIL, ( <r> ) - ( <l> ) + 1 ) ;;
|
||||
_ftPopKeys()
|
||||
|
||||
#define ASHRINK( ar ) ASize( ar, Len( ar ) - 1 )
|
||||
@@ -70,9 +70,9 @@
|
||||
#command FT_INKEY [ <secs> ] TO <var> ;
|
||||
=> ;
|
||||
WHILE .T. ;;
|
||||
< var > := Inkey( [ <secs> ] ) ;;
|
||||
IF SetKey( < var > ) != NIL ;;
|
||||
Eval( SetKey( < var > ), ProcName(), ProcLine(), #< var > ) ;;
|
||||
<var> := Inkey( [ <secs> ] ) ;;
|
||||
IF SetKey( <var> ) != NIL ;;
|
||||
Eval( SetKey( <var> ), ProcName(), ProcLine(), #<var> ) ;;
|
||||
ELSE ;;
|
||||
EXIT ;;
|
||||
END ;;
|
||||
@@ -129,7 +129,7 @@ PROCEDURE Main()
|
||||
|
||||
SET KEY K_ALT_A TO FT_Adder // Make <ALT-A> call FT_Adder
|
||||
|
||||
// SIMPLE Sample of program data entry!
|
||||
// SIMPLE Sample of program data entry!
|
||||
|
||||
@ 12, 5 SAY "Please enter the total Sick, Personal, and Vacation hours."
|
||||
@ 15, 22 SAY "Sick hrs."
|
||||
@@ -187,7 +187,7 @@ FUNCTION FT_Adder()
|
||||
LOCAL lShowRight := .T.
|
||||
LOCAL aAdder := Array( 23 )
|
||||
|
||||
// Must prevent recursive calls
|
||||
// Must prevent recursive calls
|
||||
IF t_lAdderOpen
|
||||
RETURN NIL
|
||||
ELSE
|
||||
@@ -215,14 +215,14 @@ FUNCTION FT_Adder()
|
||||
nAddSpace := iif( lShowRight, 40, 0 ) + nLeftOS
|
||||
nTapeSpace := iif( lShowRight, 0, 40 ) + nLeftOS
|
||||
|
||||
// Set Up the STATIC variables
|
||||
// Set Up the STATIC variables
|
||||
t_aKeys := {}
|
||||
t_aWindow := {}
|
||||
t_nWinColor := 0
|
||||
|
||||
_ftAddScreen( aAdder )
|
||||
|
||||
// Set the decimals to 2 & display a cleared adder
|
||||
// Set the decimals to 2 & display a cleared adder
|
||||
_ftChangeDec( aAdder, 2 )
|
||||
@ 4 + nTopOS, 7 + nAddSpace SAY nTotal PICTURE cTotPict
|
||||
|
||||
@@ -261,9 +261,9 @@ FUNCTION FT_Adder()
|
||||
IF lTape
|
||||
RestScreen( 4 + nTopOS, 6 + nTapeSpace, 22 + nTopOS, 35 + nTapeSpace, cTapeScr )
|
||||
ENDIF
|
||||
IF Left( SaveScreen( 6 + nTopOS,26 + nAddSpace,6 + nTopOS,27 + nAddSpace ), 1 ) ;
|
||||
IF Left( SaveScreen( 6 + nTopOS, 26 + nAddSpace, 6 + nTopOS, 27 + nAddSpace ), 1 ) ;
|
||||
!= " "
|
||||
IF Left( SaveScreen( 6 + nTopOS,19 + nAddSpace,6 + nTopOS,20 + nAddSpace ), 1 ) ;
|
||||
IF Left( SaveScreen( 6 + nTopOS, 19 + nAddSpace, 6 + nTopOS, 20 + nAddSpace ), 1 ) ;
|
||||
== "S"
|
||||
cMoveTotSubTot := "S"
|
||||
ELSE
|
||||
@@ -272,7 +272,7 @@ FUNCTION FT_Adder()
|
||||
ELSE
|
||||
cMoveTotSubTot := " "
|
||||
ENDIF
|
||||
cTotal := _ftCharOdd( SaveScreen( 4 + nTopOS, 8 + nAddSpace, 4 + ;
|
||||
cTotal := _ftCharOdd( SaveScreen( 4 + nTopOS, 8 + nAddSpace, 4 + ;
|
||||
nTopOS, 25 + nAddSpace ) )
|
||||
_ftPopWin() // Remove Adder
|
||||
lShowRight := !lShowRight
|
||||
@@ -303,9 +303,9 @@ FUNCTION FT_Adder()
|
||||
_ftSetWinColor( W_CURR, W_PROMPT )
|
||||
CLEAR TYPEAHEAD
|
||||
ELSE
|
||||
_ftError( "there are " + iif( nTotTran > 0, "only " + ;
|
||||
LTrim( Str( nTotTran, 3, 0 ) ), "no" ) + ;
|
||||
" transactions entered so far." + ;
|
||||
_ftError( "there are " + iif( nTotTran > 0, "only " + ;
|
||||
LTrim( Str( nTotTran, 3, 0 ) ), "no" ) + ;
|
||||
" transactions entered so far." + ;
|
||||
" No need to scroll!" )
|
||||
ENDIF
|
||||
CASE nKey == 7 // Delete - Clear adder
|
||||
@@ -328,18 +328,18 @@ FUNCTION FT_Adder()
|
||||
t_lAdderOpen := .F. // Reset the recursive flag
|
||||
lDone := .T.
|
||||
ELSE
|
||||
_ftError( "but I can not return the total from the " + ;
|
||||
_ftError( "but I can not return the total from the " + ;
|
||||
"adder to this variable. You must quit the adder using" + ;
|
||||
" the <ESC> key and then enter the total manually." )
|
||||
ENDIF
|
||||
ELSE
|
||||
_ftError( "the calculation is not finished yet! You must have" + ;
|
||||
_ftError( "the calculation is not finished yet! You must have" + ;
|
||||
" a TOTAL before you can return it to the program." )
|
||||
ENDIF
|
||||
ENDCASE
|
||||
ENDDO
|
||||
|
||||
// Reset the STATICS to NIL
|
||||
// Reset the STATICS to NIL
|
||||
t_aKeys := t_aWindow := t_aWinColor := t_aStdColor := NIL
|
||||
|
||||
RETURN NIL
|
||||
@@ -361,7 +361,7 @@ STATIC FUNCTION _ftAddScreen( aAdder )
|
||||
|
||||
LOCAL nCol
|
||||
|
||||
_ftPushWin( 2 + nTopOS, 2 + nAddSpace, 22 + nTopOS, 30 + nAddSpace, " Adder ", ;
|
||||
_ftPushWin( 2 + nTopOS, 2 + nAddSpace, 22 + nTopOS, 30 + nAddSpace, " Adder ", ;
|
||||
"<F-1> for Help", , B_DOUBLE )
|
||||
nCol := 5 + nAddSpace
|
||||
@ 7 + nTopOS, nCol SAY hb_UTF8ToStr( " ┌───┐ ┌───┐ ┌───┐" )
|
||||
@@ -427,13 +427,13 @@ STATIC FUNCTION _ftChangeDec( aAdder, nNumDec )
|
||||
IF nNumDec == NIL
|
||||
nNumDec := 0
|
||||
|
||||
nNumDec := _ftQuest( "How many decimals do you want to display?", ;
|
||||
nNumDec := _ftQuest( "How many decimals do you want to display?", ;
|
||||
nNumDec, "9", {| oGet | _ftValDeci( oGet ) } )
|
||||
|
||||
cTotPict := _ftPosRepl( cDefTotPict, ".", 19 - Abs( nNumDec ) )
|
||||
|
||||
cTotPict := Right( _ftStuffComma( cTotPict ), 19 )
|
||||
cTotPict := iif( nNumDec == 2 .OR. nNumDec == 6, " " + Right( cTotPict,18 ), cTotPict )
|
||||
cTotPict := iif( nNumDec == 2 .OR. nNumDec == 6, " " + Right( cTotPict, 18 ), cTotPict )
|
||||
|
||||
nMaxDeci := nNumDec
|
||||
|
||||
@@ -668,7 +668,7 @@ STATIC FUNCTION _ftAddSub( aAdder, nKey )
|
||||
lDecSet := .F.
|
||||
nDecDigit := 0
|
||||
lSubRtn := .F.
|
||||
// They pressed the + or - key to process the previous total
|
||||
// They pressed the + or - key to process the previous total
|
||||
IF _ftRoundIt( nNumTotal, nMaxDeci ) == 0 .AND. _ftRoundIt( nTotal, nMaxDeci ) == 0
|
||||
nNumTotal := nSavTotal
|
||||
lNewNum := .T.
|
||||
@@ -908,8 +908,6 @@ STATIC FUNCTION _ftEraseTotSubTot( aAdder )
|
||||
+--------------------------------------------------------------------------+
|
||||
| Arguments: nNumber |
|
||||
| : nPlaces |
|
||||
| Return Value: INT@( ABS@(nNumber@) @* 10 @^ nPlaces @+ 0@.50 @+ 10 @^ - ;|
|
||||
| : 12 @) / 10 @^ nPlaces |
|
||||
+--------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
@@ -917,7 +915,7 @@ STATIC FUNCTION _ftRoundIt( nNumber, nPlaces )
|
||||
|
||||
nPlaces := iif( nPlaces == NIL, 0, nPlaces )
|
||||
|
||||
RETURN iif( nNumber < 0.0, - 1.0, 1.0 ) * ;
|
||||
RETURN iif( nNumber < 0.0, - 1.0, 1.0 ) * ;
|
||||
Int( Abs( nNumber ) * 10 ^ nPlaces + 0.50 + 10 ^ - 12 ) / 10 ^ nPlaces
|
||||
|
||||
/*+- Function ---------------------------------------------------------------+
|
||||
@@ -931,7 +929,6 @@ STATIC FUNCTION _ftRoundIt( nNumber, nPlaces )
|
||||
| Arguments: aAdder |
|
||||
| : nNumerator |
|
||||
| : nDenominator |
|
||||
| Return Value: @(nNumerator/nDenominator@) |
|
||||
+--------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
@@ -955,7 +952,6 @@ STATIC FUNCTION _ftDivide( aAdder, nNumerator, nDenominator )
|
||||
| Copyright: None - Public Domain |
|
||||
+--------------------------------------------------------------------------+
|
||||
| Arguments: oGet |
|
||||
| Return Value: lRtnValue |
|
||||
+--------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
@@ -1127,7 +1123,7 @@ STATIC FUNCTION _ftPushMessage( cMessage, lWait, cTitle, cBotTitle, xQuiet, nTop
|
||||
nWide := iif( nMessLen > 72, 72, iif( nMessLen < 12, 12, nMessLen ) )
|
||||
nNumRows := MLCount( cMessage, nWide )
|
||||
|
||||
// If they didn't say what the top row is, Center it on the screen
|
||||
// If they didn't say what the top row is, Center it on the screen
|
||||
DEFAULT nTop TO Int( ( MaxRow() - nNumRows ) / 2 )
|
||||
|
||||
nBottom := nTop + nNumRows + 2
|
||||
@@ -1217,11 +1213,11 @@ STATIC FUNCTION _ftQuest( cMessage, xVarVal, cPict, bValid, lNoESC, nWinColor, n
|
||||
nWide := iif( nMessLen > 66, 66, iif( nMessLen < 12, 12, nMessLen ) )
|
||||
|
||||
nNumMessRow := MLCount( cMessage, nWide )
|
||||
nLenLastRow := Len( Trim( MemoLine( cMessage, nWide, nNumMessRow ) ) )
|
||||
nLenLastRow := Len( RTrim( MemoLine( cMessage, nWide, nNumMessRow ) ) )
|
||||
lGetOnNextLine := ( nLenLastRow + nVarLen ) > nWide
|
||||
nNumRows := nNumMessRow + iif( lGetOnNextLine, 1, 0 )
|
||||
|
||||
// Center it in the screen
|
||||
// Center it in the screen
|
||||
nTop := iif( nTop == NIL, Int( ( MaxRow() - nNumRows ) / 2 ), nTop )
|
||||
nBottom := nTop + nNumRows + 1
|
||||
nLeft := Int( ( MaxCol() - nWide ) / 2 ) - 4
|
||||
@@ -1231,12 +1227,12 @@ STATIC FUNCTION _ftQuest( cMessage, xVarVal, cPict, bValid, lNoESC, nWinColor, n
|
||||
.AND. nVarLen > nWide, hb_UTF8ToStr( "← scroll →" ), NIL ), nWinColor )
|
||||
DISPMESSAGE cMessage, nTop + 1, nLeft + 2, nBottom - 1, nRight - 2
|
||||
|
||||
oNewGet := GetNew( iif( lGetOnNextLine,Row() + 1,Row() ), ;
|
||||
iif( lGetOnNextLine, nLeft + 2, Col() + 1 ), ;
|
||||
{| x | iif( PCount() > 0, xVarVal := x, xVarVal ) }, ;
|
||||
oNewGet := GetNew( iif( lGetOnNextLine,Row() + 1,Row() ), ;
|
||||
iif( lGetOnNextLine, nLeft + 2, Col() + 1 ), ;
|
||||
{| x | iif( PCount() > 0, xVarVal := x, xVarVal ) }, ;
|
||||
"xVarVal" )
|
||||
|
||||
// If the input line is character & wider than window SCROLL
|
||||
// If the input line is character & wider than window SCROLL
|
||||
IF lGetOnNextLine .AND. HB_ISSTRING( xVarVal ) .AND. nVarLen > nWide
|
||||
oNewGet:Picture := "@S" + LTrim( Str( nWide, 4, 0 ) ) + iif( cPict == NIL, "", " " + cPict )
|
||||
ENDIF
|
||||
@@ -1356,7 +1352,7 @@ STATIC FUNCTION _ftError( cMessage, xDontReset )
|
||||
lOldPrint := Set( _SET_PRINTER, .F. )
|
||||
cMessage := "I'm sorry but, " + cMessage
|
||||
nMessLen := Len( cMessage )
|
||||
nWide := iif( nMessLen > 66, 66, iif( nMessLen < 12,12,nMessLen ) )
|
||||
nWide := iif( nMessLen > 66, 66, iif( nMessLen < 12, 12, nMessLen ) )
|
||||
nNumRows := MLCount( cMessage, nWide )
|
||||
nTop := Int( ( MaxRow() - nNumRows ) / 2 ) // Center it in the screen
|
||||
nBot := nTop + 3 + nNumRows
|
||||
@@ -1406,9 +1402,9 @@ STATIC FUNCTION _ftStuffComma( cStrToStuff, lTrimStuffedStr )
|
||||
|
||||
lTrimStuffedStr := iif( lTrimStuffedStr == NIL, .F. , lTrimStuffedStr )
|
||||
IF !( "." $ cStrToStuff )
|
||||
cStrToStuff := _ftPosIns( cStrToStuff, ".", iif( "C" $ cStrToStuff .OR. ;
|
||||
cStrToStuff := _ftPosIns( cStrToStuff, ".", iif( "C" $ cStrToStuff .OR. ;
|
||||
"E" $ cStrToStuff .OR. "+" $ cStrToStuff .OR. "-" $ cStrToStuff ;
|
||||
.OR. "X" $ cStrToStuff .OR. "*" $ cStrToStuff .OR. ;
|
||||
.OR. "X" $ cStrToStuff .OR. "*" $ cStrToStuff .OR. ;
|
||||
"" $ cStrToStuff .OR. "/" $ cStrToStuff .OR. "=" $ cStrToStuff, ;
|
||||
Len( cStrToStuff ) - 1, Len( cStrToStuff ) + 1 ) )
|
||||
|
||||
@@ -1419,7 +1415,7 @@ STATIC FUNCTION _ftStuffComma( cStrToStuff, lTrimStuffedStr )
|
||||
ENDIF
|
||||
nDecPosit := At( ".", cStrToStuff )
|
||||
|
||||
IF Len( Left( LTrim(_ftCharRem("-",cStrToStuff ) ), ;
|
||||
IF Len( Left( LTrim(_ftCharRem("-",cStrToStuff ) ), ;
|
||||
At( ".", LTrim( _ftCharRem("-",cStrToStuff ) ) ) - 1 ) ) > 3
|
||||
IF lTrimStuffedStr // Do we trim the number each time we insert a comma
|
||||
FOR x := nDecPosit - 3 TO 2 + _ftCountLeft( cStrToStuff, " " ) STEP - 4
|
||||
@@ -1447,7 +1443,6 @@ STATIC FUNCTION _ftStuffComma( cStrToStuff, lTrimStuffedStr )
|
||||
| : nBord |
|
||||
| : nBack |
|
||||
| : nUnsel |
|
||||
| Return Value: see code |
|
||||
| See Also: _ftSetWinColor() |
|
||||
+--------------------------------------------------------------------------+
|
||||
*/
|
||||
@@ -1510,7 +1505,7 @@ STATIC FUNCTION _ftPushWin( t, l, b, r, cTitle, cBotTitle, nWinColor )
|
||||
LOCAL lAutoWindow := nWinColor == NIL
|
||||
|
||||
nWinColor := iif( nWinColor == NIL, _ftNextWinColor(), nWinColor )
|
||||
AAdd( t_aWindow, { t, l, b, r, nWinColor, SaveScreen( t,l,b + 1,r + 2 ), lAutoWindow } )
|
||||
AAdd( t_aWindow, { t, l, b, r, nWinColor, SaveScreen( t, l, b + 1, r + 2 ), lAutoWindow } )
|
||||
_ftShadow( b + 1, l + 2, b + 1, r + 2 )
|
||||
_ftShadow( t + 1, r + 1, b, r + 2 )
|
||||
_ftSetWinColor( nWinColor, W_BORDER )
|
||||
@@ -1585,7 +1580,6 @@ STATIC FUNCTION _ftPopWin
|
||||
| : nBord |
|
||||
| : nBack |
|
||||
| : nUnsel |
|
||||
| Return Value: see code |
|
||||
| See Also: _ftSetSCRColor() |
|
||||
| Notes: If the window number is not passed use the currently active|
|
||||
| : window number nWinColor. |
|
||||
@@ -1629,7 +1623,7 @@ STATIC FUNCTION _ftShadow( nTop, nLeft, nBottom, nRight )
|
||||
|
||||
LOCAL theShadow := SaveScreen( nTop, nLeft, nBottom, nRight )
|
||||
|
||||
RestScreen( nTop, nLeft, nBottom, nRight, ;
|
||||
RestScreen( nTop, nLeft, nBottom, nRight, ;
|
||||
Transform( theShadow, Replicate( "X", Len( theShadow ) / 2 ) ) )
|
||||
|
||||
RETURN NIL
|
||||
@@ -1644,7 +1638,6 @@ STATIC FUNCTION _ftShadow( nTop, nLeft, nBottom, nRight )
|
||||
| Copyright: None - Public Domain |
|
||||
+--------------------------------------------------------------------------+
|
||||
| Arguments: None |
|
||||
| Return Value: t_nWinColor := iif(t_nWinColor==1,4,t_nWinColor-1) |
|
||||
| Notes: If we are already on window #1 restart count by using # 4. |
|
||||
+--------------------------------------------------------------------------+
|
||||
*/
|
||||
@@ -1663,7 +1656,6 @@ STATIC FUNCTION _ftLastWinColor()
|
||||
| Copyright: None - Public Domain |
|
||||
+--------------------------------------------------------------------------+
|
||||
| Arguments: None |
|
||||
| Return Value: t_nWinColor := (iif(t_nWinColor<4,t_nWinColor+1,1)) |
|
||||
| Notes: If we are already on window #4 restart count by using # 1. |
|
||||
+--------------------------------------------------------------------------+
|
||||
*/
|
||||
@@ -1717,24 +1709,24 @@ STATIC FUNCTION _ftWinTitle( cTheTitle, cTopOrBot )
|
||||
STATIC FUNCTION _ftInitColors
|
||||
|
||||
t_aWinColor := { ;
|
||||
{ "GR+/BG","GR+/G", "B+/RB", "G+/R" } , ;
|
||||
{ "R+/N", "W+/RB", "W+/BG", "GR+/B" } , ;
|
||||
{ "GR+/N", "GR+/N", "GR+/N", "GR+/N" } , ;
|
||||
{ "B/BG", "BG+/G", "W+/RB", "BG+/R" } , ;
|
||||
{ "W+/BG", "W+/G", "GR+/RB", "W+/R" } , ;
|
||||
{ "GR+/B", "GR+/R", "R+/B", "W+/BG" }, ;
|
||||
{ "GR+/BG","GR+/G", "B+/RB", "G+/R" } ,;
|
||||
{ "R+/N", "W+/RB", "W+/BG", "GR+/B" } ,;
|
||||
{ "GR+/N", "GR+/N", "GR+/N", "GR+/N" } ,;
|
||||
{ "B/BG", "BG+/G", "W+/RB", "BG+/R" } ,;
|
||||
{ "W+/BG", "W+/G", "GR+/RB", "W+/R" } ,;
|
||||
{ "GR+/B", "GR+/R", "R+/B", "W+/BG" } ,;
|
||||
{ "N/N", "N/N", "N/N", "N/N" } }
|
||||
|
||||
t_aStdColor := { ;
|
||||
"BG+*/RB" , ;
|
||||
"GR+/R" , ;
|
||||
"GR+/N" , ;
|
||||
"W/B" , ;
|
||||
"GR+/N" , ;
|
||||
"GR+/GR" , ;
|
||||
{ "W+/B", "W/B", "G+/B", "R+/B", ;
|
||||
"GR+/B", "BG+/B", "B+/B", "G+/B" }, ;
|
||||
"N/N" }
|
||||
"BG+*/RB" ,;
|
||||
"GR+/R" ,;
|
||||
"GR+/N" ,;
|
||||
"W/B" ,;
|
||||
"GR+/N" ,;
|
||||
"GR+/GR" ,;
|
||||
{ "W+/B", "W/B", "G+/B", "R+/B" ,;
|
||||
"GR+/B", "BG+/B", "B+/B", "G+/B" } ,;
|
||||
"N/N" }
|
||||
|
||||
RETURN NIL
|
||||
|
||||
@@ -1747,7 +1739,6 @@ STATIC FUNCTION _ftInitColors
|
||||
| Copyright: None - Public Domain |
|
||||
+--------------------------------------------------------------------------+
|
||||
| Arguments: cString |
|
||||
| Return Value: STRTRAN(cString,"") |
|
||||
| Notes: Used for example to strip all the attribute characters |
|
||||
| : from a screen save. |
|
||||
+--------------------------------------------------------------------------+
|
||||
@@ -1770,7 +1761,6 @@ STATIC FUNCTION _ftCharOdd( cString )
|
||||
| Arguments: cString |
|
||||
| : cChar |
|
||||
| : nPosit |
|
||||
| Return Value: STRTRAN(cString,"9",cChar,nPosit,1)+"" |
|
||||
+--------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
@@ -1788,7 +1778,6 @@ STATIC FUNCTION _ftPosRepl( cString, cChar, nPosit )
|
||||
+--------------------------------------------------------------------------+
|
||||
| Arguments: cChar |
|
||||
| : cString |
|
||||
| Return Value: STRTRAN(cString,cChar) |
|
||||
+--------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
@@ -1805,7 +1794,6 @@ STATIC FUNCTION _ftCharRem( cChar, cString )
|
||||
| Copyright: None - Public Domain |
|
||||
+--------------------------------------------------------------------------+
|
||||
| Arguments: cString |
|
||||
| Return Value: LEN(cString)-LEN(LTRIM(cString)) |
|
||||
+--------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
@@ -1824,7 +1812,6 @@ STATIC FUNCTION _ftCountLeft( cString )
|
||||
| Arguments: cString |
|
||||
| : cChar |
|
||||
| : nPosit |
|
||||
| Return Value: LEFT(cString,nPosit-1)+cChar+SUBSTR(cString,nPosit) |
|
||||
+--------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
|
||||
@@ -132,7 +132,7 @@ PROCEDURE TBWHILE()
|
||||
|
||||
STATIC FUNCTION make_dbf()
|
||||
|
||||
LOCAL x, aData := { ;
|
||||
LOCAL x, aData := { ;
|
||||
{ "SHAEFER", "KATHRYN", "415 WEST CITRUS ROAD #150", "LOS ANGELES", "CA", "90030" }, ;
|
||||
{ "OLSON", "JAMES", "225 NORTH RANCH ROAD", "LOS ANGELES", "CA", "90023" }, ;
|
||||
{ "KAYBEE", "JOHN", "123 SANDS ROAD", "CAMARILLO", "CA", "93010" }, ;
|
||||
|
||||
@@ -37,7 +37,7 @@ FUNCTION ft_addWkDy( dStart, nDys )
|
||||
|
||||
LOCAL nDc := DOW( dStart )
|
||||
|
||||
RETURN iif( nDc == 7, ;
|
||||
( nDys - 1 ) % 5 + 7 * Int( ( nDys - 1 ) / 5 ) + 2, ;
|
||||
( nDys + nDc - 2 ) % 5 + 7 * Int( ( nDys + nDc - 2 ) / 5 ) + 2 - nDc ;
|
||||
RETURN iif( nDc == 7,;
|
||||
( nDys - 1 ) % 5 + 7 * Int( ( nDys - 1 ) / 5 ) + 2,;
|
||||
( nDys + nDc - 2 ) % 5 + 7 * Int( ( nDys + nDc - 2 ) / 5 ) + 2 - nDc ;
|
||||
)
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
# These may be overridden by local project options.
|
||||
|
||||
-q0
|
||||
-autohbm-
|
||||
|
||||
{HB_BUILD_VERBOSE}-quiet-
|
||||
{HB_BUILD_VERBOSE}-info
|
||||
|
||||
@@ -493,7 +493,7 @@ STATIC FUNCTION call_hbmk2_hbinfo( cProjectPath, hProject )
|
||||
hProject[ "aDept" ] := {}
|
||||
hProject[ "lChecked" ] := NIL
|
||||
|
||||
IF ( nErrorLevel := call_hbmk2( cProjectPath, " --hbinfo", NIL,, @cStdOut ) ) == 0
|
||||
IF ( nErrorLevel := call_hbmk2( cProjectPath, " --hbinfo -autohbm-", NIL,, @cStdOut ) ) == 0
|
||||
|
||||
hb_jsonDecode( cStdOut, @hInfo )
|
||||
|
||||
|
||||
Reference in New Issue
Block a user