2017-09-07 08:38 UTC Viktor Szakats (vszakats users.noreply.github.com)

* contrib/hbct/charsprd.c
  * contrib/hbct/dattime3.c
  * contrib/hbct/expand.c
  * contrib/hbct/misc2.c
  * contrib/hbct/screen2.c
  * contrib/hbcurl/core.c
  * contrib/hbfship/strpeek.c
  * contrib/hbnetio/netiocli.c
  * contrib/hbwin/olecore.c
  * contrib/rddads/adsx.c
  * contrib/rddads/rddads.h
  * contrib/rddsql/sqlmix.c
  * contrib/sddmy/core.c
  * contrib/sddpg/core.c
  * contrib/xhb/hbcompat.h
  * contrib/xhb/hbxml.c
  * contrib/xhb/xhb.h
  * src/common/hbstr.c
  * src/compiler/harbour.y
  * src/compiler/harbour.yyc
  * src/compiler/hbcmplib.c
  * src/macro/macrolex.c
  * src/rdd/dbffpt/dbffpt1.c
  * src/rdd/hbsix/sxcompr.c
  * src/rdd/hbsix/sxcrypt.c
  * src/rdd/hbsix/sxtable.c
  * src/rdd/hsx/hsx.c
  * src/rtl/cdpapi.c
  * src/rtl/gtcrs/gtcrs.c
  * src/rtl/gtxwc/gtxwc.c
  * src/rtl/hbtoken.c
  * src/rtl/net.c
  * src/rtl/netusr.c
  * src/vm/hvm.c
    * update HB_SIZE variable name prefixes to use `n` instead of `ul`
    % adjust some variables
    % sync variables scopes and some other minor things with 3.4 fork
This commit is contained in:
Viktor Szakats
2017-09-07 08:39:50 +00:00
parent f496daa711
commit d55bdd18b7
35 changed files with 661 additions and 614 deletions

View File

@@ -2570,7 +2570,7 @@ static HB_COMP_CARGO2_FUNC( hb_compEnumEvalStart )
static void hb_compEnumStart( HB_COMP_DECL, PHB_EXPR pVars, PHB_EXPR pExprs, int descend )
{
HB_SIZE ulLen;
HB_SIZE nLen;
if( hb_compExprListLen( pVars ) != hb_compExprListLen( pExprs ) )
{
@@ -2578,15 +2578,15 @@ static void hb_compEnumStart( HB_COMP_DECL, PHB_EXPR pVars, PHB_EXPR pExprs, int
}
HB_COMP_PARAM->fDescend = descend < 0;
ulLen = hb_compExprListEval2( HB_COMP_PARAM, pVars, pExprs, hb_compEnumEvalStart );
nLen = hb_compExprListEval2( HB_COMP_PARAM, pVars, pExprs, hb_compEnumEvalStart );
if( ulLen > 255 )
if( nLen > 255 )
{
hb_compGenError( HB_COMP_PARAM, hb_comp_szErrors, 'E', HB_COMP_ERR_FORVAR_TOOMANY, NULL, NULL );
}
else
{
hb_compGenPCode3( HB_P_ENUMSTART, ( HB_BYTE ) ( ulLen & 0xFF ), ( HB_BYTE ) ( descend > 0 ? 1 : 0 ), HB_COMP_PARAM );
hb_compGenPCode3( HB_P_ENUMSTART, ( HB_BYTE ) ( nLen & 0xFF ), ( HB_BYTE ) ( descend > 0 ? 1 : 0 ), HB_COMP_PARAM );
}
}
@@ -2708,13 +2708,13 @@ static void hb_compSwitchEnd( HB_COMP_DECL )
PHB_SWITCHCMD pSwitch = pFunc->pSwitch;
PHB_EXPR pExpr = pSwitch->pExpr;
PHB_SWITCHCASE pCase, pTmp;
HB_SIZE ulExitPos, ulCountPos;
HB_SIZE nExitPos, nCountPos;
int iCount = 0;
/* skip switch pcode if there was no EXIT in the last CASE
* or in the DEFAULT case
*/
ulExitPos = hb_compGenJump( 0, HB_COMP_PARAM );
nExitPos = hb_compGenJump( 0, HB_COMP_PARAM );
hb_compGenJumpHere( pSwitch->nOffset + 1, HB_COMP_PARAM );
pCase = pSwitch->pCases;
@@ -2758,7 +2758,7 @@ static void hb_compSwitchEnd( HB_COMP_DECL )
HB_BOOL fMacroText = ( HB_COMP_PARAM->supported & HB_COMPFLAG_MACROTEXT ) != 0;
pExpr = hb_compExprGenPush( pExpr, HB_COMP_PARAM );
ulCountPos = pFunc->nPCodePos + 1;
nCountPos = pFunc->nPCodePos + 1;
hb_compGenPCode3( HB_P_SWITCH, 0, 0, HB_COMP_PARAM );
HB_COMP_PARAM->fSwitchCase = HB_TRUE;
HB_COMP_PARAM->supported &= ~HB_COMPFLAG_MACROTEXT;
@@ -2780,14 +2780,14 @@ static void hb_compSwitchEnd( HB_COMP_DECL )
hb_compGenJumpThere( hb_compGenJump( 0, HB_COMP_PARAM ),
pSwitch->nDefault, HB_COMP_PARAM );
}
HB_PUT_LE_UINT16( pFunc->pCode + ulCountPos, iCount );
HB_PUT_LE_UINT16( pFunc->pCode + nCountPos, iCount );
HB_COMP_PARAM->fSwitchCase = fSwitchCase;
if( fMacroText )
HB_COMP_PARAM->supported |= HB_COMPFLAG_MACROTEXT;
}
hb_compGenJumpHere( ulExitPos, HB_COMP_PARAM );
hb_compGenJumpHere( nExitPos, HB_COMP_PARAM );
if( pExpr )
HB_COMP_EXPR_FREE( pExpr );

