2012-07-18 12:43 UTC+0200 Viktor Szakats (harbour syenar.net)

* contrib/hbct/addascii.c
  * contrib/hbct/ascpos.c
  * contrib/hbct/atadjust.c
  * contrib/hbct/atnum.c
  * contrib/hbct/atrepl.c
  * contrib/hbct/charevod.c
  * contrib/hbct/charmirr.c
  * contrib/hbct/charmix.c
  * contrib/hbct/charone.c
  * contrib/hbct/charonly.c
  * contrib/hbct/charrepl.c
  * contrib/hbct/charsort.c
  * contrib/hbct/charsprd.c
  * contrib/hbct/charswap.c
  * contrib/hbct/count.c
  * contrib/hbct/ctpad.c
  * contrib/hbct/ctstr.c
  * contrib/hbct/dattime2.c
  * contrib/hbct/expand.c
  * contrib/hbct/exponent.c
  * contrib/hbct/justify.c
  * contrib/hbct/numat.c
  * contrib/hbct/pos1.c
  * contrib/hbct/pos2.c
  * contrib/hbct/posdiff.c
  * contrib/hbct/range.c
  * contrib/hbct/relation.c
  * contrib/hbct/remove.c
  * contrib/hbct/replace.c
  * contrib/hbct/screen1.c
  * contrib/hbct/screen2.c
  * contrib/hbct/strswap.c
  * contrib/hbct/tab.c
  * contrib/hbct/token1.c
  * contrib/hbct/token2.c
  * contrib/hbct/wordrepl.c
  * contrib/hbct/wordtoch.c
    % removed superfluous parenthesis
    * whitespace formatting
This commit is contained in:
Viktor Szakats
2012-07-18 10:46:37 +00:00
parent c1f4a654b0
commit d80c8c5454
38 changed files with 262 additions and 221 deletions

View File

@@ -16,6 +16,47 @@
The license applies to all entries newer than 2009-04-28.
*/
2012-07-18 12:43 UTC+0200 Viktor Szakats (harbour syenar.net)
* contrib/hbct/addascii.c
* contrib/hbct/ascpos.c
* contrib/hbct/atadjust.c
* contrib/hbct/atnum.c
* contrib/hbct/atrepl.c
* contrib/hbct/charevod.c
* contrib/hbct/charmirr.c
* contrib/hbct/charmix.c
* contrib/hbct/charone.c
* contrib/hbct/charonly.c
* contrib/hbct/charrepl.c
* contrib/hbct/charsort.c
* contrib/hbct/charsprd.c
* contrib/hbct/charswap.c
* contrib/hbct/count.c
* contrib/hbct/ctpad.c
* contrib/hbct/ctstr.c
* contrib/hbct/dattime2.c
* contrib/hbct/expand.c
* contrib/hbct/exponent.c
* contrib/hbct/justify.c
* contrib/hbct/numat.c
* contrib/hbct/pos1.c
* contrib/hbct/pos2.c
* contrib/hbct/posdiff.c
* contrib/hbct/range.c
* contrib/hbct/relation.c
* contrib/hbct/remove.c
* contrib/hbct/replace.c
* contrib/hbct/screen1.c
* contrib/hbct/screen2.c
* contrib/hbct/strswap.c
* contrib/hbct/tab.c
* contrib/hbct/token1.c
* contrib/hbct/token2.c
* contrib/hbct/wordrepl.c
* contrib/hbct/wordtoch.c
% removed superfluous parenthesis
* whitespace formatting
2012-07-18 10:50 UTC+0200 Viktor Szakats (harbour syenar.net)
* contrib/hbide/resources/maximize_all.png
* contrib/hbide/resources/maximize.png

View File

