From 4a1e609b29a70485fba770399dbb190c99247b10 Mon Sep 17 00:00:00 2001 From: Jean-Francois Lefebvre Date: Wed, 21 Mar 2001 22:13:41 +0000 Subject: [PATCH] 2001-21-03 23:10 GMT+1 JFL (Mafact) --- harbour/ChangeLog | 18 ++++++++++++++---- harbour/source/rdd/dbcmd.c | 4 ++-- harbour/source/rdd/dbf1.c | 16 ++++++++-------- harbour/source/rdd/dbfcdx/dbfcdx1.c | 6 +++--- 4 files changed, 27 insertions(+), 17 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 8d97f82bb0..5bc296899f 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -1,3 +1,13 @@ +2001-21-03 23:10 GMT+1 JFL (Mafact) + *source/rdd/dbcmd.c + *source/rdd/dbf1.c + * Fixed many type casting needed by VC++ + *source/rdd/dbfcdx/dbfcdx1.c + * Fixed many type casting needed by VC++ + - Rem on line 168 + one reference to hb_cdxWhoCares who doesn't exist + from static RDDFUNCS cdxTable = { ... } + 2001-03-21 21:20 UTC+0100 Ryszard Glab *include/hbapi.h @@ -404,9 +414,9 @@ NOTE: there is no hb_gcLockItem/hb_gcUnlockItem functions - please remove USE test IF ! File( "test" + IndexExt() ) - INDEX on FIELD->First TO First + INDEX on FIELD->First TO First ELSE - SET INDEX TO First + SET INDEX TO First ENDIF GO TOP @@ -414,9 +424,9 @@ NOTE: there is no hb_gcLockItem/hb_gcUnlockItem functions - please remove cName := FIELD->First + FIELD->Last IF cName == FIELD->First + FIELD->Last - ? "Ok" + ? "Ok" ELSE - ? "Err" + ? "Err" ENDIF DO CASE diff --git a/harbour/source/rdd/dbcmd.c b/harbour/source/rdd/dbcmd.c index c4b2158a83..5e98da9077 100644 --- a/harbour/source/rdd/dbcmd.c +++ b/harbour/source/rdd/dbcmd.c @@ -3290,8 +3290,8 @@ static LPAREANODE GetTheOtherArea( char *szDriver, char * szFileName, BOOL creat { pFileExt = hb_itemPutC( NULL, "" ); SELF_INFO( ( AREAP ) pAreaNode->pArea, DBI_TABLEEXT, pFileExt ); - strncat( pInfo.abName, hb_itemGetCPtr( pFileExt ), _POSIX_PATH_MAX - - strlen( pInfo.abName ) ); + strncat( (char *) pInfo.abName, hb_itemGetCPtr( pFileExt ), _POSIX_PATH_MAX - + strlen( (char *) pInfo.abName ) ); hb_itemRelease( pFileExt ); } hb_xfree( pFileName ); diff --git a/harbour/source/rdd/dbf1.c b/harbour/source/rdd/dbf1.c index ca03249bde..9285e5ed0f 100644 --- a/harbour/source/rdd/dbf1.c +++ b/harbour/source/rdd/dbf1.c @@ -1439,7 +1439,7 @@ ERRCODE hb_dbfCreate( DBFAREAP pArea, LPDBOPENINFO pCreateInfo ) HB_TRACE(HB_TR_DEBUG, ("hb_dbfCreate(%p, %p)", pArea, pCreateInfo)); - pArea->szDataFileName = hb_xgrab( strlen(pCreateInfo->abName)+1 ); + pArea->szDataFileName = (char *) hb_xgrab( strlen( (char * ) pCreateInfo->abName)+1 ); strcpy( pArea->szDataFileName, ( char * ) pCreateInfo->abName ); uiSize = pArea->uiFieldCount * sizeof( DBFFIELD ); pBuffer = ( DBFFIELD * ) hb_xgrab( uiSize ); @@ -1654,7 +1654,7 @@ ERRCODE hb_dbfOpen( DBFAREAP pArea, LPDBOPENINFO pOpenInfo ) HB_TRACE(HB_TR_DEBUG, ("hb_dbfOpen(%p, %p)", pArea, pOpenInfo)); - pArea->szDataFileName = hb_xgrab( strlen(pOpenInfo->abName)+1 ); + pArea->szDataFileName = (char *) hb_xgrab( strlen( (char * ) pOpenInfo->abName)+1 ); strcpy( pArea->szDataFileName, ( char * ) pOpenInfo->abName ); pArea->atomAlias = hb_dynsymGet( ( char * ) pOpenInfo->atomAlias ); if( ( ( PHB_DYNS ) pArea->atomAlias )->hArea ) @@ -2483,11 +2483,11 @@ ERRCODE hb_dbfDrop( PHB_ITEM pItemTable ) BYTE * pBuffer; char szFileName[ _POSIX_PATH_MAX + 1 ]; - pBuffer = hb_itemGetCPtr( pItemTable ); - strcpy( szFileName, pBuffer ); + pBuffer = (BYTE *) hb_itemGetCPtr( pItemTable ); + strcpy( (char *) szFileName, (char *) pBuffer ); if ( !strchr( szFileName, '.' )) strcat( szFileName, DBF_TABLEEXT ); - return hb_fsDelete( szFileName ); + return hb_fsDelete( (unsigned char *) szFileName ); } /* returns 1 if exists, 0 else */ @@ -2496,11 +2496,11 @@ BOOL hb_dbfExists( PHB_ITEM pItemTable, PHB_ITEM pItemIndex ) char szFileName[ _POSIX_PATH_MAX + 1 ]; BYTE * pBuffer; - pBuffer = hb_itemGetCPtr( pItemIndex != NULL ? pItemIndex : pItemTable ); - strcpy( szFileName, pBuffer ); + pBuffer = (BYTE *) hb_itemGetCPtr( pItemIndex != NULL ? pItemIndex : pItemTable ); + strcpy( (char *) szFileName, (char *) pBuffer ); if ( pItemTable && !strchr( szFileName, '.' )) strcat( szFileName, DBF_TABLEEXT ); - return hb_fsFile( szFileName ); + return hb_fsFile( (unsigned char *) szFileName ); } diff --git a/harbour/source/rdd/dbfcdx/dbfcdx1.c b/harbour/source/rdd/dbfcdx/dbfcdx1.c index 31f3c81bb1..bc6b9b89de 100644 --- a/harbour/source/rdd/dbfcdx/dbfcdx1.c +++ b/harbour/source/rdd/dbfcdx/dbfcdx1.c @@ -164,8 +164,8 @@ static RDDFUNCS cdxTable = { ( DBENTRYP_BP ) hb_cdxBof, ( DBENTRYP_VP ) hb_cdxOpenMemFile, ( DBENTRYP_SVP ) hb_cdxPutValueFile, ( DBENTRYP_V ) hb_cdxReadDBHeader, - ( DBENTRYP_V ) hb_cdxWriteDBHeader, - ( DBENTRYP_SVP ) hb_cdxWhoCares + ( DBENTRYP_V ) hb_cdxWriteDBHeader /*, */ + /*( DBENTRYP_SVP ) hb_cdxWhoCares */ }; /* @@ -3466,7 +3466,7 @@ static void hb_cdxSortSendWord( LPSORTINFO pSort, BYTE * Value ) uiLen = ( USHORT ) Value[0]; Value++; - pce = Value + uiLen - 8; + pce = (char *) (Value + uiLen - 8) ; Tag = ( long ) hb_cdxSorttoND( (BYTE *) pce, 8 ); hb_cdxSortOutputWord( pSort, Tag, Value, uiLen-8 ); }