View File

@@ -7577,7 +7577,7 @@ static HB_COMP_CARGO2_FUNC( hb_compEnumEvalStart )
static void hb_compEnumStart( HB_COMP_DECL, PHB_EXPR pVars, PHB_EXPR pExprs, int descend )
{
HB_SIZE ulLen;
HB_SIZE nLen;
if( hb_compExprListLen( pVars ) != hb_compExprListLen( pExprs ) )
{
@@ -7585,15 +7585,15 @@ static void hb_compEnumStart( HB_COMP_DECL, PHB_EXPR pVars, PHB_EXPR pExprs, int
}
HB_COMP_PARAM->fDescend = descend < 0;
ulLen = hb_compExprListEval2( HB_COMP_PARAM, pVars, pExprs, hb_compEnumEvalStart );
nLen = hb_compExprListEval2( HB_COMP_PARAM, pVars, pExprs, hb_compEnumEvalStart );
if( ulLen > 255 )
if( nLen > 255 )
{
hb_compGenError( HB_COMP_PARAM, hb_comp_szErrors, 'E', HB_COMP_ERR_FORVAR_TOOMANY, NULL, NULL );
}
else
{
hb_compGenPCode3( HB_P_ENUMSTART, ( HB_BYTE ) ( ulLen & 0xFF ), ( HB_BYTE ) ( descend > 0 ? 1 : 0 ), HB_COMP_PARAM );
hb_compGenPCode3( HB_P_ENUMSTART, ( HB_BYTE ) ( nLen & 0xFF ), ( HB_BYTE ) ( descend > 0 ? 1 : 0 ), HB_COMP_PARAM );
}
}
@@ -7715,13 +7715,13 @@ static void hb_compSwitchEnd( HB_COMP_DECL )
PHB_SWITCHCMD pSwitch = pFunc->pSwitch;
PHB_EXPR pExpr = pSwitch->pExpr;
PHB_SWITCHCASE pCase, pTmp;
HB_SIZE ulExitPos, ulCountPos;
HB_SIZE nExitPos, nCountPos;
int iCount = 0;
/* skip switch pcode if there was no EXIT in the last CASE
* or in the DEFAULT case
*/
ulExitPos = hb_compGenJump( 0, HB_COMP_PARAM );
nExitPos = hb_compGenJump( 0, HB_COMP_PARAM );
hb_compGenJumpHere( pSwitch->nOffset + 1, HB_COMP_PARAM );
pCase = pSwitch->pCases;
@@ -7765,7 +7765,7 @@ static void hb_compSwitchEnd( HB_COMP_DECL )
HB_BOOL fMacroText = ( HB_COMP_PARAM->supported & HB_COMPFLAG_MACROTEXT ) != 0;
pExpr = hb_compExprGenPush( pExpr, HB_COMP_PARAM );
ulCountPos = pFunc->nPCodePos + 1;
nCountPos = pFunc->nPCodePos + 1;
hb_compGenPCode3( HB_P_SWITCH, 0, 0, HB_COMP_PARAM );
HB_COMP_PARAM->fSwitchCase = HB_TRUE;
HB_COMP_PARAM->supported &= ~HB_COMPFLAG_MACROTEXT;
@@ -7787,14 +7787,14 @@ static void hb_compSwitchEnd( HB_COMP_DECL )
hb_compGenJumpThere( hb_compGenJump( 0, HB_COMP_PARAM ),
pSwitch->nDefault, HB_COMP_PARAM );
}
HB_PUT_LE_UINT16( pFunc->pCode + ulCountPos, iCount );
HB_PUT_LE_UINT16( pFunc->pCode + nCountPos, iCount );
HB_COMP_PARAM->fSwitchCase = fSwitchCase;
if( fMacroText )
HB_COMP_PARAM->supported |= HB_COMPFLAG_MACROTEXT;
}
hb_compGenJumpHere( ulExitPos, HB_COMP_PARAM );
hb_compGenJumpHere( nExitPos, HB_COMP_PARAM );
if( pExpr )
HB_COMP_EXPR_FREE( pExpr );

