diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 8008ebbd30..786bace3ea 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -1,3 +1,24 @@ + +2000-11-01 15:00 UTC+0800 Brian Hays + * contrib/rdd_ads/ads1.c + * contrib/rdd_ads/rddads.h + * include/hbrddcdx.h + * include/hbrdddbf.h + * include/hbrdddel.h + * include/hbrddsdf.h + * include/hbrddwrk.h + * source/rdd/dbcmd.c + * source/rdd/dbf1.c + * source/rdd/delim1.c + * source/rdd/sdf1.c + * source/rdd/dbfcdx/dbfcdx1.c + * source/rdd/dbfntx/dbfntx1.c + * Global replaces to fix RecAll/Recall and ReadOnly/Readonly + inconsistencies. + + RDD AUTHORS !!!! This may break your code! + I did several tests and all seems fine. + 2000-11-01 04:25 UTC+0800 Ron Pinkas * source/compiler/harbour.slx diff --git a/harbour/contrib/rdd_ads/ads1.c b/harbour/contrib/rdd_ads/ads1.c index 819809bfdd..4395d6a8a1 100644 --- a/harbour/contrib/rdd_ads/ads1.c +++ b/harbour/contrib/rdd_ads/ads1.c @@ -850,9 +850,9 @@ static ERRCODE adsPutValue( ADSAREAP pArea, USHORT uiIndex, PHB_ITEM pItem ) return SUCCESS; } -static ERRCODE adsRecAll( ADSAREAP pArea ) +static ERRCODE adsRecall( ADSAREAP pArea ) { - HB_TRACE(HB_TR_DEBUG, ("adsRecAll(%p)", pArea)); + HB_TRACE(HB_TR_DEBUG, ("adsRecall(%p)", pArea)); AdsRecallRecord ( pArea->hTable ); return SUCCESS; @@ -1105,8 +1105,7 @@ static ERRCODE adsOpen( ADSAREAP pArea, LPDBOPENINFO pOpenInfo ) } pArea->hTable = hTable; pArea->fShared = pOpenInfo->fShared; - // bh: why can't the compiler see this?? - // pArea->fReadOnly = pOpenInfo->fReadOnly; + pArea->fReadonly = pOpenInfo->fReadonly; } SELF_FIELDCOUNT( ( AREAP ) pArea, &uiFields ); @@ -1199,7 +1198,7 @@ static ERRCODE adsPack( ADSAREAP pArea ) return FAILURE; } - if( pArea->fReadOnly ) + if( pArea->fReadonly ) return FAILURE; AdsPackTable ( pArea->hTable ); @@ -1657,7 +1656,7 @@ static RDDFUNCS adsTable = { ( DBENTRYP_BP ) adsBof, ( DBENTRYP_V ) adsGoHot, ( DBENTRYP_P ) adsPutRec, ( DBENTRYP_SI ) adsPutValue, - ( DBENTRYP_V ) adsRecAll, + ( DBENTRYP_V ) adsRecall, ( DBENTRYP_ULP ) adsRecCount, ( DBENTRYP_ISI ) adsRecInfo, ( DBENTRYP_I ) adsRecNo, diff --git a/harbour/contrib/rdd_ads/rddads.h b/harbour/contrib/rdd_ads/rddads.h index 7becf46d8b..912153e8ce 100644 --- a/harbour/contrib/rdd_ads/rddads.h +++ b/harbour/contrib/rdd_ads/rddads.h @@ -90,11 +90,11 @@ typedef struct _ADSAREA_ BOOL fValidBuffer; /* State of buffer */ BOOL fRecordChanged; /* Record changed */ BOOL fShared; /* Shared file */ - BOOL fReadOnly; /* Read only file */ + BOOL fReadonly; /* Read only file */ BOOL fFLocked; /* TRUE if file is locked */ ADSHANDLE hTable; ADSHANDLE hOrdCurrent; ADSHANDLE hStatement; } ADSAREA; -typedef ADSAREA * ADSAREAP; \ No newline at end of file +typedef ADSAREA * ADSAREAP; diff --git a/harbour/include/hbrddcdx.h b/harbour/include/hbrddcdx.h index 57098b389a..6f163d1e78 100644 --- a/harbour/include/hbrddcdx.h +++ b/harbour/include/hbrddcdx.h @@ -283,7 +283,7 @@ typedef struct _CDXAREA BOOL fHasMemo; /* WorkArea with Memo fields */ BOOL fHasTags; /* WorkArea with MDX or CDX index */ BOOL fShared; /* Shared file */ - BOOL fReadOnly; /* Read only file */ + BOOL fReadonly; /* Read only file */ USHORT * pFieldOffset; /* Pointer to field offset array */ BYTE * pRecord; /* Buffer of record data */ BOOL fValidBuffer; /* State of buffer */ @@ -357,7 +357,7 @@ extern ERRCODE hb_cdxGetVarLen( CDXAREAP pArea, USHORT uiIndex, ULONG * pLength #define hb_cdxGoHot NULL #define hb_cdxPutRec NULL extern ERRCODE hb_cdxPutValue( CDXAREAP pArea, USHORT uiIndex, PHB_ITEM pItem ); -#define hb_cdxRecAll NULL +#define hb_cdxRecall NULL #define hb_cdxRecCount NULL #define hb_cdxRecInfo NULL #define hb_cdxRecNo NULL @@ -426,4 +426,4 @@ extern ERRCODE hb_cdxWriteDBHeader( CDXAREAP pArea ); } #endif -#endif /* HB_RDDCDX_H_ */ \ No newline at end of file +#endif /* HB_RDDCDX_H_ */ diff --git a/harbour/include/hbrdddbf.h b/harbour/include/hbrdddbf.h index 0c5e0f5333..76c6664f54 100644 --- a/harbour/include/hbrdddbf.h +++ b/harbour/include/hbrdddbf.h @@ -126,7 +126,7 @@ typedef struct _DBFAREA BOOL fHasMemo; /* WorkArea with Memo fields */ BOOL fHasTags; /* WorkArea with MDX or CDX index */ BOOL fShared; /* Shared file */ - BOOL fReadOnly; /* Read only file */ + BOOL fReadonly; /* Read only file */ USHORT * pFieldOffset; /* Pointer to field offset array */ BYTE * pRecord; /* Buffer of record data */ BOOL fValidBuffer; /* State of buffer */ @@ -187,7 +187,7 @@ extern ERRCODE hb_dbfGoCold( DBFAREAP pArea ); extern ERRCODE hb_dbfGoHot( DBFAREAP pArea ); extern ERRCODE hb_dbfPutRec( DBFAREAP pArea, BYTE * pBuffer ); extern ERRCODE hb_dbfPutValue( DBFAREAP pArea, USHORT uiIndex, PHB_ITEM pItem ); -extern ERRCODE hb_dbfRecAll( DBFAREAP pArea ); +extern ERRCODE hb_dbfRecall( DBFAREAP pArea ); extern ERRCODE hb_dbfRecCount( DBFAREAP pArea, ULONG * pRecCount ); #define hb_dbfRecInfo NULL extern ERRCODE hb_dbfRecNo( DBFAREAP pArea, PHB_ITEM pRecNo ); @@ -256,4 +256,4 @@ extern ERRCODE hb_dbfWriteDBHeader( DBFAREAP pArea ); } #endif -#endif /* HB_RDDDBF_H_ */ \ No newline at end of file +#endif /* HB_RDDDBF_H_ */ diff --git a/harbour/include/hbrdddel.h b/harbour/include/hbrdddel.h index c19fdbb991..5eed35aa8d 100644 --- a/harbour/include/hbrdddel.h +++ b/harbour/include/hbrdddel.h @@ -74,7 +74,7 @@ extern "C" { #define hb_delimGoHot NULL #define hb_delimPutRec NULL #define hb_delimPutValue NULL -#define hb_delimRecAll NULL +#define hb_delimRecall NULL #define hb_delimRecCount NULL #define hb_delimRecInfo NULL #define hb_delimRecNo NULL @@ -143,4 +143,4 @@ extern "C" { } #endif -#endif /* HB_RDDDEL_H_ */ \ No newline at end of file +#endif /* HB_RDDDEL_H_ */ diff --git a/harbour/include/hbrddsdf.h b/harbour/include/hbrddsdf.h index 7ae3166002..cc217d9b88 100644 --- a/harbour/include/hbrddsdf.h +++ b/harbour/include/hbrddsdf.h @@ -74,7 +74,7 @@ extern "C" { #define hb_sdfGoHot NULL #define hb_sdfPutRec NULL #define hb_sdfPutValue NULL -#define hb_sdfRecAll NULL +#define hb_sdfRecall NULL #define hb_sdfRecCount NULL #define hb_sdfRecInfo NULL #define hb_sdfRecNo NULL @@ -143,4 +143,4 @@ extern "C" { } #endif -#endif /* HB_RDDSDF_H_ */ \ No newline at end of file +#endif /* HB_RDDSDF_H_ */ diff --git a/harbour/include/hbrddwrk.h b/harbour/include/hbrddwrk.h index f599071419..0630f871d6 100644 --- a/harbour/include/hbrddwrk.h +++ b/harbour/include/hbrddwrk.h @@ -74,7 +74,7 @@ extern ERRCODE hb_waFieldName( AREAP pArea, USHORT uiIndex, void * szName ); #define hb_waGoHot hb_waUnsupported #define hb_waPutRec ( DBENTRYP_P ) hb_waUnsupported #define hb_waPutValue ( DBENTRYP_SI ) hb_waUnsupported -#define hb_waRecAll hb_waUnsupported +#define hb_waRecall hb_waUnsupported #define hb_waRecCount ( DBENTRYP_ULP ) hb_waUnsupported #define hb_waRecInfo ( DBENTRYP_ISI ) hb_waUnsupported #define hb_waRecNo ( DBENTRYP_I ) hb_waUnsupported @@ -143,4 +143,4 @@ extern ERRCODE hb_waEvalBlock( AREAP pArea, PHB_ITEM pBlock ); } #endif -#endif /* HB_RDDWRK_H_ */ \ No newline at end of file +#endif /* HB_RDDWRK_H_ */ diff --git a/harbour/source/rdd/dbcmd.c b/harbour/source/rdd/dbcmd.c index 44850e42e0..59aeb2e2ab 100644 --- a/harbour/source/rdd/dbcmd.c +++ b/harbour/source/rdd/dbcmd.c @@ -145,7 +145,7 @@ static RDDFUNCS waTable = { hb_waBof, hb_waGoHot, hb_waPutRec, hb_waPutValue, - hb_waRecAll, + hb_waRecall, hb_waRecCount, hb_waRecInfo, hb_waRecNo, diff --git a/harbour/source/rdd/dbf1.c b/harbour/source/rdd/dbf1.c index c52e29326f..ababe276fe 100644 --- a/harbour/source/rdd/dbf1.c +++ b/harbour/source/rdd/dbf1.c @@ -99,7 +99,7 @@ static RDDFUNCS dbfTable = { ( DBENTRYP_BP ) hb_dbfBof, ( DBENTRYP_V ) hb_dbfGoHot, ( DBENTRYP_P ) hb_dbfPutRec, ( DBENTRYP_SI ) hb_dbfPutValue, - ( DBENTRYP_V ) hb_dbfRecAll, + ( DBENTRYP_V ) hb_dbfRecall, ( DBENTRYP_ULP ) hb_dbfRecCount, ( DBENTRYP_ISI ) hb_dbfRecInfo, ( DBENTRYP_I ) hb_dbfRecNo, @@ -818,7 +818,7 @@ ERRCODE hb_dbfAppend( DBFAREAP pArea, BOOL bUnLockAll ) if( SELF_GOCOLD( ( AREAP ) pArea ) == FAILURE ) return FAILURE; - if( pArea->fReadOnly ) + if( pArea->fReadonly ) { pError = hb_errNew(); hb_errPutGenCode( pError, EG_READONLY ); @@ -1097,7 +1097,7 @@ ERRCODE hb_dbfGoHot( DBFAREAP pArea ) HB_TRACE(HB_TR_DEBUG, ("hb_dbfGoHot(%p)", pArea)); - if( pArea->fReadOnly ) + if( pArea->fReadonly ) { pError = hb_errNew(); hb_errPutGenCode( pError, EG_READONLY ); @@ -1277,9 +1277,9 @@ ERRCODE hb_dbfPutValue( DBFAREAP pArea, USHORT uiIndex, PHB_ITEM pItem ) /* * Undelete the current record. */ -ERRCODE hb_dbfRecAll( DBFAREAP pArea ) +ERRCODE hb_dbfRecall( DBFAREAP pArea ) { - HB_TRACE(HB_TR_DEBUG, ("hb_dbfRecAll(%p)", pArea)); + HB_TRACE(HB_TR_DEBUG, ("hb_dbfRecall(%p)", pArea)); if( pArea->lpdbPendingRel ) SELF_FORCEREL( ( AREAP ) pArea ); @@ -1659,7 +1659,7 @@ ERRCODE hb_dbfOpen( DBFAREAP pArea, LPDBOPENINFO pOpenInfo ) ( ( PHB_DYNS ) pArea->atomAlias )->hArea = pOpenInfo->uiArea; pArea->fShared = pOpenInfo->fShared; - pArea->fReadOnly = pOpenInfo->fReadonly; + pArea->fReadonly = pOpenInfo->fReadonly; uiFlags = pOpenInfo->fReadonly ? FO_READ : FO_READWRITE; uiFlags |= pOpenInfo->fShared ? FO_DENYNONE : FO_EXCLUSIVE; pError = NULL; diff --git a/harbour/source/rdd/dbfcdx/dbfcdx1.c b/harbour/source/rdd/dbfcdx/dbfcdx1.c index 7beac97c84..2b0f48a4fc 100644 --- a/harbour/source/rdd/dbfcdx/dbfcdx1.c +++ b/harbour/source/rdd/dbfcdx/dbfcdx1.c @@ -101,7 +101,7 @@ static RDDFUNCS cdxTable = { ( DBENTRYP_BP ) hb_cdxBof, ( DBENTRYP_V ) hb_cdxGoHot, ( DBENTRYP_P ) hb_cdxPutRec, ( DBENTRYP_SI ) hb_cdxPutValue, - ( DBENTRYP_V ) hb_cdxRecAll, + ( DBENTRYP_V ) hb_cdxRecall, ( DBENTRYP_ULP ) hb_cdxRecCount, ( DBENTRYP_ISI ) hb_cdxRecInfo, ( DBENTRYP_I ) hb_cdxRecNo, @@ -1152,7 +1152,7 @@ static int hb_cdxKeyCompare( LPKEYINFO pKey1, LPKEYINFO pKey2, USHORT * EndPos, /* hb_cdxTagxxx */ /* #include "cdxtag.c" */ -/* Creates a new structure with a tag information +/* Creates a new structure with a tag information * * PIF = pointer to a parent index structure * ITN = tag name @@ -1803,7 +1803,7 @@ static void hb_cdxTagExtNodeBuild( LPCDXTAG pTag, LPCDXDATA pData, LPPAGEINFO PI } } -/* Read a tag definition from the index file +/* Read a tag definition from the index file * * pTag = structure with a tag information */ @@ -1815,7 +1815,7 @@ static void hb_cdxTagTagLoad( LPCDXTAG pTag ) /* read the page from a file */ hb_cdxIndexPageRead( pTag->pIndex, pTag->TagBlock, &pHeader, sizeof( CDXTAGHEADER ) ); pTag->RootBlock = pHeader.lRoot; - /* Return if: + /* Return if: * no root page allocated * invalid root page offset (position inside an index file) * invalid key value length @@ -1824,24 +1824,24 @@ static void hb_cdxTagTagLoad( LPCDXTAG pTag ) pTag->RootBlock > hb_fsSeek( pTag->pIndex->hFile, 0, FS_END ) || pHeader.uiKeySize > CDX_MAXKEY ) return; - + pTag->uiLen = pHeader.uiKeySize; pTag->MaxKeys = ( CDX_PAGELEN - 12 ) / ( pTag->uiLen + 8 ); pTag->OptFlags = pHeader.bType; pTag->UniqueKey = ( pTag->OptFlags & 0x01 ); pTag->AscendKey = ( pHeader.iDescending == 0 ); pTag->KeyExpr = ( char * ) hb_xgrab( CDX_MAXKEY + 1 ); - /* QUESTION: Is UPPER a valid operation here? + /* QUESTION: Is UPPER a valid operation here? * This will break expressions like: * somefield+'smallcaps'+otherfield */ hb_strncpyUpper( pTag->KeyExpr, ( char * ) pHeader.KeyPool, CDX_MAXKEY ); - + if( pTag->OptFlags < 0x80 && pTag->KeyExpr[ 0 ] == 0 ) return; if( pTag->OptFlags & 0x80 ) return; - + SELF_COMPILE( (AREAP) pTag->pIndex->pArea, ( BYTE * ) pTag->KeyExpr ); pTag->pKeyItem = pTag->pIndex->pArea->valResult; pTag->pIndex->pArea->valResult = NULL; @@ -3585,7 +3585,7 @@ ERRCODE hb_cdxOrderListAdd( CDXAREAP pAreaCdx, LPDBORDERINFO pOrderInfo ) } hb_xfree( pFileName ); } - uiFlags = pAreaCdx->fReadOnly ? FO_READ : FO_READWRITE; + uiFlags = pAreaCdx->fReadonly ? FO_READ : FO_READWRITE; uiFlags |= pAreaCdx->fShared ? FO_DENYNONE : FO_EXCLUSIVE; do diff --git a/harbour/source/rdd/dbfntx/dbfntx1.c b/harbour/source/rdd/dbfntx/dbfntx1.c index 3dbacb9f6f..70445ad71d 100644 --- a/harbour/source/rdd/dbfntx/dbfntx1.c +++ b/harbour/source/rdd/dbfntx/dbfntx1.c @@ -1003,7 +1003,7 @@ static ERRCODE ntxOrderCreate( AREAP pArea, LPDBORDERCREATEINFO pOrderInfo ) { return FAILURE; } - + SELF_ORDSETCOND( pArea, NULL ); return SELF_GOTOP( pArea ); } @@ -1027,7 +1027,7 @@ static ERRCODE ntxOrderInfo( AREAP pArea, USHORT uiIndex, LPDBORDERINFO pInfo ) } hb_itemPutC( pInfo->itmResult, "" ); break; - case DBOI_EXPRESSION: + case DBOI_EXPRESSION: if( pArea->lpIndexInfo ) { pIndex = ntxFindIndex( pArea , pInfo->itmOrder ); @@ -1039,7 +1039,7 @@ static ERRCODE ntxOrderInfo( AREAP pArea, USHORT uiIndex, LPDBORDERINFO pInfo ) } hb_itemPutC( pInfo->itmResult, "" ); break; - case DBOI_NUMBER: + case DBOI_NUMBER: if( pArea->lpIndexInfo ) { pIndex = ntxFindIndex( pArea , pInfo->itmOrder ); @@ -1051,7 +1051,7 @@ static ERRCODE ntxOrderInfo( AREAP pArea, USHORT uiIndex, LPDBORDERINFO pInfo ) } /* TODO: Raise recoverable error */ break; - case DBOI_BAGNAME: + case DBOI_BAGNAME: if( pArea->lpIndexInfo ) { pIndex = ntxFindIndex( pArea , pInfo->itmOrder ); @@ -1170,7 +1170,7 @@ static ERRCODE ntxClose( AREAP pArea ) #define ntxGoHot NULL #define ntxPutRec NULL #define ntxPutValue NULL -#define ntxRecAll NULL +#define ntxRecall NULL #define ntxRecCount NULL #define ntxRecInfo NULL #define ntxRecNo NULL @@ -1254,7 +1254,7 @@ static RDDFUNCS ntxTable = { ntxBof, ntxGoHot, ntxPutRec, ntxPutValue, - ntxRecAll, + ntxRecall, ntxRecCount, ntxRecInfo, ntxRecNo, diff --git a/harbour/source/rdd/delim1.c b/harbour/source/rdd/delim1.c index b9fdd80ccc..1f0bb36901 100644 --- a/harbour/source/rdd/delim1.c +++ b/harbour/source/rdd/delim1.c @@ -90,7 +90,7 @@ static RDDFUNCS delimTable = { hb_delimBof, hb_delimGoHot, hb_delimPutRec, hb_delimPutValue, - hb_delimRecAll, + hb_delimRecall, hb_delimRecCount, hb_delimRecInfo, hb_delimRecNo, @@ -181,4 +181,4 @@ HB_FUNC( DELIM_GETFUNCTABLE ) hb_retni( hb_rddInherit( pTable, &delimTable, &delimSuper, 0 ) ); else hb_retni( FAILURE ); -} \ No newline at end of file +} diff --git a/harbour/source/rdd/sdf1.c b/harbour/source/rdd/sdf1.c index 914ae032f6..be5ef4cf0e 100644 --- a/harbour/source/rdd/sdf1.c +++ b/harbour/source/rdd/sdf1.c @@ -90,7 +90,7 @@ static RDDFUNCS sdfTable = { hb_sdfBof, hb_sdfGoHot, hb_sdfPutRec, hb_sdfPutValue, - hb_sdfRecAll, + hb_sdfRecall, hb_sdfRecCount, hb_sdfRecInfo, hb_sdfRecNo, @@ -182,4 +182,4 @@ HB_FUNC( SDF_GETFUNCTABLE ) hb_retni( hb_rddInherit( pTable, &sdfTable, &sdfSuper, 0 ) ); else hb_retni( FAILURE ); -} \ No newline at end of file +}