Andi Jahja <harbour@cbn.net.id>
This commit is contained in:
@@ -7,6 +7,10 @@
|
||||
For example:
|
||||
2002-12-01 23:12 UTC+0100 Foo Bar <foo.bar@foobar.org>
|
||||
*/
|
||||
* source/rtl/console.c
|
||||
+ Added HB_EOL_CRLF to allow the EOL string to be forced to CRLF.
|
||||
Defaults to commented out, so that the EOL string that is used
|
||||
will be detected based on platform considerations. To force CRLF,
|
||||
just include -DHB_EOL_CRLF in the C_USR environment variable and
|
||||
rebuild Harbour.
|
||||
|
||||
|
||||
@@ -1516,6 +1516,7 @@ static PHB_ITEM hb_cdxKeyGetItem( LPKEYINFO pKey, PHB_ITEM pItem, USHORT uiType
|
||||
|
||||
case HB_IT_INTEGER:
|
||||
case HB_IT_LONG:
|
||||
|
||||
case HB_IT_DOUBLE:
|
||||
pItem = (PHB_ITEM) hb_itemPutND( pItem,
|
||||
(long) hb_cdxSorttoND( (BYTE*) pKey->Value, (USHORT) pKey->length ) );
|
||||
@@ -1525,7 +1526,17 @@ static PHB_ITEM hb_cdxKeyGetItem( LPKEYINFO pKey, PHB_ITEM pItem, USHORT uiType
|
||||
pItem = (PHB_ITEM) hb_itemPutDL( pItem,
|
||||
(long) hb_cdxSorttoND( (BYTE*) pKey->Value, (USHORT) pKey->length ) );
|
||||
break;
|
||||
/*
|
||||
case HB_IT_DOUBLE:
|
||||
pItem = (PHB_ITEM) hb_itemPutND( pItem,
|
||||
(long) hb_cdxSorttoND( pKey->Value, (USHORT) pKey->length ) );
|
||||
break;
|
||||
|
||||
case HB_IT_DATE:
|
||||
pItem = (PHB_ITEM) hb_itemPutDL( pItem,
|
||||
(long) hb_cdxSorttoND( pKey->Value, (USHORT) pKey->length ) );
|
||||
break;
|
||||
*/
|
||||
case HB_IT_LOGICAL:
|
||||
pItem = hb_itemPutL( pItem,
|
||||
(pKey->Value[0] == 'T' ? TRUE : FALSE ) );
|
||||
@@ -1784,8 +1795,8 @@ static void hb_cdxTagDoIndex( LPCDXTAG pTag )
|
||||
switch( hb_itemType( pItem ) )
|
||||
{
|
||||
case HB_IT_STRING:
|
||||
hb_cdxSortInsertWord( pSort, (long) ulRecNo, (char*) pItem->item.asString.value,
|
||||
(USHORT) pItem->item.asString.length );
|
||||
hb_cdxSortInsertWord( pSort, (long) ulRecNo, pItem->item.asString.value,
|
||||
pItem->item.asString.length );
|
||||
break;
|
||||
|
||||
case HB_IT_INTEGER:
|
||||
@@ -1836,9 +1847,9 @@ static void hb_cdxTagEmptyIndex( LPCDXTAG pTag )
|
||||
pData.cdxu.External.RecNumBits = 24 - uiBitCount * 2;
|
||||
pData.cdxu.External.RecNumMask = hb_cdxMakeMask( pData.cdxu.External.RecNumBits );
|
||||
pData.cdxu.External.FreeSpace = CDX_EXTERNAL_SPACE;
|
||||
pData.cdxu.External.DupCntBits = pData.cdxu.External.TrlCntBits = (BYTE) uiBitCount;
|
||||
pData.cdxu.External.DupCntMask = (BYTE) hb_cdxMakeMask( pData.cdxu.External.DupCntBits );
|
||||
pData.cdxu.External.TrlCntMask = (BYTE) hb_cdxMakeMask( pData.cdxu.External.TrlCntBits );
|
||||
pData.cdxu.External.DupCntBits = pData.cdxu.External.TrlCntBits = uiBitCount;
|
||||
pData.cdxu.External.DupCntMask = hb_cdxMakeMask( pData.cdxu.External.DupCntBits );
|
||||
pData.cdxu.External.TrlCntMask = hb_cdxMakeMask( pData.cdxu.External.TrlCntBits );
|
||||
|
||||
hb_cdxIndexPageWrite( pTag->pIndex, pTag->RootBlock, &pData, sizeof( CDXDATA ) );
|
||||
}
|
||||
@@ -2152,9 +2163,9 @@ static void hb_cdxTagExtNodeWrite( LPCDXTAG pTag, LONG PN, LPCDXDATA pData,
|
||||
}
|
||||
}
|
||||
PIK->Space = CDX_EXTERNAL_SPACE;
|
||||
PIK->DCBits = PIK->TCBits = (BYTE) uiBitCount;
|
||||
PIK->DCMask = (BYTE) hb_cdxMakeMask( PIK->DCBits );
|
||||
PIK->TCMask = (BYTE) hb_cdxMakeMask( PIK->TCBits );
|
||||
PIK->DCBits = PIK->TCBits = uiBitCount;
|
||||
PIK->DCMask = hb_cdxMakeMask( PIK->DCBits );
|
||||
PIK->TCMask = hb_cdxMakeMask( PIK->TCBits );
|
||||
sr = cd = kcnt = 0;
|
||||
lm = sizeof( pData->cdxu.Internal.IntData ) / 2;
|
||||
q = NULL;
|
||||
@@ -2170,7 +2181,7 @@ static void hb_cdxTagExtNodeWrite( LPCDXTAG pTag, LONG PN, LPCDXDATA pData,
|
||||
q = p;
|
||||
/* Comprobar que las Keys son de tipo car cter. */
|
||||
/* cd = p->pItem->item.asString.length - cd; */
|
||||
cd = (USHORT) ( p->length - cd );
|
||||
cd = p->length - cd ;
|
||||
sr += cd + PIK->ReqByte;
|
||||
if( sr < lm )
|
||||
kcnt++;
|
||||
@@ -2240,7 +2251,7 @@ static USHORT hb_cdxTagFillExternalNode( LPCDXTAG pTag, LPCDXDATA pData,
|
||||
while( i < kcnt && ck < PIK->uiKeys )
|
||||
{
|
||||
* p = hb_cdxPageGetKey( PIK, ck );
|
||||
ct = (USHORT) ( pTag->uiLen - ( * p )->length ) ;
|
||||
ct = pTag->uiLen - ( * p )->length ;
|
||||
if( q != NULL )
|
||||
{
|
||||
hb_cdxKeyCompare( * p, q, &cd, TRUE );
|
||||
@@ -2397,8 +2408,8 @@ static void hb_cdxTagTagLoad( LPCDXTAG pTag )
|
||||
pTag->uiLen = hb_stack.Return.item.asString.length > CDX_MAXKEY ? CDX_MAXKEY :
|
||||
hb_stack.Return.item.asString.length;
|
||||
*/
|
||||
pTag->uiLen = ( hb_stackItemFromTop( -1 ) )->item.asString.length > CDX_MAXKEY ? (BYTE) CDX_MAXKEY :
|
||||
(BYTE) ( hb_stackItemFromTop( -1 ) )->item.asString.length;
|
||||
pTag->uiLen = ( hb_stackItemFromTop( -1 ) )->item.asString.length > CDX_MAXKEY ? CDX_MAXKEY :
|
||||
( hb_stackItemFromTop( -1 ) )->item.asString.length;
|
||||
break;
|
||||
}
|
||||
hb_stackPop(); /* pop macro evaluated value */
|
||||
@@ -3498,7 +3509,7 @@ static void hb_cdxSortStuffKey( LPSORTINFO pSort, LPSORTDATA * wx, BOOL fTag )
|
||||
if( pSort->PriorPtr > 0 )
|
||||
{
|
||||
x = hb_cdxSortLinkGet( pSort, pSort->PriorPtr );
|
||||
x->sortu.A.WordArray = (BYTE) p1;
|
||||
x->sortu.A.WordArray = p1;
|
||||
}
|
||||
v = pSort->WPch[0] - pSort->WCur - 1;
|
||||
if( v > 0 )
|
||||
@@ -3541,10 +3552,10 @@ static void hb_cdxSortGetNode( LPSORTINFO pSort, BYTE Character,
|
||||
hb_cdxSortLinkNew( pSort, &r );
|
||||
c = px->sortu.A.Character;
|
||||
qx = hb_cdxSortLinkGet( pSort, q );
|
||||
qx->sortu.A.WordArray = (BYTE) r;
|
||||
qx->sortu.A.WordArray = r;
|
||||
rx = hb_cdxSortLinkGet( pSort, r );
|
||||
rx->sortu.A.Character = c;
|
||||
rx->sortu.A.WordArray = (BYTE) p;
|
||||
rx->sortu.A.WordArray = p;
|
||||
px = hb_cdxSortLinkGet( pSort, p );
|
||||
px->sortu.A.Character = px->sortu.B.ChrStack[ 0 ];
|
||||
memmove( &px->sortu.B.ChrStack[ 0 ], &px->sortu.B.ChrStack[ 1 ], 3 );
|
||||
@@ -3593,10 +3604,10 @@ static void hb_cdxSortGetNode( LPSORTINFO pSort, BYTE Character,
|
||||
hb_cdxSortLinkNew( pSort, &r );
|
||||
c = px->sortu.A.Character;
|
||||
qx = hb_cdxSortLinkGet( pSort, q );
|
||||
qx->sortu.A.WordArray = (BYTE) r;
|
||||
qx->sortu.A.WordArray = r;
|
||||
rx = hb_cdxSortLinkGet( pSort, r );
|
||||
rx->sortu.A.Character = c;
|
||||
rx->sortu.A.WordArray = (BYTE) p;
|
||||
rx->sortu.A.WordArray = p;
|
||||
px = hb_cdxSortLinkGet( pSort, p );
|
||||
px->sortu.A.Character = px->sortu.B.ChrStack[ 0 ];
|
||||
memmove( &px->sortu.B.ChrStack[ 0 ], &px->sortu.B.ChrStack[ 1 ], 3 );
|
||||
@@ -3643,17 +3654,17 @@ static void hb_cdxSortGetNode( LPSORTINFO pSort, BYTE Character,
|
||||
{
|
||||
qx = hb_cdxSortLinkGet( pSort, q );
|
||||
if( q == pSort->PriorPtr )
|
||||
qx->sortu.A.WordArray = (BYTE) r;
|
||||
qx->sortu.A.WordArray = r;
|
||||
else
|
||||
qx->sortu.A.LevelLink = (BYTE) r;
|
||||
qx->sortu.A.LevelLink = r;
|
||||
}
|
||||
else
|
||||
{
|
||||
p = px->sortu.A.LevelLink;
|
||||
px->sortu.A.LevelLink = (BYTE) r;
|
||||
px->sortu.A.LevelLink = r;
|
||||
}
|
||||
rx = hb_cdxSortLinkGet( pSort, r );
|
||||
rx->sortu.A.LevelLink = (BYTE) p;
|
||||
rx->sortu.A.LevelLink = p;
|
||||
rx->sortu.A.Character = Character;
|
||||
if( fTag )
|
||||
rx->sortu.A.NUse |= SORT_NOT_KEY;
|
||||
@@ -3706,7 +3717,7 @@ static void hb_cdxSortRecurseDict( LPSORTINFO pSort, LONG WPtr, LONG WBgn )
|
||||
hb_cdxSortRecurseDict( pSort, pSort->WAdr->sortu.A.WordArray, WBgn );
|
||||
pSort->WAdr = hb_cdxSortLinkGet( pSort, WPtr );
|
||||
}
|
||||
pSort->WPch[ 0 ] = (BYTE) WCnt;
|
||||
pSort->WPch[ 0 ] = WCnt;
|
||||
if( pSort->WAdr->sortu.A.LevelLink != 0 &&
|
||||
SORT_GET_NUSE( pSort->WAdr->sortu.A.NUse) != SORT_STACK_OF_CHAR )
|
||||
hb_cdxSortRecurseDict( pSort, pSort->WAdr->sortu.A.LevelLink, WCnt );
|
||||
@@ -3771,11 +3782,11 @@ static void hb_cdxSortAddToNode( LPSORTINFO pSort, USHORT Lvl, LONG Tag,
|
||||
}
|
||||
pSort->NodeList[ 0 ]->cdxu.External.FreeSpace = CDX_EXTERNAL_SPACE;
|
||||
pSort->NodeList[ 0 ]->cdxu.External.DupCntBits =
|
||||
pSort->NodeList[ 0 ]->cdxu.External.TrlCntBits = (BYTE) bitcnt;
|
||||
pSort->NodeList[ 0 ]->cdxu.External.TrlCntBits = bitcnt;
|
||||
pSort->NodeList[ 0 ]->cdxu.External.DupCntMask =
|
||||
(BYTE) hb_cdxMakeMask( pSort->NodeList[ 0 ]->cdxu.External.DupCntBits );
|
||||
hb_cdxMakeMask( pSort->NodeList[ 0 ]->cdxu.External.DupCntBits );
|
||||
pSort->NodeList[ 0 ]->cdxu.External.TrlCntMask =
|
||||
(BYTE) hb_cdxMakeMask( pSort->NodeList[ 0 ]->cdxu.External.TrlCntBits );
|
||||
hb_cdxMakeMask( pSort->NodeList[ 0 ]->cdxu.External.TrlCntBits );
|
||||
}
|
||||
pSort->NodeList[ Lvl ]->Left_Ptr = -1;
|
||||
pSort->NodeList[ Lvl ]->Rght_Ptr = hb_cdxIndexGetAvailPage( pSort->CurTag->pIndex );
|
||||
@@ -4008,8 +4019,8 @@ ERRCODE hb_cdxOrderCreate( CDXAREAP pAreaCdx, LPDBORDERCREATEINFO pOrderInfo )
|
||||
|
||||
case HB_IT_STRING:
|
||||
bType = 'C';
|
||||
uiLen = pResult->item.asString.length > CDX_MAXKEY ? (USHORT) CDX_MAXKEY :
|
||||
(USHORT) pResult->item.asString.length;
|
||||
uiLen = pResult->item.asString.length > CDX_MAXKEY ? CDX_MAXKEY :
|
||||
pResult->item.asString.length;
|
||||
break;
|
||||
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user