View File

@@ -123,7 +123,6 @@ static void hb_compGenArgList( int iFirst, int iLast,
PHB_PP_MSG_FUNC * pMsgFunc )
{
PHB_ITEM pParam;
HB_SIZE ul, nLen;
int argc = 1, i;
const char ** argv;
@@ -156,15 +155,15 @@ static void hb_compGenArgList( int iFirst, int iLast,
{
if( HB_IS_ARRAY( pParam ) )
{
ul = hb_arrayLen( pParam );
if( ul )
HB_SIZE nPos = hb_arrayLen( pParam );
if( nPos )
{
do
{
if( hb_arrayGetType( pParam, ul ) & HB_IT_STRING )
if( hb_arrayGetType( pParam, nPos ) & HB_IT_STRING )
++argc;
}
while( --ul );
while( --nPos );
}
}
else if( HB_IS_STRING( pParam ) )
@@ -181,11 +180,11 @@ static void hb_compGenArgList( int iFirst, int iLast,
{
if( HB_IS_ARRAY( pParam ) )
{
nLen = hb_arrayLen( pParam );
for( ul = 1; ul <= nLen; ++ul )
HB_SIZE nPos, nLen = hb_arrayLen( pParam );
for( nPos = 1; nPos <= nLen; ++nPos )
{
if( hb_arrayGetType( pParam, ul ) & HB_IT_STRING )
argv[ argc++ ] = hb_arrayGetCPtr( pParam, ul );
if( hb_arrayGetType( pParam, nPos ) & HB_IT_STRING )
argv[ argc++ ] = hb_arrayGetCPtr( pParam, nPos );
}
}
else if( HB_IS_STRING( pParam ) )
@@ -231,7 +230,6 @@ HB_FUNC( HB_COMPILEBUF )
HB_FUNC( HB_COMPILEFROMBUF )
{
const char * szSource = hb_parc( 1 );
if( szSource )