2002-04-30 12:46 UTC+0300 Alexander Kresin <alex@belacy.belgorod.su>
This commit is contained in:
@@ -7,6 +7,11 @@
|
||||
For example:
|
||||
2002-12-01 23:12 UTC+0100 Foo Bar <foo.bar@foobar.org>
|
||||
*/
|
||||
* source/rdd/dbfcdx/dbfcdx2.h
|
||||
! fixed gpf reported by Lorenzo Fiorini
|
||||
+ added helper function hb_cdxGoEof
|
||||
+ added default tag name when not specified
|
||||
* source/rdd/workarea.c
|
||||
! fixed bof flag in go bottom with no valid records
|
||||
|
||||
2002-04-30 20:49 UTC-0300 Horacio Roldan <harbour_ar@yahoo.com.ar>
|
||||
|
||||
@@ -123,7 +123,6 @@ typedef struct HB_PAGEINFO_STRU
|
||||
BOOL Changed;
|
||||
BOOL NewRoot;
|
||||
BOOL lBusy;
|
||||
BYTE PageType;
|
||||
USHORT uiKeys;
|
||||
SHORT CurKey;
|
||||
char* buffer;
|
||||
@@ -146,6 +145,7 @@ typedef struct _TAGINFO
|
||||
PHB_ITEM bottomScope;
|
||||
BOOL AscendKey;
|
||||
BOOL UniqueKey;
|
||||
BOOL Custom;
|
||||
BOOL TagChanged;
|
||||
BOOL TagBOF;
|
||||
BOOL TagEOF;
|
||||
@@ -201,10 +201,11 @@ typedef struct _NTXHEADER /* Header of NTX file */
|
||||
USHORT half_page;
|
||||
char key_expr[ NTX_MAX_KEY ];
|
||||
char unique;
|
||||
char unknown;
|
||||
char unknown1;
|
||||
char descend;
|
||||
char reserve[7];
|
||||
char unknown2;
|
||||
char for_expr[ NTX_MAX_KEY ];
|
||||
char custom;
|
||||
} NTXHEADER;
|
||||
|
||||
typedef NTXHEADER * LPNTXHEADER;
|
||||
|
||||
@@ -174,7 +174,7 @@ static ERRCODE hb_ntxIndexCreate( LPNTXINDEX pIndex );
|
||||
|
||||
static LPTAGINFO hb_ntxTagNew( LPNTXINDEX PIF, char * ITN, char *szKeyExpr,
|
||||
PHB_ITEM pKeyExpr, BYTE bKeyType, USHORT uiKeyLen, USHORT uiKeyDec, char *szForExp,
|
||||
PHB_ITEM pForExp, BOOL fAscendKey, BOOL fUnique );
|
||||
PHB_ITEM pForExp, BOOL fAscendKey, BOOL fUnique, BOOL fCustom );
|
||||
/* Create Compound Tag with information about index */
|
||||
|
||||
static LPPAGEINFO hb_ntxPageNew(LPTAGINFO pParentTag );
|
||||
@@ -2410,6 +2410,8 @@ static ERRCODE hb_ntxIndexCreate( LPNTXINDEX pIndex )
|
||||
sortInfo.itemLength = sizeof( LPSORTITEM ) + sizeof( ULONG ) + pTag->KeyLength;
|
||||
sortInfo.nItems = 0;
|
||||
sortInfo.pKey1 = sortInfo.pKey2 = sortInfo.pKeyFirst = sortInfo.pKeyTemp = NULL;
|
||||
if( pArea->lpdbOrdCondInfo && pArea->lpdbOrdCondInfo->fCustom )
|
||||
ulRecCount = 0;
|
||||
if( ulRecCount )
|
||||
{
|
||||
ulRecMax = ulRecCount;
|
||||
@@ -2605,13 +2607,14 @@ static void hb_ntxHeaderSave( LPNTXINDEX pIndex, BOOL bFull )
|
||||
strcpy( Header.for_expr , pIndex->CompoundTag->ForExpr );
|
||||
Header.unique = pIndex->CompoundTag->UniqueKey;
|
||||
Header.descend = !pIndex->CompoundTag->AscendKey;
|
||||
Header.custom = pIndex->CompoundTag->Custom;
|
||||
hb_fsWrite( pIndex->DiskFile,(BYTE*)&Header,sizeof(NTXHEADER) );
|
||||
}
|
||||
else
|
||||
hb_fsWrite( pIndex->DiskFile,(BYTE*)&Header,16 );
|
||||
}
|
||||
|
||||
static LPTAGINFO hb_ntxTagNew( LPNTXINDEX PIF, char * ITN, char *szKeyExpr, PHB_ITEM pKeyExpr, BYTE bKeyType, USHORT uiKeyLen, USHORT uiKeyDec, char *szForExp, PHB_ITEM pForExp, BOOL fAscendKey, BOOL fUnique )
|
||||
static LPTAGINFO hb_ntxTagNew( LPNTXINDEX PIF, char * ITN, char *szKeyExpr, PHB_ITEM pKeyExpr, BYTE bKeyType, USHORT uiKeyLen, USHORT uiKeyDec, char *szForExp, PHB_ITEM pForExp, BOOL fAscendKey, BOOL fUnique, BOOL fCustom )
|
||||
{
|
||||
LPTAGINFO pTag;
|
||||
|
||||
@@ -2632,6 +2635,7 @@ static LPTAGINFO hb_ntxTagNew( LPNTXINDEX PIF, char * ITN, char *szKeyExpr, PHB_
|
||||
pTag->pForItem = pForExp;
|
||||
pTag->AscendKey = fAscendKey;
|
||||
pTag->UniqueKey = fUnique;
|
||||
pTag->Custom = fCustom;
|
||||
pTag->KeyType = bKeyType;
|
||||
pTag->KeyLength = uiKeyLen;
|
||||
pTag->KeyDec = uiKeyDec;
|
||||
@@ -2756,6 +2760,7 @@ static ERRCODE hb_ntxHeaderLoad( LPNTXINDEX pIndex , char *ITN)
|
||||
pTag->pForItem = pForExp;
|
||||
pTag->UniqueKey = Header.unique;
|
||||
pTag->AscendKey = !Header.descend;
|
||||
pTag->Custom = Header.custom;
|
||||
pTag->KeyType = 'C'; /* bKeyType; */
|
||||
pTag->KeyLength = Header.key_size;
|
||||
pTag->KeyDec = Header.key_dec;
|
||||
@@ -3462,7 +3467,7 @@ static ERRCODE ntxOrderCreate( NTXAREAP pArea, LPDBORDERCREATEINFO pOrderInfo )
|
||||
pTag = hb_ntxTagNew( pIndex, szTagName, pOrderInfo->abExpr->item.asString.value,
|
||||
pKeyExp, bType, (USHORT) uiLen, (USHORT) uiDec, (char *) ( pArea->lpdbOrdCondInfo ? pArea->lpdbOrdCondInfo->abFor : NULL ),
|
||||
pForExp, pArea->lpdbOrdCondInfo ? !pArea->lpdbOrdCondInfo->fDescending : TRUE,
|
||||
pOrderInfo->fUnique );
|
||||
pOrderInfo->fUnique, pArea->lpdbOrdCondInfo ? pArea->lpdbOrdCondInfo->fCustom : FALSE );
|
||||
pIndex->CompoundTag = pTag;
|
||||
|
||||
pIndex->DiskFile = hb_spCreate( ( BYTE * ) szFileName , FC_NORMAL );
|
||||
|
||||
Reference in New Issue
Block a user