2004-05-08 10:40 UTC+0100 Ryszard Glab <rglab@imid.med.pl>
* source/rdd/dbf1.c
* source/rdd/dbfcdx/dbfcdx1.c
* source/rdd/dbfdbt/dbfdbt1.c
* source/rdd/dbffpt/dbffpt1.c
* source/rdd/dbfntx/dbfntx1.c
* source/rtl/is.c
* source/rtl/strcase.c
* source/rtl/transfrm.c
* updated to refer hb_cdp_page instead of s_cdpage
* source/vm/itemapi.c
* snprintf is used only in GCC/Linux and WatcomC
guarded with #ifdef HB_HAS_SNPRINTF
(this is ommision from my previous commit)
This commit is contained in:
@@ -8,6 +8,23 @@
|
||||
2002-12-01 23:12 UTC+0100 Foo Bar <foo.bar@foobar.org>
|
||||
*/
|
||||
|
||||
2004-05-08 10:40 UTC+0100 Ryszard Glab <rglab@imid.med.pl>
|
||||
|
||||
* source/rdd/dbf1.c
|
||||
* source/rdd/dbfcdx/dbfcdx1.c
|
||||
* source/rdd/dbfdbt/dbfdbt1.c
|
||||
* source/rdd/dbffpt/dbffpt1.c
|
||||
* source/rdd/dbfntx/dbfntx1.c
|
||||
* source/rtl/is.c
|
||||
* source/rtl/strcase.c
|
||||
* source/rtl/transfrm.c
|
||||
* updated to refer hb_cdp_page instead of s_cdpage
|
||||
|
||||
* source/vm/itemapi.c
|
||||
* snprintf is used only in GCC/Linux and WatcomC
|
||||
guarded with #ifdef HB_HAS_SNPRINTF
|
||||
(this is ommision from my previous commit)
|
||||
|
||||
2004-05-07 19:30 UTC+0100 Ryszard Glab <rglab@imid.med.pl>
|
||||
|
||||
+ config/dos/owatcom.cf
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
#include "error.ch"
|
||||
#include <errno.h>
|
||||
#include "hbapicdp.h"
|
||||
extern PHB_CODEPAGE s_cdpage;
|
||||
extern PHB_CODEPAGE hb_cdp_page;
|
||||
|
||||
#define __PRG_SOURCE__ __FILE__
|
||||
|
||||
@@ -1069,7 +1069,7 @@ static ERRCODE hb_dbfGetValue( DBFAREAP pArea, USHORT uiIndex, PHB_ITEM pItem )
|
||||
case HB_IT_STRING:
|
||||
hb_itemPutCL( pItem, ( char * ) pArea->pRecord + pArea->pFieldOffset[ uiIndex ],
|
||||
pField->uiLen );
|
||||
hb_cdpTranslate( pItem->item.asString.value, pArea->cdPage, s_cdpage );
|
||||
hb_cdpTranslate( pItem->item.asString.value, pArea->cdPage, hb_cdp_page );
|
||||
break;
|
||||
|
||||
case HB_IT_LOGICAL:
|
||||
@@ -1276,7 +1276,7 @@ static ERRCODE hb_dbfPutValue( DBFAREAP pArea, USHORT uiIndex, PHB_ITEM pItem )
|
||||
memcpy( pArea->pRecord + pArea->pFieldOffset[ uiIndex ],
|
||||
hb_itemGetCPtr( pItem ), uiSize );
|
||||
if( HB_IS_STRING( pItem ) )
|
||||
hb_cdpnTranslate( (char *) pArea->pRecord + pArea->pFieldOffset[ uiIndex ], s_cdpage, pArea->cdPage, uiSize );
|
||||
hb_cdpnTranslate( (char *) pArea->pRecord + pArea->pFieldOffset[ uiIndex ], hb_cdp_page, pArea->cdPage, uiSize );
|
||||
memset( pArea->pRecord + pArea->pFieldOffset[ uiIndex ] + uiSize,
|
||||
' ', pField->uiLen - uiSize );
|
||||
}
|
||||
@@ -1770,10 +1770,10 @@ static ERRCODE hb_dbfOpen( DBFAREAP pArea, LPDBOPENINFO pOpenInfo )
|
||||
{
|
||||
pArea->cdPage = hb_cdpFind( (char *) pOpenInfo->cdpId );
|
||||
if( !pArea->cdPage )
|
||||
pArea->cdPage = s_cdpage;
|
||||
pArea->cdPage = hb_cdp_page;
|
||||
}
|
||||
else
|
||||
pArea->cdPage = s_cdpage;
|
||||
pArea->cdPage = hb_cdp_page;
|
||||
pArea->fShared = pOpenInfo->fShared;
|
||||
pArea->fReadonly = pOpenInfo->fReadonly;
|
||||
/* Force exclusive mode
|
||||
|
||||
@@ -82,7 +82,7 @@
|
||||
#ifndef HB_CDP_SUPPORT_OFF
|
||||
/* for nation sorting support */
|
||||
#include "hbapicdp.h"
|
||||
extern PHB_CODEPAGE s_cdpage;
|
||||
extern PHB_CODEPAGE hb_cdp_page;
|
||||
#define hb_cdpcharcmp( c1, c2, cdpage ) \
|
||||
( ( cdpage && cdpage->lSort ) ? \
|
||||
hb_cdpchrcmp( c1, c2, cdpage ) : \
|
||||
@@ -657,7 +657,7 @@ static LPCDXKEY hb_cdxKeyPutItem( LPCDXKEY pKey, PHB_ITEM pItem, ULONG ulRec, LP
|
||||
pKey = hb_cdxKeyPut( pKey, ptr, len, ulRec );
|
||||
#ifndef HB_CDP_SUPPORT_OFF
|
||||
if ( fTrans && pTag->uiType == 'C' )
|
||||
hb_cdpnTranslate( ( char * ) pKey->val, s_cdpage, pTag->pIndex->pArea->cdPage, pKey->len );
|
||||
hb_cdpnTranslate( ( char * ) pKey->val, hb_cdp_page, pTag->pIndex->pArea->cdPage, pKey->len );
|
||||
#endif
|
||||
return pKey;
|
||||
}
|
||||
@@ -709,9 +709,9 @@ static LPCDXKEY hb_cdxKeyEval( LPCDXKEY pKey, LPCDXTAG pTag, BOOL fSetWA )
|
||||
int iCurrArea = 0;
|
||||
CDXAREAP pArea = pTag->pIndex->pArea;
|
||||
#ifndef HB_CDP_SUPPORT_OFF
|
||||
/* TODO: this hack is not thread safe, s_cdpage has to be thread specific */
|
||||
PHB_CODEPAGE cdpTmp = s_cdpage;
|
||||
s_cdpage = pArea->cdPage;
|
||||
/* TODO: this hack is not thread safe, hb_cdp_page has to be thread specific */
|
||||
PHB_CODEPAGE cdpTmp = hb_cdp_page;
|
||||
hb_cdp_page = pArea->cdPage;
|
||||
#endif
|
||||
|
||||
if ( fSetWA && !pTag->nField )
|
||||
@@ -749,7 +749,7 @@ static LPCDXKEY hb_cdxKeyEval( LPCDXKEY pKey, LPCDXTAG pTag, BOOL fSetWA )
|
||||
hb_rddSelectWorkAreaNumber( iCurrArea );
|
||||
|
||||
#ifndef HB_CDP_SUPPORT_OFF
|
||||
s_cdpage = cdpTmp;
|
||||
hb_cdp_page = cdpTmp;
|
||||
#endif
|
||||
|
||||
return pKey;
|
||||
@@ -7876,9 +7876,9 @@ static void hb_cdxTagDoIndex( LPCDXTAG pTag )
|
||||
BOOL bDirectRead, bEnd;
|
||||
PHB_ITEM pForItem, pWhileItem, pEvalItem;
|
||||
#ifndef HB_CDP_SUPPORT_OFF
|
||||
/* TODO: this hack is not thread safe, s_cdpage has to be thread specific */
|
||||
PHB_CODEPAGE cdpTmp = s_cdpage;
|
||||
s_cdpage = pArea->cdPage;
|
||||
/* TODO: this hack is not thread safe, hb_cdp_page has to be thread specific */
|
||||
PHB_CODEPAGE cdpTmp = hb_cdp_page;
|
||||
hb_cdp_page = pArea->cdPage;
|
||||
#endif
|
||||
|
||||
if ( ( pTag->OptFlags & CDX_TYPE_STRUCTURE ) || pTag->Custom )
|
||||
@@ -8058,7 +8058,7 @@ static void hb_cdxTagDoIndex( LPCDXTAG pTag )
|
||||
}
|
||||
pTag->pIndex->pArea->ulRecNo = 0;
|
||||
#ifndef HB_CDP_SUPPORT_OFF
|
||||
s_cdpage = cdpTmp;
|
||||
hb_cdp_page = cdpTmp;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
|
||||
#ifndef HB_CDP_SUPPORT_OFF
|
||||
# include "hbapicdp.h"
|
||||
extern PHB_CODEPAGE s_cdpage;
|
||||
extern PHB_CODEPAGE hb_cdp_page;
|
||||
#endif
|
||||
|
||||
#define __PRG_SOURCE__ __FILE__
|
||||
@@ -346,7 +346,7 @@ static void hb_dbtGetMemo( DBTAREAP pArea, USHORT uiIndex, PHB_ITEM pItem )
|
||||
|
||||
hb_itemPutCPtr( pItem, ( char * ) pBuffer, ulSize );
|
||||
#ifndef HB_CDP_SUPPORT_OFF
|
||||
hb_cdpTranslate( pItem->item.asString.value, pArea->cdPage, s_cdpage );
|
||||
hb_cdpTranslate( pItem->item.asString.value, pArea->cdPage, hb_cdp_page );
|
||||
#endif
|
||||
hb_itemSetCMemo( pItem );
|
||||
}
|
||||
@@ -382,13 +382,13 @@ static void hb_dbtWriteMemo( DBTAREAP pArea, ULONG ulBlock, PHB_ITEM pItem, ULON
|
||||
* ulStoredBlock = ulNewBlock;
|
||||
|
||||
#ifndef HB_CDP_SUPPORT_OFF
|
||||
hb_cdpTranslate( pItem->item.asString.value, s_cdpage, pArea->cdPage );
|
||||
hb_cdpTranslate( pItem->item.asString.value, hb_cdp_page, pArea->cdPage );
|
||||
#endif
|
||||
/* Write memo data and eof mark */
|
||||
hb_fsWriteLarge( pArea->hMemoFile, ( BYTE * ) hb_itemGetCPtr( pItem ), ulLen );
|
||||
hb_fsWrite( pArea->hMemoFile, pBlock, ( DBT_BLOCKSIZE - ( USHORT ) ( ulLen % DBT_BLOCKSIZE ) ) );
|
||||
#ifndef HB_CDP_SUPPORT_OFF
|
||||
hb_cdpTranslate( pItem->item.asString.value, pArea->cdPage, s_cdpage );
|
||||
hb_cdpTranslate( pItem->item.asString.value, pArea->cdPage, hb_cdp_page );
|
||||
#endif
|
||||
|
||||
if( bNewBlock )
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
|
||||
#ifndef HB_CDP_SUPPORT_OFF
|
||||
# include "hbapicdp.h"
|
||||
extern PHB_CODEPAGE s_cdpage;
|
||||
extern PHB_CODEPAGE hb_cdp_page;
|
||||
#endif
|
||||
|
||||
#define __PRG_SOURCE__ __FILE__
|
||||
@@ -967,7 +967,7 @@ static ERRCODE hb_fptReadSixItem( FPTAREAP pArea, BYTE ** pbMemoBuf, BYTE * bBuf
|
||||
{
|
||||
hb_itemPutCL( pItem, ( char *) (*pbMemoBuf), ulLen );
|
||||
#ifndef HB_CDP_SUPPORT_OFF
|
||||
hb_cdpnTranslate( pItem->item.asString.value, pArea->cdPage, s_cdpage, ulLen );
|
||||
hb_cdpnTranslate( pItem->item.asString.value, pArea->cdPage, hb_cdp_page, ulLen );
|
||||
#endif
|
||||
}
|
||||
else
|
||||
@@ -1142,7 +1142,7 @@ static ERRCODE hb_fptReadFlexItem( FPTAREAP pArea, BYTE ** pbMemoBuf, BYTE * bBu
|
||||
hb_itemPutCL( pItem, ( char *) *pbMemoBuf, ulLen );
|
||||
*pbMemoBuf += ulLen;
|
||||
#ifndef HB_CDP_SUPPORT_OFF
|
||||
hb_cdpnTranslate( pItem->item.asString.value, pArea->cdPage, s_cdpage, ulLen );
|
||||
hb_cdpnTranslate( pItem->item.asString.value, pArea->cdPage, hb_cdp_page, ulLen );
|
||||
#endif
|
||||
}
|
||||
else
|
||||
@@ -1275,7 +1275,7 @@ static ERRCODE hb_fptGetMemo( FPTAREAP pArea, USHORT uiIndex, PHB_ITEM pItem )
|
||||
break;
|
||||
case FPTIT_TEXT:
|
||||
#ifndef HB_CDP_SUPPORT_OFF
|
||||
hb_cdpnTranslate( ( char *) pBuffer, pArea->cdPage, s_cdpage, ulSize );
|
||||
hb_cdpnTranslate( ( char *) pBuffer, pArea->cdPage, hb_cdp_page, ulSize );
|
||||
#endif
|
||||
case FPTIT_PICT:
|
||||
pBuffer[ ulSize ] = '\0';
|
||||
@@ -1421,7 +1421,7 @@ static ULONG hb_fptStoreSixItem( FPTAREAP pArea, PHB_ITEM pItem, BYTE ** bBufPtr
|
||||
{
|
||||
memcpy( *bBufPtr, pItem->item.asString.value, ulLen );
|
||||
#ifndef HB_CDP_SUPPORT_OFF
|
||||
hb_cdpnTranslate( ( char *) *bBufPtr, pArea->cdPage, s_cdpage, ulLen );
|
||||
hb_cdpnTranslate( ( char *) *bBufPtr, pArea->cdPage, hb_cdp_page, ulLen );
|
||||
#endif
|
||||
*bBufPtr += ulLen;
|
||||
}
|
||||
@@ -1502,7 +1502,7 @@ static void hb_fptStoreFlexItem( FPTAREAP pArea, PHB_ITEM pItem, BYTE ** bBufPtr
|
||||
*bBufPtr += 2;
|
||||
memcpy( *bBufPtr, pItem->item.asString.value, ulLen );
|
||||
#ifndef HB_CDP_SUPPORT_OFF
|
||||
hb_cdpnTranslate( ( char *) *bBufPtr, pArea->cdPage, s_cdpage, ulLen );
|
||||
hb_cdpnTranslate( ( char *) *bBufPtr, pArea->cdPage, hb_cdp_page, ulLen );
|
||||
#endif
|
||||
*bBufPtr += ulLen;
|
||||
break;
|
||||
@@ -1649,11 +1649,11 @@ static ERRCODE hb_fptPutMemo( FPTAREAP pArea, USHORT uiIndex, PHB_ITEM pItem )
|
||||
ulLen = pItem->item.asString.length;
|
||||
bBufPtr = ( BYTE *) pItem->item.asString.value;
|
||||
#ifndef HB_CDP_SUPPORT_OFF
|
||||
if ( pArea->cdPage != s_cdpage )
|
||||
if ( pArea->cdPage != hb_cdp_page )
|
||||
{
|
||||
bBufAlloc = ( BYTE * ) hb_xgrab( ulLen );
|
||||
memcpy( bBufAlloc, bBufPtr, ulLen );
|
||||
hb_cdpnTranslate( ( char *) bBufAlloc, s_cdpage, pArea->cdPage, ulLen );
|
||||
hb_cdpnTranslate( ( char *) bBufAlloc, hb_cdp_page, pArea->cdPage, ulLen );
|
||||
bBufPtr = bBufAlloc;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -129,7 +129,7 @@
|
||||
#include "hbrddntx.h"
|
||||
#include "hbapicdp.h"
|
||||
|
||||
extern PHB_CODEPAGE s_cdpage;
|
||||
extern PHB_CODEPAGE hb_cdp_page;
|
||||
#define __PRG_SOURCE__ __FILE__
|
||||
extern USHORT hb_rddFieldIndex( AREAP pArea, char * szName );
|
||||
|
||||
@@ -799,10 +799,10 @@ static USHORT hb_ntxPageFindCurrentKey( LPPAGEINFO pPage, ULONG ulRecno )
|
||||
static void hb_ntxGetCurrentKey( LPTAGINFO pTag, LPKEYINFO pKey )
|
||||
{
|
||||
char szBuffer[ NTX_MAX_KEY ];
|
||||
PHB_CODEPAGE cdpTmp = s_cdpage;
|
||||
PHB_CODEPAGE cdpTmp = hb_cdp_page;
|
||||
PHB_ITEM pItem;
|
||||
|
||||
s_cdpage = pTag->Owner->Owner->cdPage;
|
||||
hb_cdp_page = pTag->Owner->Owner->cdPage;
|
||||
if( pTag->nField )
|
||||
{
|
||||
pItem = hb_itemNew( NULL );
|
||||
@@ -847,7 +847,7 @@ static void hb_ntxGetCurrentKey( LPTAGINFO pTag, LPKEYINFO pKey )
|
||||
else if( hb_itemType( pTag->pKeyItem ) != HB_IT_BLOCK )
|
||||
hb_stackPop();
|
||||
pKey->Xtra = pTag->Owner->Owner->ulRecNo;
|
||||
s_cdpage = cdpTmp;
|
||||
hb_cdp_page = cdpTmp;
|
||||
}
|
||||
|
||||
static BOOL hb_ntxTagGoToNextKey( LPTAGINFO pTag, BOOL lContinue )
|
||||
@@ -1955,8 +1955,8 @@ static void hb_ntxKeysSort( LPNTXSORTINFO pSortInfo, LPSORTITEM* pKeyFirst, LPSO
|
||||
}
|
||||
else if( pSortInfo->pKey1 )
|
||||
{
|
||||
result = (s_cdpage->lSort)?
|
||||
hb_cdpcmp( pKeyNew->key, pSortInfo->pKey1->key, (ULONG)KeyLength, s_cdpage, NULL ):memcmp( pKeyNew->key, pSortInfo->pKey1->key, KeyLength );
|
||||
result = (hb_cdp_page->lSort)?
|
||||
hb_cdpcmp( pKeyNew->key, pSortInfo->pKey1->key, (ULONG)KeyLength, hb_cdp_page, NULL ):memcmp( pKeyNew->key, pSortInfo->pKey1->key, KeyLength );
|
||||
if( fDescend && result )
|
||||
result = ( result > 0 )? -1:1;
|
||||
if( result >= 0 )
|
||||
@@ -1980,8 +1980,8 @@ static void hb_ntxKeysSort( LPNTXSORTINFO pSortInfo, LPSORTITEM* pKeyFirst, LPSO
|
||||
pKey = *pKeyFirst;
|
||||
while( pKey )
|
||||
{
|
||||
result = (s_cdpage->lSort)?
|
||||
hb_cdpcmp( pKeyNew->key, pKey->key, (ULONG)KeyLength, s_cdpage, NULL ):memcmp( pKeyNew->key, pKey->key, KeyLength );
|
||||
result = (hb_cdp_page->lSort)?
|
||||
hb_cdpcmp( pKeyNew->key, pKey->key, (ULONG)KeyLength, hb_cdp_page, NULL ):memcmp( pKeyNew->key, pKey->key, KeyLength );
|
||||
if( fDescend && result )
|
||||
result = ( result > 0 )? -1:1;
|
||||
if( result < 0 )
|
||||
@@ -2447,12 +2447,12 @@ static ERRCODE hb_ntxIndexCreate( LPNTXINDEX pIndex )
|
||||
USHORT numRecinBuf = 0, nParts = 0;
|
||||
BYTE * pRecordTmp;
|
||||
BOOL fValidBuffer;
|
||||
PHB_CODEPAGE cdpTmp = s_cdpage;
|
||||
PHB_CODEPAGE cdpTmp = hb_cdp_page;
|
||||
|
||||
ulRecCount = pArea->ulRecCount;
|
||||
pTag = pIndex->CompoundTag;
|
||||
pItem = hb_itemNew( NULL );
|
||||
s_cdpage = pArea->cdPage;
|
||||
hb_cdp_page = pArea->cdPage;
|
||||
|
||||
memset( &sortInfo, 0, sizeof( sortInfo ) );
|
||||
readBuffer = (BYTE*) hb_xgrab( pArea->uiRecordLen * 10 );
|
||||
@@ -2618,7 +2618,7 @@ static ERRCODE hb_ntxIndexCreate( LPNTXINDEX pIndex )
|
||||
/* Building index file with previously sorted keys */
|
||||
hb_ntxBufferSave( pTag, &sortInfo );
|
||||
|
||||
s_cdpage = cdpTmp;
|
||||
hb_cdp_page = cdpTmp;
|
||||
|
||||
if( pszTempName )
|
||||
{ /* Close temporary swap file, delete it and free name buffer */
|
||||
@@ -3072,7 +3072,7 @@ static ERRCODE ntxSeek( NTXAREAP pArea, BOOL bSoftSeek, PHB_ITEM pKey, BOOL bFin
|
||||
}
|
||||
keylen = ( ((USHORT)pKey->item.asString.length)<pTag->KeyLength)? pKey->item.asString.length:pTag->KeyLength;
|
||||
memcpy( pKey2->key, pKey->item.asString.value, keylen );
|
||||
hb_cdpnTranslate( pKey2->key, s_cdpage, pArea->cdPage, keylen );
|
||||
hb_cdpnTranslate( pKey2->key, hb_cdp_page, pArea->cdPage, keylen );
|
||||
break;
|
||||
case HB_IT_INTEGER:
|
||||
case HB_IT_LONG:
|
||||
@@ -4155,7 +4155,7 @@ static ERRCODE ntxSetScope( NTXAREAP pArea, LPDBORDSCOPEINFO sInfo )
|
||||
if( *ppItem == NULL )
|
||||
*ppItem = hb_itemNew( NULL );
|
||||
hb_itemCopy( *ppItem, sInfo->scopeValue );
|
||||
hb_cdpnTranslate( (*ppItem)->item.asString.value, s_cdpage, pArea->cdPage, (*ppItem)->item.asString.length );
|
||||
hb_cdpnTranslate( (*ppItem)->item.asString.value, hb_cdp_page, pArea->cdPage, (*ppItem)->item.asString.length );
|
||||
}
|
||||
break;
|
||||
case HB_IT_INTEGER:
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
#include "hbapi.h"
|
||||
#include "hbapicdp.h"
|
||||
|
||||
extern PHB_CODEPAGE s_cdpage;
|
||||
extern PHB_CODEPAGE hb_cdp_page;
|
||||
|
||||
/* determines if first char of string is letter */
|
||||
|
||||
@@ -67,8 +67,8 @@ HB_FUNC( ISALPHA )
|
||||
{
|
||||
if( isalpha( ( unsigned char ) * szString ) )
|
||||
hb_retl( TRUE );
|
||||
else if( s_cdpage->nChars && szString[0] &&
|
||||
( strchr( s_cdpage->CharsUpper,* szString ) || strchr( s_cdpage->CharsLower,* szString ) ) )
|
||||
else if( hb_cdp_page->nChars && szString[0] &&
|
||||
( strchr( hb_cdp_page->CharsUpper,* szString ) || strchr( hb_cdp_page->CharsLower,* szString ) ) )
|
||||
hb_retl( TRUE );
|
||||
else
|
||||
hb_retl( FALSE );
|
||||
@@ -99,7 +99,7 @@ HB_FUNC( ISUPPER )
|
||||
{
|
||||
if( isupper( ( unsigned char ) * szString ) )
|
||||
hb_retl( TRUE );
|
||||
else if( s_cdpage->nChars && szString[0] && strchr( s_cdpage->CharsUpper,* szString ) )
|
||||
else if( hb_cdp_page->nChars && szString[0] && strchr( hb_cdp_page->CharsUpper,* szString ) )
|
||||
hb_retl( TRUE );
|
||||
else
|
||||
hb_retl( FALSE );
|
||||
@@ -118,7 +118,7 @@ HB_FUNC( ISLOWER )
|
||||
{
|
||||
if( islower( ( unsigned char ) * szString ) )
|
||||
hb_retl( TRUE );
|
||||
else if( s_cdpage->nChars && szString[0] && strchr( s_cdpage->CharsLower,* szString ) )
|
||||
else if( hb_cdp_page->nChars && szString[0] && strchr( hb_cdp_page->CharsLower,* szString ) )
|
||||
hb_retl( TRUE );
|
||||
else
|
||||
hb_retl( FALSE );
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
#include "hbapierr.h"
|
||||
#include "hbapicdp.h"
|
||||
|
||||
extern PHB_CODEPAGE s_cdpage;
|
||||
extern PHB_CODEPAGE hb_cdp_page;
|
||||
|
||||
/* converts szText to lower case. Does not create a new string! */
|
||||
char * hb_strLower( char * szText, ULONG ulLen )
|
||||
@@ -66,9 +66,9 @@ char * hb_strLower( char * szText, ULONG ulLen )
|
||||
|
||||
HB_TRACE(HB_TR_DEBUG, ("hb_strLower(%s, %lu)", szText, ulLen));
|
||||
|
||||
if( s_cdpage->nChars )
|
||||
if( hb_cdp_page->nChars )
|
||||
for( i = 0; i < ulLen; i++ )
|
||||
szText[ i ] = (char) s_cdpage->s_lower[szText[i]&255];
|
||||
szText[ i ] = (char) hb_cdp_page->s_lower[szText[i]&255];
|
||||
else
|
||||
for( i = 0; i < ulLen; i++ )
|
||||
szText[ i ] = tolower( (unsigned char) szText[ i ] );
|
||||
@@ -83,9 +83,9 @@ char * hb_strUpper( char * szText, ULONG ulLen )
|
||||
|
||||
HB_TRACE(HB_TR_DEBUG, ("hb_strUpper(%s, %lu)", szText, ulLen));
|
||||
|
||||
if( s_cdpage->nChars )
|
||||
if( hb_cdp_page->nChars )
|
||||
for( i = 0; i < ulLen; i++ )
|
||||
szText[ i ] = (char) s_cdpage->s_upper[szText[i]&255];
|
||||
szText[ i ] = (char) hb_cdp_page->s_upper[szText[i]&255];
|
||||
else
|
||||
for( i = 0; i < ulLen; i++ )
|
||||
szText[ i ] = toupper( (unsigned char) szText[ i ] );
|
||||
|
||||
@@ -86,8 +86,8 @@
|
||||
#define PF_WIDTH 0x0800 /* @S */
|
||||
#define PF_PARNEGWOS 0x1000 /* @) Similar to PF_PARNEG but without leading spaces */
|
||||
|
||||
extern PHB_CODEPAGE s_cdpage;
|
||||
#define TOUPPER(c) ((s_cdpage->nChars)? (char)s_cdpage->s_upper[c&255] : (char)toupper(c))
|
||||
extern PHB_CODEPAGE hb_cdp_page;
|
||||
#define TOUPPER(c) ((hb_cdp_page->nChars)? (char)hb_cdp_page->s_upper[c&255] : (char)toupper(c))
|
||||
|
||||
HB_FUNC( TRANSFORM )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user