From fe5d0901290a30ac381f22c1e3fef90908175109 Mon Sep 17 00:00:00 2001 From: Paul Tucker Date: Wed, 27 Jun 2001 05:28:22 +0000 Subject: [PATCH] Casts to keep msvc happy --- harbour/contrib/libct/atadjust.c | 4 ++-- harbour/contrib/libct/atrepl.c | 8 ++++---- harbour/contrib/libct/charevod.c | 2 +- harbour/contrib/libct/charlist.c | 4 ++-- harbour/contrib/libct/charmirr.c | 2 +- harbour/contrib/libct/charmix.c | 2 +- harbour/contrib/libct/charone.c | 4 ++-- harbour/contrib/libct/charonly.c | 2 +- harbour/contrib/libct/charop.c | 8 ++++---- harbour/contrib/libct/charrepl.c | 2 +- harbour/contrib/libct/charsort.c | 2 +- harbour/contrib/libct/charswap.c | 2 +- harbour/contrib/libct/token1.c | 2 +- harbour/contrib/libct/wordrepl.c | 2 +- 14 files changed, 23 insertions(+), 23 deletions(-) diff --git a/harbour/contrib/libct/atadjust.c b/harbour/contrib/libct/atadjust.c index 87d12370e9..eb1cf9898c 100644 --- a/harbour/contrib/libct/atadjust.c +++ b/harbour/contrib/libct/atadjust.c @@ -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) diff --git a/harbour/contrib/libct/atrepl.c b/harbour/contrib/libct/atrepl.c index 28d73c3def..b6791e0568 100644 --- a/harbour/contrib/libct/atrepl.c +++ b/harbour/contrib/libct/atrepl.c @@ -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; } diff --git a/harbour/contrib/libct/charevod.c b/harbour/contrib/libct/charevod.c index 0b03a17906..ad9b235abc 100644 --- a/harbour/contrib/libct/charevod.c +++ b/harbour/contrib/libct/charevod.c @@ -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; diff --git a/harbour/contrib/libct/charlist.c b/harbour/contrib/libct/charlist.c index d272c44a35..8f5db289d5 100644 --- a/harbour/contrib/libct/charlist.c +++ b/harbour/contrib/libct/charlist.c @@ -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++) { diff --git a/harbour/contrib/libct/charmirr.c b/harbour/contrib/libct/charmirr.c index cc919e73b9..ce1bee995a 100644 --- a/harbour/contrib/libct/charmirr.c +++ b/harbour/contrib/libct/charmirr.c @@ -132,7 +132,7 @@ HB_FUNC (CHARMIRR) return; } - pcRet = hb_xgrab (sStrLen); + pcRet = ( char * ) hb_xgrab (sStrLen); pc1 = pcString+sStrLen-1; if (iDontMirrorSpaces) diff --git a/harbour/contrib/libct/charmix.c b/harbour/contrib/libct/charmix.c index 319c26e8d7..da585aed4c 100644 --- a/harbour/contrib/libct/charmix.c +++ b/harbour/contrib/libct/charmix.c @@ -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;) { diff --git a/harbour/contrib/libct/charone.c b/harbour/contrib/libct/charone.c index 4d02669164..a99f9d4775 100644 --- a/harbour/contrib/libct/charone.c +++ b/harbour/contrib/libct/charone.c @@ -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; diff --git a/harbour/contrib/libct/charonly.c b/harbour/contrib/libct/charonly.c index 23dfac59ea..e32fceaa3e 100644 --- a/harbour/contrib/libct/charonly.c +++ b/harbour/contrib/libct/charonly.c @@ -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) { diff --git a/harbour/contrib/libct/charop.c b/harbour/contrib/libct/charop.c index f2b9b12c26..be969ab689 100644 --- a/harbour/contrib/libct/charop.c +++ b/harbour/contrib/libct/charop.c @@ -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); diff --git a/harbour/contrib/libct/charrepl.c b/harbour/contrib/libct/charrepl.c index ca36862fd7..5fd6653ef2 100644 --- a/harbour/contrib/libct/charrepl.c +++ b/harbour/contrib/libct/charrepl.c @@ -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++) diff --git a/harbour/contrib/libct/charsort.c b/harbour/contrib/libct/charsort.c index 26ea4ce513..185b271742 100644 --- a/harbour/contrib/libct/charsort.c +++ b/harbour/contrib/libct/charsort.c @@ -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); diff --git a/harbour/contrib/libct/charswap.c b/harbour/contrib/libct/charswap.c index 784eb755a9..a852f18da9 100644 --- a/harbour/contrib/libct/charswap.c +++ b/harbour/contrib/libct/charswap.c @@ -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) { diff --git a/harbour/contrib/libct/token1.c b/harbour/contrib/libct/token1.c index 8ac9b4fc06..44b2cb34ee 100644 --- a/harbour/contrib/libct/token1.c +++ b/harbour/contrib/libct/token1.c @@ -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); } diff --git a/harbour/contrib/libct/wordrepl.c b/harbour/contrib/libct/wordrepl.c index 9aba3bc27b..2feb804a0b 100644 --- a/harbour/contrib/libct/wordrepl.c +++ b/harbour/contrib/libct/wordrepl.c @@ -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)