@@ -63,9 +63,9 @@ HB_FUNC( ADDASCII )
if( HB_ISCHAR( 1 ) )
{
const char *pcSource = hb_parc( 1 );
const char * pcSource = hb_parc( 1 );
HB_SIZE sLen = hb_parclen( 1 );
char *pcResult;
char * pcResult;
HB_SIZE sPos;
HB_LONG lValue;
int iCarryOver;

View File

@@ -74,7 +74,7 @@ static void do_ascpos( int iSwitch )
else
sPos = sStrSize;
if( ( sPos == 0 ) || ( sPos > sStrSize ) )
if( sPos == 0 || sPos > sStrSize )
{
hb_retni( 0 );
}

View File

@@ -58,9 +58,9 @@ HB_FUNC( ATADJUST )
{
if( HB_ISCHAR( 1 ) && HB_ISCHAR( 2 ) && HB_ISNUM( 3 ) )
{
const char *pcStringToMatch = hb_parc( 1 );
const char * pcStringToMatch = hb_parc( 1 );
HB_SIZE sStrToMatchLen = hb_parclen( 1 );
const char *pcString = hb_parc( 2 );
const char * pcString = hb_parc( 2 );
HB_SIZE sStrLen = hb_parclen( 2 );
HB_SIZE sAdjustPosition = hb_parns( 3 );
@@ -69,11 +69,11 @@ HB_FUNC( ATADJUST )
char cAtLike = ct_getatlikechar();
HB_SIZE sIgnore, sMatchStrLen = 0;
HB_SIZE nCounter;
const char *pc = NULL;
const char * pc = NULL;
char cFillChar;
const char *pcCheckFill;
char *pcRetStr;
const char * pcCheckFill;
char * pcRetStr;
HB_SIZE sRetStrLen;
/* eventually ignore some characters */
@@ -120,7 +120,7 @@ HB_FUNC( ATADJUST )
if( HB_ISNUM( 4 ) && ( nCounter = hb_parns( 4 ) ) != 0 )
{
/* find the <nCounter>th match */
const char *pcSubStr;
const char * pcSubStr;
HB_SIZE sSubStrLen;
HB_SIZE nMatchCounter = 0;

View File

@@ -67,16 +67,16 @@ static void do_atnum( int iSwitch )
{
if( HB_ISCHAR( 1 ) && HB_ISCHAR( 2 ) )
{
const char *pcStringToMatch = hb_parc( 1 );
const char * pcStringToMatch = hb_parc( 1 );
HB_SIZE sStrToMatchLen = hb_parclen( 1 );
const char *pcString = hb_parc( 2 );
const char * pcString = hb_parc( 2 );
HB_SIZE sStrLen = hb_parclen( 2 );
int iMultiPass = ct_getatmupa();
int iAtLike = ct_getatlike();
char cAtLike = ct_getatlikechar();
HB_SIZE sIgnore, sMatchStrLen = 0;
HB_SIZE nCounter;
const char *pc = NULL;
const char * pc = NULL;
/* eventually ignore some characters */
if( HB_ISNUM( 4 ) )
@@ -140,7 +140,7 @@ static void do_atnum( int iSwitch )
if( HB_ISNUM( 3 ) && ( nCounter = hb_parns( 3 ) ) != 0 )
{
/* find the <nCounter>th match */
const char *pcSubStr;
const char * pcSubStr;
HB_SIZE sSubStrLen;
HB_SIZE nMatchCounter = 0;

View File

@@ -58,21 +58,21 @@ HB_FUNC( ATREPL )
{
if( HB_ISCHAR( 1 ) && HB_ISCHAR( 2 ) )
{
const char *pcStringToMatch = hb_parc( 1 );
const char * pcStringToMatch = hb_parc( 1 );
HB_SIZE nStrToMatchLen = hb_parclen( 1 );
const char *pcString = hb_parc( 2 );
const char * pcString = hb_parc( 2 );
HB_SIZE nStrLen = hb_parclen( 2 );
int iMultiPass = ct_getatmupa();
int iAtLike = ct_getatlike();
char cAtLike = ct_getatlikechar();
HB_SIZE nIgnore, nMatchStrLen = 0;
HB_SIZE nCounter;
char *pc;
char * pc;
const char *pcReplacement;
const char * pcReplacement;
HB_SIZE nReplaceLen;
int iReplaceMode;
char *pcRetStr;
char * pcRetStr;
HB_SIZE nRetStrLen;
/* eventually ignore some characters */
@@ -111,7 +111,7 @@ HB_FUNC( ATREPL )
or only the nth occurence
NOTE: if iReplaceMode = false and the nth occurence does not exist,
all occurences are replaced */
char *pcRetSubStr;
char * pcRetSubStr;
HB_SIZE sRetSubStrLen;
HB_SIZE nMatchCounter = 0;

View File

@@ -67,9 +67,9 @@ static void do_charevod( int iSwitch )
{
if( HB_ISCHAR( 1 ) )
{
const char *pcString = hb_parc( 1 );
const char * pcString = hb_parc( 1 );
HB_SIZE sLen = hb_parclen( 1 );
char *pcResult;
char * pcResult;
HB_SIZE sPos, sResultPos;
if( sLen == 0 )
@@ -97,7 +97,7 @@ static void do_charevod( int iSwitch )
sResultPos = 0;
for( ; sPos < sLen; sPos += 2 )
pcResult[sResultPos++] = pcString[sPos];
pcResult[ sResultPos++ ] = pcString[ sPos ];
if( sResultPos == 0 )
hb_retc_null();

View File

@@ -65,9 +65,9 @@ HB_FUNC( CHARMIRR )
if( HB_ISCHAR( 1 ) )
{
const char *pcString = hb_parc( 1 ), *pc1;
const char * pcString = hb_parc( 1 ), *pc1;
HB_SIZE sStrLen = hb_parclen( 1 );
char *pcRet, *pc2;
char * pcRet, *pc2;
int iDontMirrorSpaces;
if( HB_ISLOG( 2 ) )

View File

@@ -60,9 +60,9 @@ HB_FUNC( CHARMIX )
{
if( HB_ISCHAR( 1 ) )
{
const char *pcString1 = hb_parc( 1 );
const char *pcString2;
char *pcResult;
const char * pcString1 = hb_parc( 1 );
const char * pcString2;
char * pcResult;
HB_SIZE sLen1 = hb_parclen( 1 );
HB_SIZE sLen2, sPos1, sPos2, sResultPos;
@@ -108,8 +108,8 @@ HB_FUNC( CHARMIX )
sPos2 = sResultPos = 0;
for( sPos1 = 0; sPos1 < sLen1; )
{
pcResult[sResultPos++] = pcString1[sPos1++];
pcResult[sResultPos++] = pcString2[sPos2++];
pcResult[ sResultPos++ ] = pcString1[ sPos1++ ];
pcResult[ sResultPos++ ] = pcString2[ sPos2++ ];
sPos2 %= sLen2;
}

View File

@@ -63,9 +63,9 @@
/* helper function for the *one functions */
static void do_charone( int iSwitch )
{
const char *pcString;
const char * pcString;
HB_SIZE sStrLen;
const char *pcDeleteSet;
const char * pcDeleteSet;
HB_SIZE sDeleteSetLen;
/* param check */
@@ -91,26 +91,26 @@ static void do_charone( int iSwitch )
case DO_CHARONE_CHARONE:
if( sStrLen > 1 )
{
const char *pcSub;
char *pcRet;
const char * pcSub;
char * pcRet;
HB_SIZE sRetStrLen = 0;
char cCurrent = *pcString;
pcRet = ( char * ) hb_xgrab( sStrLen );
/* copy first char */
pcRet[sRetStrLen++] = cCurrent;
pcRet[ sRetStrLen++ ] = cCurrent;
for( pcSub = pcString + 1; pcSub < pcString + sStrLen; pcSub++ )
{
if( *pcSub != cCurrent )
{
cCurrent = *pcSub;
pcRet[sRetStrLen++] = cCurrent;
pcRet[ sRetStrLen++ ] = cCurrent;
}
else if( pcDeleteSet != NULL &&
!ct_at_exact_forward( pcDeleteSet, sDeleteSetLen,
pcSub, 1, NULL ) )
{
pcRet[sRetStrLen++] = cCurrent;
pcRet[ sRetStrLen++ ] = cCurrent;
}
}
hb_retclen( pcRet, sRetStrLen );
@@ -126,30 +126,30 @@ static void do_charone( int iSwitch )
case DO_CHARONE_WORDONE:
if( sStrLen > 3 && sDeleteSetLen >= 2 )
{
const char *pcSub;
char *pcRet;
const char * pcSub;
char * pcRet;
HB_SIZE sRetStrLen = 0;
char cCurrent1 = pcString[0];
char cCurrent2 = pcString[1];
char cCurrent1 = pcString[ 0 ];
char cCurrent2 = pcString[ 1 ];
pcRet = ( char * ) hb_xgrab( sStrLen );
/* copy first double char */
pcRet[sRetStrLen++] = cCurrent1;
pcRet[sRetStrLen++] = cCurrent2;
pcRet[ sRetStrLen++ ] = cCurrent1;
pcRet[ sRetStrLen++ ] = cCurrent2;
for( pcSub = pcString + 2; pcSub < pcString + sStrLen - 1; pcSub += 2 )
{
if( !( pcSub[0] == cCurrent1 && pcSub[1] == cCurrent2 ) )
if( !( pcSub[ 0 ] == cCurrent1 && pcSub[ 1 ] == cCurrent2 ) )
{
cCurrent1 = pcSub[0];
cCurrent2 = pcSub[1];
pcRet[sRetStrLen++] = cCurrent1;
pcRet[sRetStrLen++] = cCurrent2;
cCurrent1 = pcSub[ 0 ];
cCurrent2 = pcSub[ 1 ];
pcRet[ sRetStrLen++ ] = cCurrent1;
pcRet[ sRetStrLen++ ] = cCurrent2;
}
else if( pcDeleteSet != NULL )
{
const char *pc = NULL;
const char *pStart = pcDeleteSet;
const char * pc = NULL;
const char * pStart = pcDeleteSet;
HB_SIZE sLen = sDeleteSetLen;
while( sLen >= 2 &&
@@ -162,8 +162,8 @@ static void do_charone( int iSwitch )
}
if( pc == NULL )
{
pcRet[sRetStrLen++] = cCurrent1;
pcRet[sRetStrLen++] = cCurrent2;
pcRet[ sRetStrLen++ ] = cCurrent1;
pcRet[ sRetStrLen++ ] = cCurrent2;
}
}
}
@@ -171,7 +171,7 @@ static void do_charone( int iSwitch )
/* copy last character if string len is odd */
if( sStrLen & 1 )
{
pcRet[sRetStrLen++] = pcString[sStrLen - 1];
pcRet[ sRetStrLen++ ] = pcString[ sStrLen - 1 ];
}
hb_retclen( pcRet, sRetStrLen );
hb_xfree( pcRet );

View File

@@ -70,21 +70,21 @@ static void do_charonly( int iSwitch )
/* param check */
if( HB_ISCHAR( 1 ) && HB_ISCHAR( 2 ) )
{
const char *pcString = hb_parc( 2 );
const char * pcString = hb_parc( 2 );
HB_SIZE sStrLen = hb_parclen( 2 );
const char *pcOnlySet = hb_parc( 1 );
const char * pcOnlySet = hb_parc( 1 );
HB_SIZE sOnlySetLen = hb_parclen( 1 );
char *pcRet;
char * pcRet;
HB_SIZE sRetStrLen = 0;
int iShift, iBool;
const char *pcSub, *pc;
const char * pcSub, *pc;
/* check for zero-length strings */
switch ( iSwitch )
{
case DO_CHARONLY_CHARONLY:
case DO_CHARONLY_WORDONLY:
if( ( sStrLen == 0 ) || ( sOnlySetLen == 0 ) )
if( sStrLen == 0 || sOnlySetLen == 0 )
{
hb_retc_null();
return;
@@ -124,19 +124,19 @@ static void do_charonly( int iSwitch )
iSwitch == DO_CHARONLY_WORDREM ) )
{
for( pc = pcSub; pc < pcSub + iShift; pc++ )
pcRet[sRetStrLen++] = *pc;
pcRet[ sRetStrLen++ ] = *pc;
}
}
/* copy last character if string len is odd */
if( iShift == 2 && sStrLen % 2 == 1 )
{
pcRet[sRetStrLen++] = pcString[sStrLen - 1];
pcRet[ sRetStrLen++ ] = pcString[ sStrLen - 1 ];
}
hb_retclen( pcRet, sRetStrLen );
hb_xfree( pcRet );
}
else /* if (ISCHAR (1) && ISCHAR (2)) */
else /* if( HB_ISCHAR( 1 ) && HB_ISCHAR( 2 ) ) */
{
PHB_ITEM pSubst = NULL;
int iArgErrorMode = ct_getargerrormode(), iError = 0;

View File

@@ -67,12 +67,12 @@ HB_FUNC( CHARREPL )
( sReplaceLen = hb_parclen( 3 ) ) > 0 )
{
/* get parameters */
const char *pcSearch = hb_parc( 1 );
const char *pcString = hb_parc( 2 );
const char * pcSearch = hb_parc( 1 );
const char * pcString = hb_parc( 2 );
HB_SIZE sStrLen = hb_parclen( 2 );
const char *pcReplace = hb_parc( 3 );
const char * pcReplace = hb_parc( 3 );
int iMode;
char *pcRet;
char * pcRet;
HB_SIZE sIndex;
/* if sStrLen == 0, we can return immediately */
@@ -104,7 +104,7 @@ HB_FUNC( CHARREPL )
for( sIndex = 0; sIndex < sSearchLen; sIndex++ )
{
HB_SIZE sMatchStrLen;
const char *pc;
const char * pc;
HB_SIZE sReplIndex = sIndex;
if( sReplIndex > sReplaceLen - 1 )

View File

@@ -66,8 +66,8 @@ static int
#endif
_hb_do_sortascend( const void *p1, const void *p2 )
{
const char *pc1 = ( const char * ) p1;
const char *pc2 = ( const char * ) p2;
const char * pc1 = ( const char * ) p1;
const char * pc2 = ( const char * ) p2;
pc1 += s_sElementPos;
pc2 += s_sElementPos;
@@ -82,8 +82,8 @@ static int
#endif
_hb_do_sortdescend( const void *p1, const void *p2 )
{
const char *pc1 = ( const char * ) p1;
const char *pc2 = ( const char * ) p2;
const char * pc1 = ( const char * ) p1;
const char * pc2 = ( const char * ) p2;
pc1 += s_sElementPos;
pc2 += s_sElementPos;
@@ -102,8 +102,8 @@ HB_FUNC( CHARSORT )
if( HB_ISCHAR( 1 ) )
{
/* get parameters */
const char *pcString = hb_parc( 1 );
char *pcRet;
const char * pcString = hb_parc( 1 );
char * pcRet;
HB_SIZE sStrLen = hb_parclen( 1 );
HB_SIZE sElementLen, sIgnore, sSortLen;
int iDescend;

View File

@@ -101,7 +101,7 @@ HB_FUNC( CHARSPREAD )
szDest = ( char * ) hb_xgrab( nSize + 1 );
for( nDst = ul = 0; ul < nLen; ++ul )
{
szDest[ nDst++ ] = szText[ul];
szDest[ nDst++ ] = szText[ ul ];
if( szText[ ul ] == cDelim )
{
while( ul + 1 < nLen && szText[ ul + 1 ] == cDelim )

View File

@@ -72,12 +72,12 @@ static void do_charswap( int iSwitch )
/* param check */
if( HB_ISCHAR( 1 ) )
{
const char *pcString = hb_parc( 1 );
const char * pcString = hb_parc( 1 );
HB_SIZE sStrLen = hb_parclen( 1 );
char *pcRet;
char * pcRet;
HB_SIZE sRetIndex = 0;
int iShift, iMod;
const char *pcSub;
const char * pcSub;
if( sStrLen == 0 )
{
@@ -108,24 +108,24 @@ static void do_charswap( int iSwitch )
switch ( iSwitch )
{
case DO_CHARSWAP_WORDSWAP:
pcRet[sRetIndex++] = pcSub[2];
pcRet[sRetIndex++] = pcSub[3];
pcRet[sRetIndex++] = pcSub[0];
pcRet[sRetIndex++] = pcSub[1];
pcRet[ sRetIndex++ ] = pcSub[ 2 ];
pcRet[ sRetIndex++ ] = pcSub[ 3 ];
pcRet[ sRetIndex++ ] = pcSub[ 0 ];
pcRet[ sRetIndex++ ] = pcSub[ 1 ];
break;
case DO_CHARSWAP_WORDSWAP_CHARSWAP:
pcRet[sRetIndex++] = pcSub[3];
pcRet[sRetIndex++] = pcSub[2];
pcRet[ sRetIndex++ ] = pcSub[ 3 ];
pcRet[ sRetIndex++ ] = pcSub[ 2 ];
/* no 'break' here !! */
case DO_CHARSWAP_CHARSWAP:
pcRet[sRetIndex++] = pcSub[1];
pcRet[sRetIndex++] = pcSub[0];
pcRet[ sRetIndex++ ] = pcSub[ 1 ];
pcRet[ sRetIndex++ ] = pcSub[ 0 ];
}
}
/* copy rest of string */
if( ( iSwitch == DO_CHARSWAP_WORDSWAP ) || ( iSwitch == DO_CHARSWAP_WORDSWAP_CHARSWAP ) )
if( iSwitch == DO_CHARSWAP_WORDSWAP || iSwitch == DO_CHARSWAP_WORDSWAP_CHARSWAP )
{
iMod = sStrLen % 4;
}
@@ -136,7 +136,7 @@ static void do_charswap( int iSwitch )
for( pcSub = pcString + sStrLen - iMod; pcSub < pcString + sStrLen; pcSub++ )
{
pcRet[sRetIndex++] = *pcSub;
pcRet[ sRetIndex++ ] = *pcSub;
}
/* return string */
@@ -151,7 +151,7 @@ static void do_charswap( int iSwitch )
hb_retclen( pcRet, sRetIndex );
hb_xfree( pcRet );
}
else /* if (ISCHAR (1)) */
else /* if( HB_ISCHAR( 1 ) ) */
{
PHB_ITEM pSubst = NULL;
int iArgErrorMode = ct_getargerrormode();

View File

@@ -64,10 +64,10 @@ static void do_count( int iSwitch )
/* param check */
if( HB_ISCHAR( 1 ) )
{
const char *pcString = hb_parc( 1 );
const char * pcString = hb_parc( 1 );
HB_SIZE sStrLen = hb_parclen( 1 );
HB_SIZE sRetVal;
const char *pc;
const char * pc;
char cSearch;
if( hb_parclen( 2 ) > 0 )

View File

@@ -63,9 +63,9 @@ static void do_pad( int iSwitch )
{
if( HB_ISCHAR( 1 ) && HB_ISNUM( 2 ) )
{
const char *pcString = hb_parc( 1 );
const char * pcString = hb_parc( 1 );
HB_SIZE sStrLen = hb_parclen( 1 );
char *pcRet, *pc;
char * pcRet, *pc;
HB_ISIZ nRetLen;
HB_SIZE sRetLen;
char cFill;

View File

@@ -81,7 +81,7 @@ const char *ct_at_exact_forward( const char * pcString, HB_SIZE sStrLen,
HB_TRACE( HB_TR_DEBUG, ( "ct_at_exact_forward (\"%s\", %" HB_PFS "u, \"%s\", %" HB_PFS "u, %p)",
pcString, sStrLen, pcMatch, sMatchLen, psMatchStrLen ) );
if( ( sMatchLen == 0 ) || ( sStrLen < sMatchLen ) )
if( sMatchLen == 0 || sStrLen < sMatchLen )
return NULL;
sPos = hb_strAt( pcMatch, sMatchLen, pcString, sStrLen );
@@ -111,7 +111,7 @@ const char *ct_at_exact_backward( const char * pcString, HB_SIZE sStrLen,
HB_TRACE( HB_TR_DEBUG, ( "ct_at_exact_backward (\"%s\", %" HB_PFS "u, \"%s\", %" HB_PFS "u, %p)",
pcString, sStrLen, pcMatch, sMatchLen, psMatchStrLen ) );
if( ( sMatchLen == 0 ) || ( sStrLen < sMatchLen ) )
if( sMatchLen == 0 || sStrLen < sMatchLen )
return NULL;
for( pcRet = pcString + sStrLen - sMatchLen; pcRet >= pcString; pcRet-- )
@@ -145,7 +145,7 @@ const char *ct_at_wildcard_forward( const char * pcString, HB_SIZE sStrLen,
HB_TRACE( HB_TR_DEBUG, ( "ct_at_wildcard_forward (\"%s\", %" HB_PFS "u, \"%s\", %" HB_PFS "u, \'%c\', %p)",
pcString, sStrLen, pcMatch, sMatchLen, cWildCard, psMatchStrLen ) );
if( ( sMatchLen == 0 ) || ( sStrLen < sMatchLen ) )
if( sMatchLen == 0 || sStrLen < sMatchLen )
return NULL;
pcStop = pcString + sStrLen - sMatchLen;
@@ -155,7 +155,7 @@ const char *ct_at_wildcard_forward( const char * pcString, HB_SIZE sStrLen,
{
char c = *( pcMatch + sIndex );
if( ( c != cWildCard ) && ( c != *( pcRet + sIndex ) ) )
if( c != cWildCard && c != *( pcRet + sIndex ) )
break;
}
if( sIndex == sMatchLen )
@@ -183,7 +183,7 @@ const char *ct_at_wildcard_backward( const char * pcString, HB_SIZE sStrLen,
HB_TRACE( HB_TR_DEBUG, ( "ct_at_wildcard_backward (\"%s\", %" HB_PFS "u, \"%s\", %" HB_PFS "u, \'%c\', %p)",
pcString, sStrLen, pcMatch, sMatchLen, cWildCard, psMatchStrLen ) );
if( ( sMatchLen == 0 ) || ( sStrLen < sMatchLen ) )
if( sMatchLen == 0 || sStrLen < sMatchLen )
return NULL;
for( pcRet = pcString + sStrLen - sMatchLen; pcRet >= pcString; pcRet-- )
@@ -192,7 +192,7 @@ const char *ct_at_wildcard_backward( const char * pcString, HB_SIZE sStrLen,
{
char c = *( pcMatch + sIndex );
if( ( c != cWildCard ) && ( c != *( pcRet + sIndex ) ) )
if( c != cWildCard && c != *( pcRet + sIndex ) )
break;
}
if( sIndex == sMatchLen )
@@ -221,7 +221,7 @@ const char *ct_at_charset_forward( const char * pcString, HB_SIZE sStrLen,
*( psMatchedCharPos ) = sCharSetLen;
if( ( sCharSetLen == 0 ) || ( sStrLen == 0 ) )
if( sCharSetLen == 0 || sStrLen == 0 )
return NULL;
pcStop1 = pcString + sStrLen;
@@ -254,7 +254,7 @@ const char *ct_at_charset_backward( const char * pcString, HB_SIZE sStrLen,
*( psMatchedCharPos ) = sCharSetLen;
if( ( sCharSetLen == 0 ) || ( sStrLen == 0 ) )
if( sCharSetLen == 0 || sStrLen == 0 )
return NULL;
pcStop = pcCharSet + sCharSetLen;
@@ -390,7 +390,7 @@ HB_FUNC( SETATLIKE )
{
int iNewMode = hb_parni( 1 );
if( ( iNewMode == CT_SETATLIKE_EXACT ) || ( iNewMode == CT_SETATLIKE_WILDCARD ) )
if( iNewMode == CT_SETATLIKE_EXACT || iNewMode == CT_SETATLIKE_WILDCARD )
{
ct_setatlike( iNewMode );
}

View File

@@ -90,7 +90,7 @@ static int ct_daystomonth( int iMonth, HB_BOOL bLeap )
static const int iMonthes[] =
{ 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334 };
return ( ( iMonth < 1 && iMonth > 12 ) ? 0 : iMonthes[iMonth - 1] +
return ( ( iMonth < 1 && iMonth > 12 ) ? 0 : iMonthes[ iMonth - 1 ] +
( ( bLeap && iMonth > 2 ) ? 1 : 0 ) );
}
@@ -111,7 +111,7 @@ HB_FUNC( CTODOW )
if( nLen )
{
const char *szParam = hb_parc( 1 );
const char * szParam = hb_parc( 1 );
for( iDow = 7; iDow > 0; iDow-- )
{
@@ -131,7 +131,7 @@ HB_FUNC( CTOMONTH )
if( nLen )
{
const char *szParam = hb_parc( 1 );
const char * szParam = hb_parc( 1 );
for( iMonth = 12; iMonth > 0; iMonth-- )
{
const char * szMonth = hb_langDGetItem( HB_LANG_ITEM_BASE_MONTH + iMonth - 1 );
@@ -158,14 +158,14 @@ HB_FUNC( DMY )
if( iMonth >= 1 && iMonth <= 12 )
{
const char *szMonth = hb_langDGetItem( HB_LANG_ITEM_BASE_MONTH + iMonth - 1 );
const char * szMonth = hb_langDGetItem( HB_LANG_ITEM_BASE_MONTH + iMonth - 1 );
int iMonLen = ( int ) strlen( szMonth );
int iLen = 0, iBufLen = iMonLen + 10;
char *szMDY = ( char * ) hb_xgrab( iBufLen );
char * szMDY = ( char * ) hb_xgrab( iBufLen );
if( iDay < 10 )
{
szMDY[iLen] = ( char ) iDay + 0x30;
szMDY[ iLen ] = ( char ) iDay + 0x30;
iLen++;
}
else
@@ -176,15 +176,15 @@ HB_FUNC( DMY )
if( bMode )
{
szMDY[iLen] = '.';
szMDY[ iLen ] = '.';
iLen++;
}
szMDY[iLen] = ' ';
szMDY[ iLen ] = ' ';
iLen++;
hb_strncpy( szMDY + iLen, szMonth, iBufLen - iLen - 1 );
iLen += iMonLen;
szMDY[iLen] = ' ';
szMDY[ iLen ] = ' ';
iLen++;
if( hb_setGetCentury() )
@@ -216,16 +216,16 @@ HB_FUNC( MDY )
if( iMonth >= 1 && iMonth <= 12 )
{
const char *szMonth = hb_langDGetItem( HB_LANG_ITEM_BASE_MONTH + iMonth - 1 );
const char * szMonth = hb_langDGetItem( HB_LANG_ITEM_BASE_MONTH + iMonth - 1 );
int iLen = ( int ) strlen( szMonth );
int iBufLen = iLen + 9;
char *szMDY = ( char * ) hb_xgrab( iBufLen );
char * szMDY = ( char * ) hb_xgrab( iBufLen );
hb_strncpy( szMDY, szMonth, iBufLen - 1 );
szMDY[iLen++] = ' ';
szMDY[ iLen++ ] = ' ';
if( iDay < 10 )
{
szMDY[iLen] = ( char ) iDay + 0x30;
szMDY[ iLen ] = ( char ) iDay + 0x30;
iLen++;
}
else
@@ -233,7 +233,7 @@ HB_FUNC( MDY )
hb_snprintf( szMDY + iLen, 3, "%02d", iDay );
iLen += 2;
}
szMDY[iLen++] = ' ';
szMDY[ iLen++ ] = ' ';
if( hb_setGetCentury() )
{
@@ -427,8 +427,8 @@ HB_FUNC( WEEK )
{
long lDate2;
if( hb_setGetCPtr( HB_SET_DATEFORMAT ) && ( hb_setGetCPtr( HB_SET_DATEFORMAT )[0] == 'd' ||
hb_setGetCPtr( HB_SET_DATEFORMAT )[0] == 'D' ) )
if( hb_setGetCPtr( HB_SET_DATEFORMAT ) && ( hb_setGetCPtr( HB_SET_DATEFORMAT )[ 0 ] == 'd' ||
hb_setGetCPtr( HB_SET_DATEFORMAT )[ 0 ] == 'D' ) )
lDate2 = lDate + 3 - ( hb_dateDOW( iYear, iMonth, iDay ) + 5 ) % 7;
else
lDate2 = lDate + 4 - hb_dateDOW( iYear, iMonth, iDay );

View File

@@ -72,7 +72,7 @@ HB_FUNC( EXPAND )
if( i == 2 && HB_ISCHAR( 2 ) )
{
iRepl = 1;
cRepl = hb_parc( 2 )[0];
cRepl = hb_parc( 2 )[ 0 ];
}
else if( i == 2 && iRepl == 0 && HB_ISNUM( 2 ) )
{
@@ -86,18 +86,18 @@ HB_FUNC( EXPAND )
if( HB_ISNUM( 3 ) )
cRepl = ( char ) hb_parni( 3 );
else if( HB_ISCHAR( 3 ) )
cRepl = hb_parc( 3 )[0];
cRepl = hb_parc( 3 )[ 0 ];
else
cRepl = ' ';
}
ulSize = ( nLen - 1 ) * ( iRepl + 1 ) + 1;
szPtr = szDest = ( char * ) hb_xgrab( ulSize + 1 );
*szPtr++ = szText[0];
*szPtr++ = szText[ 0 ];
for( ul = 1; ul < nLen; ++ul )
{
for( i = 0; i < iRepl; ++i )
*szPtr++ = cRepl;
*szPtr++ = szText[ul];
*szPtr++ = szText[ ul ];
}
hb_retclen_buffer( szDest, ulSize );
}

View File

@@ -65,16 +65,16 @@ HB_FUNC( MANTISSA )
union
{
double value;
char string[sizeof( double )];
char string[ sizeof( double ) ];
} xConvert;
xConvert.value = hb_parnd( 1 );
if( xConvert.value != 0 )
{
xConvert.string[6] |= 0xF0;
xConvert.string[7] |= 0x3F;
xConvert.string[7] &= 0xBF;
xConvert.string[ 6 ] |= 0xF0;
xConvert.string[ 7 ] |= 0x3F;
xConvert.string[ 7 ] &= 0xBF;
}
hb_retnd( xConvert.value );
@@ -117,16 +117,16 @@ HB_FUNC( EXPONENT )
union
{
double value;
char string[sizeof( double )];
char string[ sizeof( double ) ];
} xConvert;
xConvert.value = hb_parnd( 1 );
if( xConvert.value != 0 )
{
iExponent = ( int ) ( xConvert.string[7] & 0x07F );
iExponent = ( int ) ( xConvert.string[ 7 ] & 0x07F );
iExponent = iExponent << 4;
iExponent += ( int ) ( ( xConvert.string[6] & 0xF0 ) >> 4 );
iExponent += ( int ) ( ( xConvert.string[ 6 ] & 0xF0 ) >> 4 );
iExponent -= 1023;
}

View File

@@ -69,11 +69,11 @@ static void do_justify( int iSwitch )
if( HB_ISCHAR( 1 ) )
{
const char *pcString = hb_parc( 1 );
const char * pcString = hb_parc( 1 );
HB_SIZE sStrLen = hb_parclen( 1 );
char cJustChar;
const char *pc;
char *pcRet, *pcw;
const char * pc;
char * pcRet, *pcw;
HB_SIZE sJustOffset;
if( sStrLen == 0 )

View File

@@ -58,16 +58,16 @@ HB_FUNC( NUMAT )
{
if( ( HB_ISCHAR( 1 ) ) && ( HB_ISCHAR( 2 ) ) )
{
const char *pcStringToMatch = hb_parc( 1 );
const char * pcStringToMatch = hb_parc( 1 );
HB_SIZE sStrToMatchLen = hb_parclen( 1 );
const char *pcString = hb_parc( 2 );
const char * pcString = hb_parc( 2 );
HB_SIZE sStrLen = hb_parclen( 2 );
int iMultiPass = ct_getatmupa();
int iAtLike = ct_getatlike();
char cAtLike = ct_getatlikechar();
HB_SIZE sIgnore, sMatchStrLen = 0, sSubStrLen;
HB_SIZE nCounter;
const char *pc, *pcSubStr;
const char * pc, *pcSubStr;
/* eventually ignore some characters */
if( HB_ISNUM( 3 ) )

View File

@@ -72,7 +72,7 @@ static void do_pos1( int iSwitch )
HB_ISCHAR( 2 ) && /* .. string as 2nd .. */
HB_ISCHAR( 3 ) ) ) ) /* .. and 3rd param */
{
const unsigned char *pcString, *puc;
const unsigned char * pcString, *puc;
HB_SIZE sStrLen;
unsigned char ucChar1 = ' ', ucChar2 = ' ';
int iMode;

View File

@@ -64,9 +64,9 @@ HB_FUNC( POSCHAR )
{
if( ( hb_parclen( 2 ) > 0 ) || HB_ISNUM( 2 ) )
{
const char *pcString = hb_parc( 1 );
const char * pcString = hb_parc( 1 );
HB_SIZE sStrLen = hb_parclen( 1 );
char *pcRet;
char * pcRet;
char cReplace;
HB_SIZE sPosition;
@@ -144,10 +144,10 @@ HB_FUNC( POSDEL )
{
if( HB_ISCHAR( 1 ) )
{
const char *pcString = hb_parc( 1 );
const char * pcString = hb_parc( 1 );
HB_SIZE sStrLen = hb_parclen( 1 );
HB_SIZE sStartPos, sDelLen;
char *pcRet;
char * pcRet;
if( HB_ISNUM( 3 ) )
sDelLen = hb_parns( 3 );
@@ -209,15 +209,15 @@ HB_FUNC( POSINS )
{
if( HB_ISCHAR( 1 ) )
{
const char *pcString = hb_parc( 1 );
const char * pcString = hb_parc( 1 );
HB_SIZE sStrLen = hb_parclen( 1 );
const char *pcInsert;
const char * pcInsert;
HB_SIZE sInsLen;
if( ( sInsLen = hb_parclen( 2 ) ) > 0 )
{
HB_SIZE sStartPos;
char *pcRet;
char * pcRet;
pcInsert = hb_parc( 2 );
@@ -293,16 +293,16 @@ HB_FUNC( POSREPL )
if( HB_ISCHAR( 1 ) )
{
const char *pcString = hb_parc( 1 );
const char * pcString = hb_parc( 1 );
HB_SIZE sStrLen = hb_parclen( 1 );
const char *pcReplace;
const char * pcReplace;
HB_SIZE sReplLen;
if( ( sReplLen = hb_parclen( 2 ) ) > 0 )
{
HB_SIZE sStartPos;
char *pcRet;
char * pcRet;
HB_SIZE sRetLen;
pcReplace = hb_parc( 2 );

View File

@@ -58,11 +58,11 @@ HB_FUNC( POSDIFF )
{
if( HB_ISCHAR( 1 ) && HB_ISCHAR( 2 ) )
{
const char *pcString1 = hb_parc( 1 );
const char * pcString1 = hb_parc( 1 );
HB_SIZE sStrLen1 = hb_parclen( 1 );
const char *pcString2 = hb_parc( 2 );
const char * pcString2 = hb_parc( 2 );
HB_SIZE sStrLen2 = hb_parclen( 2 );
const char *pc1, *pc2;
const char * pc1, *pc2;
HB_SIZE sIgnore;
if( HB_ISNUM( 3 ) )
@@ -127,11 +127,11 @@ HB_FUNC( POSEQUAL )
{
if( HB_ISCHAR( 1 ) && HB_ISCHAR( 2 ) )
{
const char *pcString1 = hb_parc( 1 );
const char * pcString1 = hb_parc( 1 );
HB_SIZE sStrLen1 = hb_parclen( 1 );
const char *pcString2 = hb_parc( 2 );
const char * pcString2 = hb_parc( 2 );
HB_SIZE sStrLen2 = hb_parclen( 2 );
const char *pc1, *pc2;
const char * pc1, *pc2;
HB_SIZE sIgnore, sCompare, sCompareCnt, sRet = 0;
if( HB_ISNUM( 4 ) )

View File

@@ -59,10 +59,10 @@ HB_FUNC( RANGEREM )
if( ( hb_parclen( 1 ) > 0 || HB_ISNUM( 1 ) ) &&
( hb_parclen( 2 ) > 0 || HB_ISNUM( 2 ) ) && HB_ISCHAR( 3 ) )
{
const char *pcString = hb_parc( 3 );
const char * pcString = hb_parc( 3 );
HB_SIZE sStrLen = hb_parclen( 3 );
char *pcRet;
const unsigned char *pc;
char * pcRet;
const unsigned char * pc;
unsigned char ucChar1, ucChar2;
HB_SIZE sRetIndex;
int iMode, iBool;
@@ -129,10 +129,10 @@ HB_FUNC( RANGEREPL )
( hb_parclen( 2 ) > 0 || HB_ISNUM( 2 ) ) &&
HB_ISCHAR( 3 ) && ( hb_parclen( 4 ) > 0 || HB_ISNUM( 4 ) ) )
{
const char *pcString = hb_parc( 3 );
const char * pcString = hb_parc( 3 );
HB_SIZE sStrLen = hb_parclen( 3 );
char *pcRet;
const unsigned char *pc;
char * pcRet;
const unsigned char * pc;
unsigned char ucChar1, ucChar2, ucReplace;
HB_SIZE sRetIndex;
int iMode, iBool;

View File

@@ -58,16 +58,16 @@ HB_FUNC( CHARRELA )
{
if( HB_ISCHAR( 1 ) && HB_ISCHAR( 2 ) && HB_ISCHAR( 3 ) && HB_ISCHAR( 4 ) )
{
const char *pcStringToMatch1 = hb_parc( 1 );
const char * pcStringToMatch1 = hb_parc( 1 );
HB_SIZE sStrToMatchLen1 = hb_parclen( 1 );
const char *pcString1 = hb_parc( 2 );
const char * pcString1 = hb_parc( 2 );
HB_SIZE sStrLen1 = hb_parclen( 2 );
const char *pcStringToMatch2 = hb_parc( 3 );
const char * pcStringToMatch2 = hb_parc( 3 );
HB_SIZE sStrToMatchLen2 = hb_parclen( 3 );
const char *pcString2 = hb_parc( 4 );
const char * pcString2 = hb_parc( 4 );
HB_SIZE sStrLen2 = hb_parclen( 4 );
const char *pc1, *pc2;
const char * pc1, *pc2;
HB_SIZE sOffset1, sOffset2;
HB_SIZE sMatchStrLen;
@@ -142,18 +142,18 @@ HB_FUNC( CHARRELREP )
if( HB_ISCHAR( 1 ) && HB_ISCHAR( 2 ) && HB_ISCHAR( 3 ) &&
HB_ISCHAR( 4 ) && HB_ISCHAR( 5 ) )
{
const char *pcStringToMatch1 = hb_parc( 1 );
const char * pcStringToMatch1 = hb_parc( 1 );
HB_SIZE sStrToMatchLen1 = hb_parclen( 1 );
const char *pcString1 = hb_parc( 2 );
const char * pcString1 = hb_parc( 2 );
HB_SIZE sStrLen1 = hb_parclen( 2 );
const char *pcStringToMatch2 = hb_parc( 3 );
const char * pcStringToMatch2 = hb_parc( 3 );
HB_SIZE sStrToMatchLen2 = hb_parclen( 3 );
const char *pcString2 = hb_parc( 4 );
const char * pcString2 = hb_parc( 4 );
HB_SIZE sStrLen2 = hb_parclen( 4 );
const char *pcReplace = hb_parc( 5 );
const char * pcReplace = hb_parc( 5 );
HB_SIZE sReplaceLen = hb_parclen( 5 );
char *pcRet;
const char *pc1, *pc2;
char * pcRet;
const char * pc1, *pc2;
HB_SIZE sOffset1, sOffset2;
HB_SIZE sMatchStrLen;

View File

@@ -71,10 +71,10 @@ static void do_remove( int iSwitch )
/* param check */
if( HB_ISCHAR( 1 ) )
{
const char *pcString = hb_parc( 1 );
const char * pcString = hb_parc( 1 );
HB_SIZE sStrLen = hb_parclen( 1 );
const char *pcRet;
const char *pc;
const char * pcRet;
const char * pc;
HB_SIZE sRetLen;
char cSearch;
@@ -112,7 +112,7 @@ static void do_remove( int iSwitch )
else
hb_retclen( pcRet, sRetLen );
}
else /* if (ISCHAR (1)) */
else /* if( HB_ISCHAR( 1 ) ) */
{
PHB_ITEM pSubst = NULL;
int iArgErrorMode = ct_getargerrormode();

View File

@@ -75,9 +75,9 @@ static void do_replace( int iSwitch )
/* param check */
if( HB_ISCHAR( 1 ) && ( hb_parclen( 2 ) > 0 || HB_ISNUM( 2 ) ) )
{
const char *pcString = hb_parc( 1 );
const char * pcString = hb_parc( 1 );
HB_SIZE sStrLen = hb_parclen( 1 );
char *pcRet, *pc;
char * pcRet, *pc;
char cSearch, cReplace;
if( sStrLen == 0 )

View File

@@ -215,7 +215,7 @@ static int hb_ctGetClearChar( int iParam )
if( HB_ISNUM( iParam ) )
iChar = hb_parni( iParam );
else if( HB_ISCHAR( iParam ) )
iChar = ( HB_UCHAR ) hb_parc( iParam )[0];
iChar = ( HB_UCHAR ) hb_parc( iParam )[ 0 ];
else
iChar = ( int ) hb_gtGetClearChar();
@@ -300,14 +300,14 @@ HB_FUNC( UNTEXTWIN )
if( HB_ISNUM( 6 ) )
usInit = ( HB_USHORT ) hb_parni( 6 );
else if( hb_parclen( 6 ) > 0 )
usInit = ( HB_UCHAR ) hb_parc( 6 )[0];
usInit = ( HB_UCHAR ) hb_parc( 6 )[ 0 ];
else
usInit = 176;
if( HB_ISNUM( 7 ) )
usEnd = ( HB_USHORT ) hb_parni( 7 );
else if( hb_parclen( 7 ) > 0 )
usEnd = ( HB_UCHAR ) hb_parc( 7 )[0];
usEnd = ( HB_UCHAR ) hb_parc( 7 )[ 0 ];
else
usEnd = 223;
@@ -349,7 +349,7 @@ HB_FUNC( CHARWIN )
if( HB_ISNUM( 6 ) )
usOldChar = ( HB_USHORT ) hb_parni( 6 );
else if( hb_parclen( 6 ) > 0 )
usOldChar = ( HB_UCHAR ) hb_parc( 6 )[0];
usOldChar = ( HB_UCHAR ) hb_parc( 6 )[ 0 ];
else
fAll = HB_TRUE;

View File

@@ -139,7 +139,7 @@ HB_FUNC( SAYSPREAD )
do
{
for( ul = 0; ul < nLen && iCol + ( int ) ul <= iMaxCol; ++ul )
hb_gtPutChar( iRow, iCol + ( int ) ul, iColor, 0, ( HB_UCHAR ) szText[nPos + ul] );
hb_gtPutChar( iRow, iCol + ( int ) ul, iColor, 0, ( HB_UCHAR ) szText[ nPos + ul ] );
nLen += 2;
if( lDelay )
{
@@ -198,14 +198,14 @@ HB_FUNC( SAYMOVEIN )
if( iCol <= iMaxCol )
{
for( ul = 0; ul < nChars; ++ul )
hb_gtPutChar( iRow, iCol + ( int ) ul, iColor, 0, ( HB_UCHAR ) szText[ul] );
hb_gtPutChar( iRow, iCol + ( int ) ul, iColor, 0, ( HB_UCHAR ) szText[ ul ] );
}
--iCol;
}
else
{
for( ul = 0; ul < nChars; ++ul )
hb_gtPutChar( iRow, iCol + ( int ) ul, iColor, 0, ( HB_UCHAR ) szText[ul] );
hb_gtPutChar( iRow, iCol + ( int ) ul, iColor, 0, ( HB_UCHAR ) szText[ ul ] );
--szText;
}
if( ( int ) nChars + iCol <= iMaxCol )
@@ -245,7 +245,7 @@ HB_FUNC( CLEARSLOW )
if( HB_ISNUM( 6 ) )
ucChar = ( HB_UCHAR ) hb_parni( 6 );
else if( HB_ISCHAR( 6 ) )
ucChar = ( HB_UCHAR ) hb_parc( 6 )[0];
ucChar = ( HB_UCHAR ) hb_parc( 6 )[ 0 ];
else
ucChar = ( HB_UCHAR ) hb_gtGetClearChar();
@@ -255,8 +255,8 @@ HB_FUNC( CLEARSLOW )
int iColor = hb_gtGetCurrColor();
double dX, dY, dXX, dYY;
pszFrame[0] = ( char ) ucChar;
pszFrame[1] = '\0';
pszFrame[ 0 ] = ( char ) ucChar;
pszFrame[ 1 ] = '\0';
dX = iRight - iLeft + 1;
dY = iBottom - iTop + 1;
@@ -431,20 +431,20 @@ HB_FUNC( __HBCT_DSPTIME )
if( hb_parl( 5 ) )
{
int iHour = ( szTime[0] - '0' ) * 10 + ( szTime[1] - '0' );
int iHour = ( szTime[ 0 ] - '0' ) * 10 + ( szTime[ 1 ] - '0' );
if( hb_parl( 6 ) )
szTime[iLen++] = iHour >= 12 ? 'p' : 'a';
szTime[ iLen++ ] = iHour >= 12 ? 'p' : 'a';
if( iHour > 12 )
iHour -= 12;
else if( iHour == 0 )
iHour = 12;
szTime[0] = ( char ) ( iHour / 10 ) + '0';
szTime[1] = ( char ) ( iHour % 10 ) + '0';
szTime[ 0 ] = ( char ) ( iHour / 10 ) + '0';
szTime[ 1 ] = ( char ) ( iHour % 10 ) + '0';
}
if( szTime[0] == '0' )
szTime[0] = ' ';
if( szTime[ 0 ] == '0' )
szTime[ 0 ] = ' ';
hb_gtPutText( iRow, iCol, szTime, iLen, iColor );
}

View File

@@ -63,9 +63,9 @@ HB_FUNC( STRSWAP )
( sStrLen2 = hb_parclen( 2 ) ) > 0 )
{
/* get parameters */
const char *pcString1 = hb_parc( 1 );
const char *pcString2 = hb_parc( 2 );
char *pcRet1 = NULL, *pcRet2 = NULL;
const char * pcString1 = hb_parc( 1 );
const char * pcString2 = hb_parc( 2 );
char * pcRet1 = NULL, *pcRet2 = NULL;
int iChange1, iChange2;
HB_SIZE sIndex, sCmpLen;

View File

@@ -58,13 +58,13 @@ HB_FUNC( TABEXPAND )
{
if( HB_ISCHAR( 1 ) )
{
const char *pcString = hb_parc( 1 );
const char * pcString = hb_parc( 1 );
HB_SIZE sStrLen = hb_parclen( 1 );
char *pcRet;
char * pcRet;
HB_SIZE sRetLen;
HB_SIZE sTabWidth = 0;
char cFill, cTab, cCR;
const char *pcNewLine;
const char * pcNewLine;
HB_SIZE sNewLineLen;
int iIgnore141;
HB_SIZE sIndex, sLineIndex;
@@ -215,13 +215,13 @@ HB_FUNC( TABPACK )
{
if( HB_ISCHAR( 1 ) )
{
const char *pcString = hb_parc( 1 );
const char * pcString = hb_parc( 1 );
HB_SIZE sStrLen = hb_parclen( 1 );
char *pcRet;
char * pcRet;
HB_SIZE sRetLen;
HB_SIZE sTabWidth = 0;
char cFill, cTab, cCR;
const char *pcNewLine;
const char * pcNewLine;
HB_SIZE sNewLineLen;
int iIgnore141;
HB_SIZE sIndex, sTabIndex, sFillCount;

View File

@@ -98,19 +98,19 @@ static void do_token1( int iSwitch )
if( iParamCheck )
{
const char *pcString = hb_parc( 1 );
const char * pcString = hb_parc( 1 );
HB_SIZE sStrLen = hb_parclen( 1 );
const char *pcSeparatorStr;
const char * pcSeparatorStr;
HB_SIZE sSeparatorStrLen;
HB_SIZE nTokenCounter = 0;
HB_SIZE nSkip;
const char *pcSubStr;
char *pcRet = NULL;
const char * pcSubStr;
char * pcRet = NULL;
HB_SIZE sSubStrLen;
HB_SIZE sRetStrLen = 0;
HB_SIZE nToken = 0;
HB_SIZE nSkipCnt;
const char *pc;
const char * pc;
/* separator string */
sSeparatorStrLen = hb_parclen( 2 );
@@ -305,8 +305,8 @@ static void do_token1( int iSwitch )
{
char cRet;
if( ( nTokenCounter == HB_SIZE_MAX ) ||
( nToken == nTokenCounter ) )
if( nTokenCounter == HB_SIZE_MAX ||
nToken == nTokenCounter )
hb_retclen( pcSubStr, pc - pcSubStr );
else
hb_retc_null();
@@ -328,8 +328,8 @@ static void do_token1( int iSwitch )
break;
case DO_TOKEN1_ATTOKEN:
if( ( nTokenCounter == HB_SIZE_MAX ) ||
( nToken == nTokenCounter ) )
if( nTokenCounter == HB_SIZE_MAX ||
nToken == nTokenCounter )
hb_retns( pcSubStr - pcString + 1 );
else
hb_retns( 0 );

View File

@@ -282,12 +282,12 @@ HB_FUNC( TOKENINIT )
{
if( HB_ISCHAR( 1 ) )
{
const char *pcString = hb_parc( 1 );
const char * pcString = hb_parc( 1 );
HB_SIZE sStrLen = hb_parclen( 1 );
const char *pcSeparatorStr;
const char * pcSeparatorStr;
HB_SIZE sSeparatorStrLen;
HB_SIZE nSkipCnt, nSkip;
const char *pcSubStr, *pc;
const char * pcSubStr, *pc;
HB_SIZE sSubStrLen;
TOKEN_ENVIRONMENT sTokenEnvironment;
TOKEN_POSITION sTokenPosition;
@@ -429,7 +429,7 @@ HB_FUNC( TOKENNEXT )
{
if( HB_ISCHAR( 1 ) )
{
const char *pcString = hb_parc( 1 );
const char * pcString = hb_parc( 1 );
HB_SIZE sStrLen = hb_parclen( 1 );
TOKEN_ENVIRONMENT sTokenEnvironment;

View File

@@ -70,12 +70,12 @@ HB_FUNC( WORDREPL )
( sReplaceLen = hb_parclen( 3 ) ) / 2 > 0 )
{
/* get parameters */
const char *pcSearch = hb_parc( 1 );
const char *pcString = hb_parc( 2 );
const char * pcSearch = hb_parc( 1 );
const char * pcString = hb_parc( 2 );
HB_SIZE sStrLen = hb_parclen( 2 );
const char *pcReplace = hb_parc( 3 );
const char * pcReplace = hb_parc( 3 );
int iMode;
char *pcRet;
char * pcRet;
HB_SIZE sIndex;
if( HB_ISLOG( 4 ) )
@@ -90,7 +90,7 @@ HB_FUNC( WORDREPL )
{
HB_SIZE sMatchStrLen;
const char *pc;
const char * pc;
HB_SIZE sReplIndex = sIndex;
if( sReplIndex > ( sReplaceLen & 0xFFFFFFFE ) )

View File

@@ -68,10 +68,10 @@ HB_FUNC( WORDTOCHAR )
{
/* get parameters */
const char *pcSearch = hb_parc( 1 );
const char *pcString = hb_parc( 2 );
const char *pcReplace = hb_parc( 3 );
char *pcRet;
const char * pcSearch = hb_parc( 1 );
const char * pcString = hb_parc( 2 );
const char * pcReplace = hb_parc( 3 );
char * pcRet;
HB_SIZE sRetIndex, sIndex;
int iNoReplace;
@@ -85,7 +85,7 @@ HB_FUNC( WORDTOCHAR )
do
{
HB_SIZE sMatchStrLen;
const char *pc;
const char * pc;
HB_SIZE sReplIndex;
*( pcRet + sRetIndex + 1 ) = *( pcString + sIndex + 1 );