Casts to keep msvc happy
This commit is contained in:
@@ -271,7 +271,7 @@ HB_FUNC (ATADJUST)
|
||||
|
||||
/* ok -> calculate new string size */
|
||||
sRetStrLen = sStrLen-(pc-(pcString+sAdjustPosition));
|
||||
pcRetStr = hb_xgrab (sRetStrLen);
|
||||
pcRetStr = ( char *) hb_xgrab (sRetStrLen);
|
||||
|
||||
/* copy first portion of string */
|
||||
if (sAdjustPosition > 0)
|
||||
@@ -288,7 +288,7 @@ HB_FUNC (ATADJUST)
|
||||
{
|
||||
/* adjust to right */
|
||||
sRetStrLen = sStrLen+(pcString+sAdjustPosition)-pc;
|
||||
pcRetStr = hb_xgrab (sRetStrLen);
|
||||
pcRetStr = ( char *) hb_xgrab (sRetStrLen);
|
||||
|
||||
/* copy first portion of string */
|
||||
if (pc > pcString)
|
||||
|
||||
@@ -197,7 +197,7 @@ HB_FUNC (ATREPL)
|
||||
ULONG ulMatchCounter = 0;
|
||||
|
||||
sRetStrLen = sStrLen;
|
||||
pcRetStr = hb_xgrab (sRetStrLen);
|
||||
pcRetStr = ( char * ) hb_xgrab (sRetStrLen);
|
||||
hb_xmemcpy (pcRetStr, pcString, sRetStrLen);
|
||||
|
||||
pcRetSubStr = pcRetStr+sIgnore;
|
||||
@@ -247,7 +247,7 @@ HB_FUNC (ATREPL)
|
||||
/* save pc pointer */
|
||||
size_t sPCPos = pc-pcRetStr;
|
||||
|
||||
pcRetStr = hb_xrealloc (pcRetStr, sRetStrLen+(sReplaceLen-sMatchStrLen));
|
||||
pcRetStr = ( char * ) hb_xrealloc (pcRetStr, sRetStrLen+(sReplaceLen-sMatchStrLen));
|
||||
pc = pcRetStr+sPCPos;
|
||||
}
|
||||
|
||||
@@ -284,7 +284,7 @@ HB_FUNC (ATREPL)
|
||||
/* find and replace last match */
|
||||
|
||||
sRetStrLen = sStrLen;
|
||||
pcRetStr = hb_xgrab (sRetStrLen);
|
||||
pcRetStr = ( char * ) hb_xgrab (sRetStrLen);
|
||||
hb_xmemcpy (pcRetStr, pcString, sRetStrLen);
|
||||
|
||||
/* we have to find the last match and replace it */
|
||||
@@ -326,7 +326,7 @@ HB_FUNC (ATREPL)
|
||||
/* save pc pointer */
|
||||
size_t sPCPos = pc-pcRetStr;
|
||||
|
||||
pcRetStr = hb_xrealloc (pcRetStr, sRetStrLen+(sReplaceLen-sMatchStrLen));
|
||||
pcRetStr = ( char * ) hb_xrealloc (pcRetStr, sRetStrLen+(sReplaceLen-sMatchStrLen));
|
||||
pc = pcRetStr+sPCPos;
|
||||
}
|
||||
|
||||
|
||||
@@ -82,7 +82,7 @@ static void do_charevod (int iSwitch)
|
||||
return;
|
||||
}
|
||||
|
||||
pcResult = hb_xgrab ((sLen+1)/2);
|
||||
pcResult = ( char * ) hb_xgrab ((sLen+1)/2);
|
||||
|
||||
if (iSwitch == DO_CHAREVOD_CHAREVEN)
|
||||
sPos = 1;
|
||||
|
||||
@@ -130,7 +130,7 @@ static void do_list (int iSwitch)
|
||||
char *pcRet;
|
||||
size_t sRetStrLen = 0;
|
||||
|
||||
pcRet = hb_xgrab (256);
|
||||
pcRet = ( char *) hb_xgrab (256);
|
||||
|
||||
for (sCnt = 0; sCnt < 256; sCnt++)
|
||||
{
|
||||
@@ -152,7 +152,7 @@ static void do_list (int iSwitch)
|
||||
char *pcRet;
|
||||
size_t sRetStrLen = 0;
|
||||
|
||||
pcRet = hb_xgrab (256);
|
||||
pcRet = ( char * ) hb_xgrab (256);
|
||||
|
||||
for (sCnt = 0; sCnt < 256; sCnt++)
|
||||
{
|
||||
|
||||
@@ -132,7 +132,7 @@ HB_FUNC (CHARMIRR)
|
||||
return;
|
||||
}
|
||||
|
||||
pcRet = hb_xgrab (sStrLen);
|
||||
pcRet = ( char * ) hb_xgrab (sStrLen);
|
||||
|
||||
pc1 = pcString+sStrLen-1;
|
||||
if (iDontMirrorSpaces)
|
||||
|
||||
@@ -141,7 +141,7 @@ HB_FUNC (CHARMIX)
|
||||
sLen2 = 1;
|
||||
}
|
||||
|
||||
pcResult = hb_xgrab (sLen1 * 2);
|
||||
pcResult = ( char * ) hb_xgrab (sLen1 * 2);
|
||||
sPos2 = sResultPos = 0;
|
||||
for (sPos1 = 0; sPos1 < sLen1;)
|
||||
{
|
||||
|
||||
@@ -103,7 +103,7 @@ static void do_charone (int iSwitch)
|
||||
char cCurrent = *pcString;
|
||||
int iDoDelete = 1;
|
||||
|
||||
pcRet = hb_xgrab (sStrLen);
|
||||
pcRet = ( char * ) hb_xgrab (sStrLen);
|
||||
|
||||
/* copy first char */
|
||||
*(pcRet+sRetStrLen) = cCurrent;
|
||||
@@ -166,7 +166,7 @@ static void do_charone (int iSwitch)
|
||||
char cCurrent2 = *(pcString+1);
|
||||
int iDoDelete = 1;
|
||||
|
||||
pcRet = hb_xgrab (sStrLen);
|
||||
pcRet = ( char * ) hb_xgrab (sStrLen);
|
||||
/* copy first double char */
|
||||
*(pcRet+sRetStrLen) = cCurrent1;
|
||||
*(pcRet+sRetStrLen+1) = cCurrent2;
|
||||
|
||||
@@ -92,7 +92,7 @@ static void do_charonly (int iSwitch)
|
||||
iShift = 1;
|
||||
}
|
||||
|
||||
pcRet = hb_xgrab (sStrLen);
|
||||
pcRet = ( char * ) hb_xgrab (sStrLen);
|
||||
|
||||
for (pcSub = pcString; pcSub < pcString+sStrLen+1-iShift; pcSub += iShift)
|
||||
{
|
||||
|
||||
@@ -91,8 +91,8 @@ static void do_charop (int iSwitch)
|
||||
|
||||
size_t sStrLen = hb_parclen (1);
|
||||
size_t sPos;
|
||||
unsigned char *pucString = hb_parc (1);
|
||||
unsigned char *pucResult = hb_xgrab (sStrLen);
|
||||
unsigned char *pucString = ( unsigned char * ) hb_parc (1);
|
||||
unsigned char *pucResult = ( unsigned char * ) hb_xgrab (sStrLen);
|
||||
|
||||
if (pucResult == NULL)
|
||||
{
|
||||
@@ -281,10 +281,10 @@ static void do_charop (int iSwitch)
|
||||
}; /* endswitch (iSwitch) */
|
||||
|
||||
if (ISBYREF (1))
|
||||
hb_storclen (pucResult, sStrLen, 1);
|
||||
hb_storclen (( char * ) pucResult, sStrLen, 1);
|
||||
|
||||
if (!iNoRet)
|
||||
hb_retclen (pucResult, sStrLen);
|
||||
hb_retclen (( char * ) pucResult, sStrLen);
|
||||
|
||||
hb_xfree (pucResult);
|
||||
|
||||
|
||||
@@ -154,7 +154,7 @@ HB_FUNC (CHARREPL)
|
||||
iMode = 0;
|
||||
}
|
||||
|
||||
pcRet = hb_xgrab (sStrLen);
|
||||
pcRet = ( char * ) hb_xgrab (sStrLen);
|
||||
hb_xmemcpy (pcRet, pcString, sStrLen);
|
||||
|
||||
for (sIndex = 0; sIndex < sSearchLen; sIndex++)
|
||||
|
||||
@@ -222,7 +222,7 @@ HB_FUNC (CHARSORT)
|
||||
return;
|
||||
}
|
||||
|
||||
pcRet = hb_xgrab (sStrLen);
|
||||
pcRet = ( char * ) hb_xgrab (sStrLen);
|
||||
hb_xmemcpy (pcRet, pcString, sStrLen);
|
||||
|
||||
qsort (pcRet+sIgnore, (sSortLen/sElementLen), sElementLen, do_charsort);
|
||||
|
||||
@@ -96,7 +96,7 @@ static void do_charswap (int iSwitch)
|
||||
iShift = 2;
|
||||
}
|
||||
|
||||
pcRet = hb_xgrab (sStrLen);
|
||||
pcRet = ( char * ) hb_xgrab (sStrLen);
|
||||
|
||||
for (pcSub = pcString; pcSub < pcString+sStrLen+1-iShift; pcSub += iShift)
|
||||
{
|
||||
|
||||
@@ -162,7 +162,7 @@ static void do_token1 (int iSwitch)
|
||||
/* prepare return value for TOKENUPPER/TOKENLOWER */
|
||||
if ((iSwitch == DO_TOKEN1_TOKENLOWER) || (iSwitch == DO_TOKEN1_TOKENUPPER))
|
||||
{
|
||||
pcRet = hb_xgrab (sRetStrLen = sStrLen);
|
||||
pcRet = ( char * ) hb_xgrab (sRetStrLen = sStrLen);
|
||||
hb_xmemcpy (pcRet, pcString, sRetStrLen);
|
||||
}
|
||||
|
||||
|
||||
@@ -157,7 +157,7 @@ HB_FUNC (WORDREPL)
|
||||
iMode =0;
|
||||
}
|
||||
|
||||
pcRet = hb_xgrab (sStrLen);
|
||||
pcRet = ( char * ) hb_xgrab (sStrLen);
|
||||
hb_xmemcpy (pcRet, pcString, sStrLen);
|
||||
|
||||
for (sIndex = 0; sIndex < (sSearchLen&0xFFFFFFFE); sIndex+=2)
|
||||
|
||||
Reference in New Issue
Block a user