From 5bf32d328d418d64eac2e591c51840bb2edd5433 Mon Sep 17 00:00:00 2001 From: "Alexander S.Kresin" Date: Thu, 3 Jul 2003 06:03:28 +0000 Subject: [PATCH] 2003-07-03 10:00 UTC+0300 Alexander Kresin --- harbour/ChangeLog | 11 +++++++++++ harbour/source/codepage/cdppt850.c | 6 +++--- harbour/source/codepage/cdpptiso.c | 6 +++--- harbour/source/rdd/dbf1.c | 8 +++++++- harbour/source/rdd/dbfntx/dbfntx1.c | 2 ++ 5 files changed, 26 insertions(+), 7 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 4a3cf79ef6..71b894c291 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,17 @@ 2002-12-01 23:12 UTC+0100 Foo Bar */ +2003-07-03 10:00 UTC+0300 Alexander Kresin + * source/rdd/dbfntx/dbfntx1.c + ! Bug fixed - there was memory leak after INDEX ON ... ADDITIVE if there + were no open indexes + * source/rdd/dbf1.c + ! Problem fixed for the cases when the field name exceeds 10 characters. + * Codepage translation added for memo fields. + * source/codepage/cdppt850.c + * source/codepage/cdpptiso.c + ! Comment delimiters bug fixed. + 2003-07-02 11:35 UTC-0300 Antonio Carlos Pantaglione * source/compiler/harbour.slx ! Add 'static' in definition of hb_comp_SLX_InterceptAction and diff --git a/harbour/source/codepage/cdppt850.c b/harbour/source/codepage/cdppt850.c index a1c01eaa83..5f4e6948b3 100644 --- a/harbour/source/codepage/cdppt850.c +++ b/harbour/source/codepage/cdppt850.c @@ -52,9 +52,9 @@ * */ -/* Language name: Portuguese -/* ISO language code (2 chars): PT -/* Codepage: 850 */ +/* Language name: Portuguese */ +/* ISO language code (2 chars): PT */ +/* Codepage: 850 */ #include #include "hbapi.h" diff --git a/harbour/source/codepage/cdpptiso.c b/harbour/source/codepage/cdpptiso.c index 53cb020815..0540c18d1b 100644 --- a/harbour/source/codepage/cdpptiso.c +++ b/harbour/source/codepage/cdpptiso.c @@ -52,9 +52,9 @@ * */ -/* Language name: Portuguese -/* ISO language code (2 chars): PT -/* Codepage: iso-8859-1 */ +/* Language name: Portuguese */ +/* ISO language code (2 chars): PT */ +/* Codepage: iso-8859-1 */ #include #include "hbapi.h" diff --git a/harbour/source/rdd/dbf1.c b/harbour/source/rdd/dbf1.c index 44ba2c5b0b..6dae78f84f 100644 --- a/harbour/source/rdd/dbf1.c +++ b/harbour/source/rdd/dbf1.c @@ -569,6 +569,7 @@ static void hb_dbfGetMemo( DBFAREAP pArea, USHORT uiIndex, PHB_ITEM pItem ) *pBuffer = '\0'; hb_itemPutCPtr( pItem, ( char * ) pBuffer, ulSize ); + hb_cdpTranslate( pItem->item.asString.value, pArea->cdPage,s_cdpage ); hb_itemSetCMemo( pItem ); } @@ -1230,7 +1231,11 @@ ERRCODE hb_dbfPutValue( DBFAREAP pArea, USHORT uiIndex, PHB_ITEM pItem ) if( pField->uiType == HB_IT_MEMO ) { if( HB_IS_MEMO( pItem ) || HB_IS_STRING( pItem ) ) + { + hb_cdpTranslate( pItem->item.asString.value, s_cdpage, pArea->cdPage ); uiError = hb_dbfPutMemo( pArea, uiIndex, pItem ) ? SUCCESS : EDBF_DATAWIDTH; + hb_cdpTranslate( pItem->item.asString.value, pArea->cdPage,s_cdpage ); + } else uiError = EDBF_DATATYPE; } @@ -1894,7 +1899,8 @@ ERRCODE hb_dbfOpen( DBFAREAP pArea, LPDBOPENINFO pOpenInfo ) { pField = ( LPDBFFIELD ) ( pBuffer + uiCount * sizeof( DBFFIELD ) ); pFieldInfo.atomName = pField->bName; - hb_strUpper( ( char * ) pFieldInfo.atomName,11 ); + pFieldInfo.atomName[10] = '\0'; + hb_strUpper( (char*) pFieldInfo.atomName,10 ); pFieldInfo.uiLen = pField->bLen; pFieldInfo.uiDec = 0; switch( pField->bType ) diff --git a/harbour/source/rdd/dbfntx/dbfntx1.c b/harbour/source/rdd/dbfntx/dbfntx1.c index 1cea3537a2..ec1030524a 100644 --- a/harbour/source/rdd/dbfntx/dbfntx1.c +++ b/harbour/source/rdd/dbfntx/dbfntx1.c @@ -3691,6 +3691,8 @@ static ERRCODE ntxOrderCreate( NTXAREAP pArea, LPDBORDERCREATEINFO pOrderInfo ) } pTagNext->pNext = pTag; } + else + pArea->lpNtxTag = pTag; } else pArea->lpNtxTag = pTag;