diff --git a/harbour/ChangeLog b/harbour/ChangeLog index fcad4254ff..0d476b7942 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,64 @@ past entries belonging to author(s): Viktor Szakats. */ +2010-02-07 14:18 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) + * src/pp/ppcore.c + * src/vm/itemapi.c + * src/vm/dynlibhb.c + * src/vm/set.c + * src/debug/dbgentry.c + * src/common/expropt1.c + * src/common/hbstr.c + * src/common/expropt2.c + * src/macro/macro.yyc + * src/macro/macro.y + * src/macro/macro.yyh + * src/rtl/scroll.c + * src/rtl/gtdos/gtdos.c + * src/rtl/gtwin/gtwin.c + * src/rtl/gttrm/gttrm.c + * src/rtl/transfrm.c + * src/rtl/dates.c + * src/rtl/filesys.c + * src/rtl/chrasc.c + * src/rtl/cdpapi.c + * src/rtl/hbi18n1.c + * src/rtl/itemseri.c + * src/rtl/hbhex.c + * src/rtl/cdpapihb.c + * src/rdd/dbsql.c + * src/rdd/dbfnsx/dbfnsx1.c + * src/rdd/dbf1.c + * src/rdd/hsx/hsx.c + * src/rdd/hbsix/sxutil.c + * src/rdd/hbsix/sxcompr.c + * src/rdd/hbsix/sxcrypt.c + * src/compiler/compi18n.c + * src/compiler/complex.c + * src/compiler/genc.c + * src/compiler/harbour.yyc + * src/compiler/harbour.y + * src/compiler/harbour.yyh + * include/hbpp.h + * include/hbapicdp.h + * include/hbrddnsx.h + * include/hbexprb.c + * ChangeLog + * contrib/hbct/screen2.c + * contrib/hbct/pos1.c + * contrib/hbct/screen1.c + * contrib/hbct/token1.c + * contrib/hbct/disk.c + * contrib/xhb/xhbmsgs.c + * contrib/hbnf/ftattr.c + * UCHAR -> HB_UCHAR + ; NOTE: In cdp subsystem 'unsigned char' is used instead of HB_UCHAR + in many places, maybe it needs cleanup (I've found + one inconsistency in a function declaration). + ; QUESTION: There is one suspiciously looking usage: + ftattr.c / iColor = ( HB_UCHAR ) *pAttrib++; + Is it ok? + 2010-02-07 13:58 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) * contrib/hbct/ctchksum.c ! Fixed to not strip const from type. diff --git a/harbour/contrib/hbct/disk.c b/harbour/contrib/hbct/disk.c index 756e6ba07c..51bcca08cb 100644 --- a/harbour/contrib/hbct/disk.c +++ b/harbour/contrib/hbct/disk.c @@ -94,7 +94,7 @@ HB_FUNC( DIRNAME ) if( pszDrive ) { - UCHAR uc = ( UCHAR ) *pszDrive; + HB_UCHAR uc = ( HB_UCHAR ) *pszDrive; /* some network drivers (f.e. NETX from Novell NetWare) allow * to create drives after 'Z' letter. */ diff --git a/harbour/contrib/hbct/pos1.c b/harbour/contrib/hbct/pos1.c index 04da187a29..1f84c47607 100644 --- a/harbour/contrib/hbct/pos1.c +++ b/harbour/contrib/hbct/pos1.c @@ -125,11 +125,11 @@ static void do_pos1( int iSwitch ) switch ( iSwitch ) { case DO_POS1_POSALPHA: - iDoRet = hb_charIsAlpha( ( UCHAR ) *puc ); + iDoRet = hb_charIsAlpha( ( HB_UCHAR ) *puc ); break; case DO_POS1_POSLOWER: - iDoRet = hb_charIsLower( ( UCHAR ) *puc ); + iDoRet = hb_charIsLower( ( HB_UCHAR ) *puc ); break; case DO_POS1_POSRANGE: @@ -137,7 +137,7 @@ static void do_pos1( int iSwitch ) break; case DO_POS1_POSUPPER: - iDoRet = hb_charIsUpper( ( UCHAR ) *puc ); + iDoRet = hb_charIsUpper( ( HB_UCHAR ) *puc ); break; } diff --git a/harbour/contrib/hbct/screen1.c b/harbour/contrib/hbct/screen1.c index 263c82575e..029b6fb723 100644 --- a/harbour/contrib/hbct/screen1.c +++ b/harbour/contrib/hbct/screen1.c @@ -176,7 +176,7 @@ HB_FUNC( SCREENMIX ) i = iCol; do { - if( hb_gtPutChar( iRow, i++, ( UCHAR ) szAttr[ ul ], 0, ( UCHAR ) *szText++ ) != HB_SUCCESS ) + if( hb_gtPutChar( iRow, i++, ( HB_UCHAR ) szAttr[ ul ], 0, ( HB_UCHAR ) *szText++ ) != HB_SUCCESS ) { if( ++iRow > hb_gtMaxRow() ) break; @@ -260,7 +260,7 @@ HB_FUNC( SAYSCREEN ) i = iCol; } else - hb_gtPutChar( iRow, i++, iColor, bAttr, ( UCHAR ) *szText++ ); + hb_gtPutChar( iRow, i++, iColor, bAttr, ( HB_UCHAR ) *szText++ ); } while( --ulLen ); hb_gtEndWrite(); @@ -310,7 +310,7 @@ static int hb_ctGetClearChar( int iParam ) if( HB_ISNUM( iParam ) ) iChar = hb_parni( iParam ); else if( HB_ISCHAR( iParam ) ) - iChar = ( UCHAR ) hb_parc( iParam )[0]; + iChar = ( HB_UCHAR ) hb_parc( iParam )[0]; else iChar = ( int ) hb_gtGetClearChar(); @@ -472,14 +472,14 @@ HB_FUNC( UNTEXTWIN ) if( HB_ISNUM( 6 ) ) usInit = ( USHORT ) hb_parni( 6 ); else if( hb_parclen( 6 ) > 0 ) - usInit = ( UCHAR ) hb_parc( 6 )[0]; + usInit = ( HB_UCHAR ) hb_parc( 6 )[0]; else usInit = 176; if( HB_ISNUM( 7 ) ) usEnd = ( USHORT ) hb_parni( 7 ); else if( hb_parclen( 7 ) > 0 ) - usEnd = ( UCHAR ) hb_parc( 7 )[0]; + usEnd = ( HB_UCHAR ) hb_parc( 7 )[0]; else usEnd = 223; @@ -559,7 +559,7 @@ HB_FUNC( CHARWIN ) if( HB_ISNUM( 6 ) ) usOldChar = ( USHORT ) hb_parni( 6 ); else if( hb_parclen( 6 ) > 0 ) - usOldChar = ( UCHAR ) hb_parc( 6 )[0]; + usOldChar = ( HB_UCHAR ) hb_parc( 6 )[0]; else fAll = HB_TRUE; diff --git a/harbour/contrib/hbct/screen2.c b/harbour/contrib/hbct/screen2.c index 0a015faabf..e4aeb339ba 100644 --- a/harbour/contrib/hbct/screen2.c +++ b/harbour/contrib/hbct/screen2.c @@ -86,7 +86,7 @@ HB_FUNC( SAYDOWN ) hb_gtBeginWrite(); while( ulLen-- ) { - hb_gtPutChar( iRow++, iCol, iColor, 0, ( UCHAR ) *szText++ ); + hb_gtPutChar( iRow++, iCol, iColor, 0, ( HB_UCHAR ) *szText++ ); if( lDelay ) { hb_gtEndWrite(); @@ -139,7 +139,7 @@ HB_FUNC( SAYSPREAD ) do { for( ul = 0; ul < ulLen && iCol + ( int ) ul <= iMaxCol; ++ul ) - hb_gtPutChar( iRow, iCol + ( int ) ul, iColor, 0, ( UCHAR ) szText[ulPos + ul] ); + hb_gtPutChar( iRow, iCol + ( int ) ul, iColor, 0, ( HB_UCHAR ) szText[ulPos + ul] ); ulLen += 2; if( lDelay ) { @@ -198,14 +198,14 @@ HB_FUNC( SAYMOVEIN ) if( iCol <= iMaxCol ) { for( ul = 0; ul < ulChars; ++ul ) - hb_gtPutChar( iRow, iCol + ( int ) ul, iColor, 0, ( UCHAR ) szText[ul] ); + hb_gtPutChar( iRow, iCol + ( int ) ul, iColor, 0, ( HB_UCHAR ) szText[ul] ); } --iCol; } else { for( ul = 0; ul < ulChars; ++ul ) - hb_gtPutChar( iRow, iCol + ( int ) ul, iColor, 0, ( UCHAR ) szText[ul] ); + hb_gtPutChar( iRow, iCol + ( int ) ul, iColor, 0, ( HB_UCHAR ) szText[ul] ); --szText; } if( ( int ) ulChars + iCol <= iMaxCol ) @@ -232,7 +232,7 @@ HB_FUNC( CLEARSLOW ) int iMaxRow = hb_gtMaxRow(); int iMaxCol = hb_gtMaxCol(); int iTop, iLeft, iBottom, iRight; - UCHAR ucChar; + HB_UCHAR ucChar; long lDelay; lDelay = hb_parnl( 1 ); @@ -243,11 +243,11 @@ HB_FUNC( CLEARSLOW ) iRight = HB_ISNUM( 5 ) ? hb_parni( 5 ) : iMaxCol; if( HB_ISNUM( 6 ) ) - ucChar = ( UCHAR ) hb_parni( 6 ); + ucChar = ( HB_UCHAR ) hb_parni( 6 ); else if( HB_ISCHAR( 6 ) ) - ucChar = ( UCHAR ) hb_parc( 6 )[0]; + ucChar = ( HB_UCHAR ) hb_parc( 6 )[0]; else - ucChar = ( UCHAR ) hb_gtGetClearChar(); + ucChar = ( HB_UCHAR ) hb_gtGetClearChar(); if( iTop >= 0 && iLeft >= 0 && iTop <= iBottom && iLeft <= iRight ) { @@ -386,8 +386,8 @@ HB_FUNC( STRSCREEN ) iC = iCol; do { - USHORT usChar = ( UCHAR ) *szText++; - int iColor = ( UCHAR ) *szText++; + USHORT usChar = ( HB_UCHAR ) *szText++; + int iColor = ( HB_UCHAR ) *szText++; hb_gtPutChar( iRow, iC, iColor, 0, usChar ); ulLen -= 2; } diff --git a/harbour/contrib/hbct/token1.c b/harbour/contrib/hbct/token1.c index 80e7372b7a..d17858558d 100644 --- a/harbour/contrib/hbct/token1.c +++ b/harbour/contrib/hbct/token1.c @@ -253,13 +253,13 @@ static void do_token1( int iSwitch ) case DO_TOKEN1_TOKENLOWER: if( pcSubStr != pc ) /* letters can be tokenizers, too, but they should not be lowercase'd */ - *( pcRet + ( pcSubStr - pcString ) ) = ( char ) hb_charLower( ( UCHAR ) *pcSubStr ); + *( pcRet + ( pcSubStr - pcString ) ) = ( char ) hb_charLower( ( HB_UCHAR ) *pcSubStr ); break; case DO_TOKEN1_TOKENUPPER: if( pcSubStr != pc ) /* letters can be tokenizers, too, but they should not be uppercase'd */ - *( pcRet + ( pcSubStr - pcString ) ) = ( char ) hb_charUpper( ( UCHAR ) *pcSubStr ); + *( pcRet + ( pcSubStr - pcString ) ) = ( char ) hb_charUpper( ( HB_UCHAR ) *pcSubStr ); break; default: diff --git a/harbour/contrib/hbnf/ftattr.c b/harbour/contrib/hbnf/ftattr.c index 88e1d459f3..82e428ec74 100644 --- a/harbour/contrib/hbnf/ftattr.c +++ b/harbour/contrib/hbnf/ftattr.c @@ -419,7 +419,7 @@ HB_FUNC( FT_RESTATT ) BYTE bAttr; USHORT usChar; hb_gtGetChar( iTop, iCol, &iColor, &bAttr, &usChar ); - iColor = ( UCHAR ) *pAttrib++; + iColor = ( HB_UCHAR ) *pAttrib++; hb_gtPutChar( iTop, iCol, iColor, bAttr, usChar ); ++iCol; --ulLen; diff --git a/harbour/contrib/xhb/xhbmsgs.c b/harbour/contrib/xhb/xhbmsgs.c index 8c9691ad1c..44203529b9 100644 --- a/harbour/contrib/xhb/xhbmsgs.c +++ b/harbour/contrib/xhb/xhbmsgs.c @@ -89,7 +89,7 @@ HB_FUNC( XHB_HASHERROR ) } } - if( szMessage[0] == '_' ) + if( szMessage[ 0 ] == '_' ) hb_errRT_BASE_SubstR( EG_NOVARMETHOD, 1005, NULL, szMessage + 1, HB_ERR_ARGS_SELFPARAMS ); else hb_errRT_BASE_SubstR( EG_NOMETHOD, 1004, NULL, szMessage, HB_ERR_ARGS_SELFPARAMS ); @@ -123,13 +123,13 @@ HB_FUNC( XHB_EEQUAL ) if( HB_IS_NUMERIC( pSelf ) && hb_itemGetCLen( pValue ) == 1 ) { - UCHAR uc = ( UCHAR ) hb_itemGetCPtr( pValue )[0]; + HB_UCHAR uc = ( HB_UCHAR ) hb_itemGetCPtr( pValue )[ 0 ]; double dValue = hb_itemGetND( pSelf ); hb_retl( dValue == ( double ) uc ); } else if( hb_itemGetCLen( pSelf ) == 1 && pValue && HB_IS_NUMERIC( pValue ) ) { - UCHAR uc = ( UCHAR ) hb_itemGetCPtr( pSelf )[0]; + HB_UCHAR uc = ( HB_UCHAR ) hb_itemGetCPtr( pSelf )[ 0 ]; double dValue = hb_itemGetND( pValue ); hb_retl( ( double ) uc == dValue ); } @@ -148,13 +148,13 @@ HB_FUNC( XHB_EQUAL ) if( HB_IS_NUMERIC( pSelf ) && hb_itemGetCLen( pValue ) == 1 ) { - UCHAR uc = ( UCHAR ) hb_itemGetCPtr( pValue )[0]; + HB_UCHAR uc = ( HB_UCHAR ) hb_itemGetCPtr( pValue )[ 0 ]; double dValue = hb_itemGetND( pSelf ); hb_retl( dValue == ( double ) uc ); } else if( hb_itemGetCLen( pSelf ) == 1 && pValue && HB_IS_NUMERIC( pValue ) ) { - UCHAR uc = ( UCHAR ) hb_itemGetCPtr( pSelf )[0]; + HB_UCHAR uc = ( HB_UCHAR ) hb_itemGetCPtr( pSelf )[ 0 ]; double dValue = hb_itemGetND( pValue ); hb_retl( ( double ) uc == dValue ); } @@ -173,13 +173,13 @@ HB_FUNC( XHB_NOTEQUAL ) if( HB_IS_NUMERIC( pSelf ) && hb_itemGetCLen( pValue ) == 1 ) { - UCHAR uc = ( UCHAR ) hb_itemGetCPtr( pValue )[0]; + HB_UCHAR uc = ( HB_UCHAR ) hb_itemGetCPtr( pValue )[ 0 ]; double dValue = hb_itemGetND( pSelf ); hb_retl( dValue != ( double ) uc ); } else if( hb_itemGetCLen( pSelf ) == 1 && pValue && HB_IS_NUMERIC( pValue ) ) { - UCHAR uc = ( UCHAR ) hb_itemGetCPtr( pSelf )[0]; + HB_UCHAR uc = ( HB_UCHAR ) hb_itemGetCPtr( pSelf )[ 0 ]; double dValue = hb_itemGetND( pValue ); hb_retl( ( double ) uc != dValue ); } @@ -198,13 +198,13 @@ HB_FUNC( XHB_LESS ) if( HB_IS_NUMERIC( pSelf ) && hb_itemGetCLen( pValue ) == 1 ) { - UCHAR uc = ( UCHAR ) hb_itemGetCPtr( pValue )[0]; + HB_UCHAR uc = ( HB_UCHAR ) hb_itemGetCPtr( pValue )[ 0 ]; double dValue = hb_itemGetND( pSelf ); hb_retl( dValue < ( double ) uc ); } else if( hb_itemGetCLen( pSelf ) == 1 && pValue && HB_IS_NUMERIC( pValue ) ) { - UCHAR uc = ( UCHAR ) hb_itemGetCPtr( pSelf )[0]; + HB_UCHAR uc = ( HB_UCHAR ) hb_itemGetCPtr( pSelf )[ 0 ]; double dValue = hb_itemGetND( pValue ); hb_retl( ( double ) uc < dValue ); } @@ -223,13 +223,13 @@ HB_FUNC( XHB_LESSEQ ) if( HB_IS_NUMERIC( pSelf ) && hb_itemGetCLen( pValue ) == 1 ) { - UCHAR uc = ( UCHAR ) hb_itemGetCPtr( pValue )[0]; + HB_UCHAR uc = ( HB_UCHAR ) hb_itemGetCPtr( pValue )[ 0 ]; double dValue = hb_itemGetND( pSelf ); hb_retl( dValue <= ( double ) uc ); } else if( hb_itemGetCLen( pSelf ) == 1 && pValue && HB_IS_NUMERIC( pValue ) ) { - UCHAR uc = ( UCHAR ) hb_itemGetCPtr( pSelf )[0]; + HB_UCHAR uc = ( HB_UCHAR ) hb_itemGetCPtr( pSelf )[ 0 ]; double dValue = hb_itemGetND( pValue ); hb_retl( ( double ) uc <= dValue ); } @@ -248,13 +248,13 @@ HB_FUNC( XHB_GREATER ) if( HB_IS_NUMERIC( pSelf ) && hb_itemGetCLen( pValue ) == 1 ) { - UCHAR uc = ( UCHAR ) hb_itemGetCPtr( pValue )[0]; + HB_UCHAR uc = ( HB_UCHAR ) hb_itemGetCPtr( pValue )[ 0 ]; double dValue = hb_itemGetND( pSelf ); hb_retl( dValue > ( double ) uc ); } else if( hb_itemGetCLen( pSelf ) == 1 && pValue && HB_IS_NUMERIC( pValue ) ) { - UCHAR uc = ( UCHAR ) hb_itemGetCPtr( pSelf )[0]; + HB_UCHAR uc = ( HB_UCHAR ) hb_itemGetCPtr( pSelf )[ 0 ]; double dValue = hb_itemGetND( pValue ); hb_retl( ( double ) uc > dValue ); } @@ -273,13 +273,13 @@ HB_FUNC( XHB_GREATEREQ ) if( HB_IS_NUMERIC( pSelf ) && hb_itemGetCLen( pValue ) == 1 ) { - UCHAR uc = ( UCHAR ) hb_itemGetCPtr( pValue )[0]; + HB_UCHAR uc = ( HB_UCHAR ) hb_itemGetCPtr( pValue )[ 0 ]; double dValue = hb_itemGetND( pSelf ); hb_retl( dValue >= ( double ) uc ); } else if( hb_itemGetCLen( pSelf ) == 1 && pValue && HB_IS_NUMERIC( pValue ) ) { - UCHAR uc = ( UCHAR ) hb_itemGetCPtr( pSelf )[0]; + HB_UCHAR uc = ( HB_UCHAR ) hb_itemGetCPtr( pSelf )[ 0 ]; double dValue = hb_itemGetND( pValue ); hb_retl( ( double ) uc >= dValue ); } @@ -325,7 +325,7 @@ HB_FUNC( XHB_INDEX ) HB_SIZE ulLen = hb_itemGetCLen( pSelf ); if( HB_IS_VALID_INDEX( ulIndex, ulLen ) ) { - char cValue = HB_IS_STRING( pValue ) ? hb_itemGetCPtr( pValue )[0] : + char cValue = HB_IS_STRING( pValue ) ? hb_itemGetCPtr( pValue )[ 0 ] : ( char ) hb_itemGetNI( pValue ); if( ulLen == 1 ) hb_itemPutCL( pSelf, &cValue, 1 ); @@ -389,7 +389,7 @@ HB_FUNC( XHB_PLUS ) if( HB_IS_NUMERIC( pSelf ) && hb_itemGetCLen( pValue ) == 1 ) { - UCHAR uc = ( UCHAR ) hb_itemGetCPtr( pValue )[0]; + HB_UCHAR uc = ( HB_UCHAR ) hb_itemGetCPtr( pValue )[ 0 ]; int iDec; double dValue = hb_itemGetNDDec( pSelf, &iDec ); hb_retnlen( dValue + uc, 0, iDec ); @@ -397,8 +397,8 @@ HB_FUNC( XHB_PLUS ) else if( HB_IS_STRING( pSelf ) && hb_itemGetCLen( pSelf ) == 1 && pValue && HB_IS_NUMERIC( pValue ) ) { - UCHAR uc = ( UCHAR ) hb_itemGetCPtr( pSelf )[0]; - uc += ( UCHAR ) hb_itemGetNI( pValue ); + HB_UCHAR uc = ( HB_UCHAR ) hb_itemGetCPtr( pSelf )[ 0 ]; + uc += ( HB_UCHAR ) hb_itemGetNI( pValue ); hb_retclen( ( char * ) &uc, 1 ); } else if( HB_IS_HASH( pSelf ) && HB_IS_HASH( pValue ) ) @@ -422,7 +422,7 @@ HB_FUNC( XHB_MINUS ) if( HB_IS_NUMERIC( pSelf ) && hb_itemGetCLen( pValue ) == 1 ) { - UCHAR uc = ( UCHAR ) hb_itemGetCPtr( pValue )[0]; + HB_UCHAR uc = ( HB_UCHAR ) hb_itemGetCPtr( pValue )[ 0 ]; int iDec; double dValue = hb_itemGetNDDec( pSelf, &iDec ); hb_retnlen( dValue - uc, 0, iDec ); @@ -430,8 +430,8 @@ HB_FUNC( XHB_MINUS ) else if( HB_IS_STRING( pSelf ) && hb_itemGetCLen( pSelf ) == 1 && pValue && HB_IS_NUMERIC( pValue ) ) { - UCHAR uc = ( UCHAR ) hb_itemGetCPtr( pSelf )[0]; - uc -= ( UCHAR ) hb_itemGetNI( pValue ); + HB_UCHAR uc = ( HB_UCHAR ) hb_itemGetCPtr( pSelf )[ 0 ]; + uc -= ( HB_UCHAR ) hb_itemGetNI( pValue ); hb_retclen( ( char * ) &uc, 1 ); } else if( HB_IS_HASH( pSelf ) && HB_IS_HASH( pValue ) ) @@ -456,7 +456,7 @@ HB_FUNC( XHB_INC ) hb_retnd( hb_itemGetND( pSelf ) + 1 ); else if( HB_IS_STRING( pSelf ) && hb_itemGetCLen( pSelf ) == 1 ) { - UCHAR uc = ( UCHAR ) hb_itemGetCPtr( pSelf )[0] + 1; + HB_UCHAR uc = ( HB_UCHAR ) hb_itemGetCPtr( pSelf )[ 0 ] + 1; hb_retclen( ( char * ) &uc, 1 ); } else @@ -475,7 +475,7 @@ HB_FUNC( XHB_DEC ) hb_retnd( hb_itemGetND( pSelf ) - 1 ); else if( HB_IS_STRING( pSelf ) && hb_itemGetCLen( pSelf ) == 1 ) { - UCHAR uc = ( UCHAR ) hb_itemGetCPtr( pSelf )[0] - 1; + HB_UCHAR uc = ( HB_UCHAR ) hb_itemGetCPtr( pSelf )[ 0 ] - 1; hb_retclen( ( char * ) &uc, 1 ); } else @@ -493,7 +493,7 @@ HB_FUNC( XHB_MULT ) if( HB_IS_NUMERIC( pSelf ) && hb_itemGetCLen( pValue ) == 1 ) { - UCHAR uc = ( UCHAR ) hb_itemGetCPtr( pValue )[0]; + HB_UCHAR uc = ( HB_UCHAR ) hb_itemGetCPtr( pValue )[ 0 ]; int iDec; double dValue = hb_itemGetNDDec( pSelf, &iDec ); hb_retndlen( dValue * uc, 0, iDec ); @@ -501,7 +501,7 @@ HB_FUNC( XHB_MULT ) else if( HB_IS_STRING( pSelf ) && hb_itemGetCLen( pSelf ) == 1 && pValue && HB_IS_NUMERIC( pValue ) ) { - UCHAR uc = ( UCHAR ) hb_itemGetCPtr( pSelf )[0]; + HB_UCHAR uc = ( HB_UCHAR ) hb_itemGetCPtr( pSelf )[ 0 ]; int iDec; double dValue = hb_itemGetNDDec( pValue, &iDec ); hb_retndlen( ( double ) uc * dValue, 0, iDec ); @@ -509,8 +509,8 @@ HB_FUNC( XHB_MULT ) else if( HB_IS_STRING( pSelf ) && hb_itemGetCLen( pSelf ) == 1 && hb_itemGetCLen( pValue ) == 1 ) { - UCHAR uc1 = ( UCHAR ) hb_itemGetCPtr( pSelf )[0], - uc2 = ( UCHAR ) hb_itemGetCPtr( pValue )[0]; + HB_UCHAR uc1 = ( HB_UCHAR ) hb_itemGetCPtr( pSelf )[ 0 ], + uc2 = ( HB_UCHAR ) hb_itemGetCPtr( pValue )[ 0 ]; hb_retnint( uc1 * uc2 ); } else @@ -528,7 +528,7 @@ HB_FUNC( XHB_DIV ) if( HB_IS_NUMERIC( pSelf ) && hb_itemGetCLen( pValue ) == 1 ) { - UCHAR uc = ( UCHAR ) hb_itemGetCPtr( pValue )[0]; + HB_UCHAR uc = ( HB_UCHAR ) hb_itemGetCPtr( pValue )[ 0 ]; if( uc == 0 ) { PHB_ITEM pResult = hb_errRT_BASE_Subst( EG_ZERODIV, 1340, NULL, "/", 2, pSelf, pValue ); @@ -541,9 +541,9 @@ HB_FUNC( XHB_DIV ) else if( HB_IS_STRING( pSelf ) && hb_itemGetCLen( pSelf ) == 1 && pValue && ( HB_IS_NUMERIC( pValue ) || hb_itemGetCLen( pValue ) == 1 ) ) { - UCHAR uc = ( UCHAR ) hb_itemGetCPtr( pSelf )[0]; + HB_UCHAR uc = ( HB_UCHAR ) hb_itemGetCPtr( pSelf )[ 0 ]; double dDivisor = HB_IS_NUMERIC( pValue ) ? hb_itemGetND( pValue ) : - ( double ) ( ( UCHAR ) hb_itemGetCPtr( pValue )[0] ); + ( double ) ( ( HB_UCHAR ) hb_itemGetCPtr( pValue )[ 0 ] ); if( dDivisor == 0 ) { @@ -569,7 +569,7 @@ HB_FUNC( XHB_MOD ) if( HB_IS_NUMERIC( pSelf ) && hb_itemGetCLen( pValue ) == 1 ) { - UCHAR uc = ( UCHAR ) hb_itemGetCPtr( pValue )[0]; + HB_UCHAR uc = ( HB_UCHAR ) hb_itemGetCPtr( pValue )[ 0 ]; if( uc == 0 ) { PHB_ITEM pResult = hb_errRT_BASE_Subst( EG_ZERODIV, 1341, NULL, "%", 2, pSelf, pValue ); @@ -582,9 +582,9 @@ HB_FUNC( XHB_MOD ) else if( HB_IS_STRING( pSelf ) && hb_itemGetCLen( pSelf ) == 1 && pValue && ( HB_IS_NUMERIC( pValue ) || hb_itemGetCLen( pValue ) == 1 ) ) { - UCHAR uc = ( UCHAR ) hb_itemGetCPtr( pSelf )[0]; + HB_UCHAR uc = ( HB_UCHAR ) hb_itemGetCPtr( pSelf )[ 0 ]; double dDivisor = HB_IS_NUMERIC( pValue ) ? hb_itemGetND( pValue ) : - ( double ) ( ( UCHAR ) hb_itemGetCPtr( pValue )[0] ); + ( double ) ( ( HB_UCHAR ) hb_itemGetCPtr( pValue )[ 0 ] ); if( dDivisor == 0 ) { @@ -610,20 +610,20 @@ HB_FUNC( XHB_POW ) if( HB_IS_NUMERIC( pSelf ) && hb_itemGetCLen( pValue ) == 1 ) { - UCHAR uc = ( UCHAR ) hb_itemGetCPtr( pValue )[0]; + HB_UCHAR uc = ( HB_UCHAR ) hb_itemGetCPtr( pValue )[ 0 ]; hb_retnd( pow( hb_itemGetND( pSelf ), ( double ) uc ) ); } else if( HB_IS_STRING( pSelf ) && hb_itemGetCLen( pSelf ) == 1 && pValue && HB_IS_NUMERIC( pValue ) ) { - UCHAR uc = ( UCHAR ) hb_itemGetCPtr( pSelf )[0]; + HB_UCHAR uc = ( HB_UCHAR ) hb_itemGetCPtr( pSelf )[ 0 ]; hb_retnd( pow( ( double ) uc, hb_itemGetND( pValue ) ) ); } else if( HB_IS_STRING( pSelf ) && hb_itemGetCLen( pSelf ) == 1 && hb_itemGetCLen( pValue ) == 1 ) { - UCHAR uc1 = ( UCHAR ) hb_itemGetCPtr( pSelf )[0], - uc2 = ( UCHAR ) hb_itemGetCPtr( pValue )[0]; + HB_UCHAR uc1 = ( HB_UCHAR ) hb_itemGetCPtr( pSelf )[ 0 ], + uc2 = ( HB_UCHAR ) hb_itemGetCPtr( pValue )[ 0 ]; hb_retnd( pow( ( double ) uc1, ( double ) uc2 ) ); } else diff --git a/harbour/include/hbapicdp.h b/harbour/include/hbapicdp.h index f5e1844b7b..7d68847a28 100644 --- a/harbour/include/hbapicdp.h +++ b/harbour/include/hbapicdp.h @@ -362,7 +362,7 @@ extern HB_EXPORT HB_SIZE hb_cdpTransLen( const char * pSrc, HB_SIZE ulSrc, extern HB_EXPORT HB_SIZE hb_cdpTransTo( const char * pSrc, HB_SIZE ulSrc, char * pDst, HB_SIZE ulDst, PHB_CODEPAGE cdpIn, PHB_CODEPAGE cdpOut ); extern HB_EXPORT HB_WCHAR hb_cdpGetU16( PHB_CODEPAGE cdp, HB_BOOL fCtrl, unsigned char ch ); -extern HB_EXPORT UCHAR hb_cdpGetChar( PHB_CODEPAGE cdp, HB_BOOL fCtrl, HB_WCHAR wc ); +extern HB_EXPORT HB_UCHAR hb_cdpGetChar( PHB_CODEPAGE cdp, HB_BOOL fCtrl, HB_WCHAR wc ); extern HB_EXPORT HB_BOOL hb_cdpGetFromUTF8( PHB_CODEPAGE cdp, HB_BOOL fCtrl, unsigned char ch, int * n, HB_WCHAR * pwc ); extern HB_EXPORT HB_SIZE hb_cdpUTF8StringLength( const char * pSrc, HB_SIZE ulLen ); diff --git a/harbour/include/hbexprb.c b/harbour/include/hbexprb.c index 401086743a..5af860cd41 100644 --- a/harbour/include/hbexprb.c +++ b/harbour/include/hbexprb.c @@ -1356,7 +1356,7 @@ static HB_EXPR_FUNC( hb_compExprUseArrayAt ) { if( HB_IS_VALID_INDEX( lIndex, pExpr->ulLength ) ) { - UCHAR ucValue = ( UCHAR ) pExpr->value.asString.string[ lIndex - 1 ]; + HB_UCHAR ucValue = ( HB_UCHAR ) pExpr->value.asString.string[ lIndex - 1 ]; HB_COMP_EXPR_DELETE( pSelf ); pSelf = hb_compExprNewLong( ucValue, HB_COMP_PARAM ); diff --git a/harbour/include/hbpp.h b/harbour/include/hbpp.h index 933da0f2b4..0d60c9341e 100644 --- a/harbour/include/hbpp.h +++ b/harbour/include/hbpp.h @@ -410,7 +410,7 @@ HB_PP_TOKEN, * PHB_PP_TOKEN; /* Clipper allows only 16 nested includes */ #define HB_PP_MAX_INCLUDED_FILES 64 -#define HB_PP_HASHID(t) ( ( UCHAR ) HB_PP_UPPER( (t)->value[0] ) ) +#define HB_PP_HASHID(t) ( ( HB_UCHAR ) HB_PP_UPPER( (t)->value[0] ) ) #define HB_PP_HASHID_MAX 256 #define HB_PP_DEFINE 1 #define HB_PP_TRANSLATE 2 diff --git a/harbour/include/hbrddnsx.h b/harbour/include/hbrddnsx.h index e5d7636a7c..f1397f44e0 100644 --- a/harbour/include/hbrddnsx.h +++ b/harbour/include/hbrddnsx.h @@ -261,56 +261,56 @@ sx_thermometer() => if ( NSX_TAG_NOUPDATE | NSX_TAG_TEMPLATE ) -> 4 typedef struct _NSXTAGITEM { - UCHAR TagName[NSX_TAGNAME + 1]; /* name of tag in ASCIIZ */ - UCHAR TagOffset[4]; /* Tag header offset */ + HB_UCHAR TagName[NSX_TAGNAME + 1]; /* name of tag in ASCIIZ */ + HB_UCHAR TagOffset[4]; /* Tag header offset */ } NSXTAGITEM; typedef NSXTAGITEM * LPNSXTAGITEM; typedef struct _NSXROOTHEADER { - UCHAR Signature[1]; /* "i" = 0x69 */ - UCHAR IndexFlags[1]; /* 0x00 */ - UCHAR TagCount[2]; /* number of tags in index file */ - UCHAR Version[2]; /* cyclic counter for concurrent access */ - UCHAR FreePage[4]; /* offset of first free page in index file */ - UCHAR FileSize[4]; /* the index file length */ + HB_UCHAR Signature[1]; /* "i" = 0x69 */ + HB_UCHAR IndexFlags[1]; /* 0x00 */ + HB_UCHAR TagCount[2]; /* number of tags in index file */ + HB_UCHAR Version[2]; /* cyclic counter for concurrent access */ + HB_UCHAR FreePage[4]; /* offset of first free page in index file */ + HB_UCHAR FileSize[4]; /* the index file length */ NSXTAGITEM TagList[NSX_MAXTAGS]; - UCHAR Unused[NSX_PAGELEN - 14 - NSX_MAXTAGS * sizeof( NSXTAGITEM )]; + HB_UCHAR Unused[NSX_PAGELEN - 14 - NSX_MAXTAGS * sizeof( NSXTAGITEM )]; } NSXROOTHEADER; typedef NSXROOTHEADER * LPNSXROOTHEADER; typedef struct _NSXTAGHEADER { - UCHAR Signature[1]; /* "i" = 0x69 */ - UCHAR TagFlags[1]; /* update flags: NSX_TAG_* */ - UCHAR RootPage[4]; /* offset of tag root page */ - UCHAR KeyType[2]; /* index key type: NSX_TYPE_* */ - UCHAR KeySize[2]; /* index key size */ - UCHAR Unique[2]; /* 0x0001 for UNIQUE indexes */ - UCHAR Descend[2]; /* 0x0001 for descond indexes */ - UCHAR KeyExpr[NSX_MAXEXPLEN]; /* index KEY expression ASCIIZ */ - UCHAR ForExpr[NSX_MAXEXPLEN]; /* index FOR expression ASCIIZ */ - UCHAR Unused[NSX_PAGELEN - 14 - NSX_MAXEXPLEN - NSX_MAXEXPLEN]; + HB_UCHAR Signature[1]; /* "i" = 0x69 */ + HB_UCHAR TagFlags[1]; /* update flags: NSX_TAG_* */ + HB_UCHAR RootPage[4]; /* offset of tag root page */ + HB_UCHAR KeyType[2]; /* index key type: NSX_TYPE_* */ + HB_UCHAR KeySize[2]; /* index key size */ + HB_UCHAR Unique[2]; /* 0x0001 for UNIQUE indexes */ + HB_UCHAR Descend[2]; /* 0x0001 for descond indexes */ + HB_UCHAR KeyExpr[NSX_MAXEXPLEN]; /* index KEY expression ASCIIZ */ + HB_UCHAR ForExpr[NSX_MAXEXPLEN]; /* index FOR expression ASCIIZ */ + HB_UCHAR Unused[NSX_PAGELEN - 14 - NSX_MAXEXPLEN - NSX_MAXEXPLEN]; } NSXTAGHEADER; typedef NSXTAGHEADER * LPNSXTAGHEADER; typedef struct _NSXBRANCHPAGE { - UCHAR NodeID[1]; /* NSX_BRANCHPAGE | ( lRoot ? NSX_ROOTPAGE : 0 ) */ - UCHAR RecNoLen[1]; /* number of bytes for recno in branch keys - seems to be unused */ - UCHAR KeyCount[2]; /* number of key in page */ - UCHAR LowerPage[4]; /* offset to the page with lower keys */ - UCHAR KeyData[NSX_PAGELEN - 8]; /* with branch keys */ + HB_UCHAR NodeID[1]; /* NSX_BRANCHPAGE | ( lRoot ? NSX_ROOTPAGE : 0 ) */ + HB_UCHAR RecNoLen[1]; /* number of bytes for recno in branch keys - seems to be unused */ + HB_UCHAR KeyCount[2]; /* number of key in page */ + HB_UCHAR LowerPage[4]; /* offset to the page with lower keys */ + HB_UCHAR KeyData[NSX_PAGELEN - 8]; /* with branch keys */ } NSXBRANCHPAGE; typedef NSXBRANCHPAGE * LPNSXBRANCHPAGE; typedef struct _NSXLEAFPAGE { - UCHAR NodeID[1]; /* NSX_LEAFPAGE | ( lRoot ? NSX_ROOTPAGE : 0 ) */ - UCHAR RecNoLen[1]; /* number of bytes for recno in leaf keys */ - UCHAR KeyCount[2]; /* number of key in page */ - UCHAR UsedArea[2]; /* arrea used in page -> offset to free area */ - UCHAR KeyData[NSX_PAGELEN - NSX_LEAFKEYOFFSET]; /* with branch keys */ + HB_UCHAR NodeID[1]; /* NSX_LEAFPAGE | ( lRoot ? NSX_ROOTPAGE : 0 ) */ + HB_UCHAR RecNoLen[1]; /* number of bytes for recno in leaf keys */ + HB_UCHAR KeyCount[2]; /* number of key in page */ + HB_UCHAR UsedArea[2]; /* arrea used in page -> offset to free area */ + HB_UCHAR KeyData[NSX_PAGELEN - NSX_LEAFKEYOFFSET]; /* with branch keys */ } NSXLEAFPAGE; typedef NSXLEAFPAGE * LPNSXLEAFPAGE; @@ -319,20 +319,20 @@ typedef NSXLEAFPAGE * LPNSXLEAFPAGE; variable member sizes */ typedef struct _NSXBRANCHKEY { - UCHAR Page[4]; /* page offset wih higher keys values */ - UCHAR RecNo[n]; /* where n is RecNoLen */ - UCHAR KeyData[l]; /* key value where l is KeySize */ + HB_UCHAR Page[4]; /* page offset wih higher keys values */ + HB_UCHAR RecNo[n]; /* where n is RecNoLen */ + HB_UCHAR KeyData[l]; /* key value where l is KeySize */ } NSXBRANCHKEY; typedef NSXBRANCHKEY * LPNSXBRANCHKEY; typedef struct _NSXLEAFKEY { - UCHAR RecNo[n]; /* where n is RecNoLen */ - UCHAR Size[1]; /* key data size with this byte and n RecNo BYTEs + HB_UCHAR RecNo[n]; /* where n is RecNoLen */ + HB_UCHAR Size[1]; /* key data size with this byte and n RecNo BYTEs * if Size == n + 1 then key is fully duplicated */ - UCHAR DupCount[1]; /* number of bytes from previous key */ - UCHAR KeyData[l]; /* rest of key value with RLE compression: + HB_UCHAR DupCount[1]; /* number of bytes from previous key */ + HB_UCHAR KeyData[l]; /* rest of key value with RLE compression: * FF xx yy => REPLICATE(yy, xx) * FF 01 => FF * l = Size - n - 2 @@ -361,7 +361,7 @@ typedef struct _KEYINFO ULONG page; /* page number */ ULONG rec; /* record number */ int mode; /* comparison mode NSX_CMP_* */ - UCHAR val[ 1 ]; /* key value */ + HB_UCHAR val[ 1 ]; /* key value */ } KEYINFO; typedef KEYINFO * LPKEYINFO; @@ -369,7 +369,7 @@ typedef struct _TREE_STACK { ULONG page; SHORT ikey; - UCHAR * value; + HB_UCHAR * value; } TREE_STACK; typedef TREE_STACK * LPTREESTACK; @@ -383,9 +383,9 @@ typedef struct _HB_PAGEINFO struct _HB_PAGEINFO * pNext; struct _HB_PAGEINFO * pPrev; #ifdef HB_NSX_EXTERNAL_PAGEBUFFER - UCHAR * buffer; + HB_UCHAR * buffer; #else - UCHAR buffer[ NSX_PAGELEN ]; + HB_UCHAR buffer[ NSX_PAGELEN ]; #endif } HB_PAGEINFO; typedef HB_PAGEINFO * LPPAGEINFO; @@ -427,9 +427,9 @@ typedef struct _TAGINFO ULONG HeadBlock; ULONG RootBlock; - UCHAR TagFlags; - UCHAR KeyType; - UCHAR TrailChar; + HB_UCHAR TagFlags; + HB_UCHAR KeyType; + HB_UCHAR TrailChar; USHORT KeyLength; USHORT nField; USHORT uiNumber; @@ -495,7 +495,7 @@ typedef struct ULONG ulKeys; /* number of keys in page */ ULONG ulKeyBuf; /* number of keys in memory buffer */ ULONG ulCurKey; /* current key in memory buffer */ - UCHAR * pKeyPool; /* memory buffer */ + HB_UCHAR * pKeyPool; /* memory buffer */ } NSXSWAPPAGE; typedef NSXSWAPPAGE * LPNSXSWAPPAGE; @@ -505,8 +505,8 @@ typedef struct HB_FHANDLE hTempFile; /* handle to temporary file */ char * szTempFileName; /* temporary file name */ int keyLen; /* key length */ - UCHAR trailChar; /* index key trail character */ - UCHAR recSize; /* record size in leaf keys */ + HB_UCHAR trailChar; /* index key trail character */ + HB_UCHAR recSize; /* record size in leaf keys */ HB_BOOL fUnique; /* HB_TRUE if index is unique */ HB_BOOL fReindex; /* HB_TRUE if reindexing is in process */ ULONG ulMaxRec; /* the highest record number */ @@ -516,17 +516,17 @@ typedef struct ULONG ulCurPage; /* current page */ ULONG ulPgKeys; /* maximum number of key in page memory buffer */ ULONG ulMaxKey; /* maximum number of keys in single page */ - UCHAR * pKeyPool; /* memory buffer for current page then for pages */ - UCHAR * pStartKey; /* begining of key pool after sorting */ + HB_UCHAR * pKeyPool; /* memory buffer for current page then for pages */ + HB_UCHAR * pStartKey; /* begining of key pool after sorting */ LPNSXSWAPPAGE pSwapPage; /* list of pages */ LPPAGEINFO NodeList[ NSX_STACKSIZE ]; /* Stack of pages */ ULONG ulFirst; ULONG * pSortedPages; - UCHAR pLastKey[ NSX_MAXKEYLEN ]; /* last key val */ + HB_UCHAR pLastKey[ NSX_MAXKEYLEN ]; /* last key val */ ULONG ulLastRec; ULONG ulLastLeaf; /* last non empty leaf page written to tag */ - UCHAR * pBuffIO; /* index IO buffer */ + HB_UCHAR * pBuffIO; /* index IO buffer */ ULONG ulSizeIO; /* size of IO buffer in index pages */ ULONG ulPagesIO; /* number of index pages in buffer */ ULONG ulFirstIO; /* first page in buffer */ diff --git a/harbour/src/common/expropt1.c b/harbour/src/common/expropt1.c index 6fbfa6b21b..9e6b87ee47 100644 --- a/harbour/src/common/expropt1.c +++ b/harbour/src/common/expropt1.c @@ -1119,7 +1119,7 @@ HB_EXPR_PTR hb_compExprNewNegate( HB_EXPR_PTR pNegExpr, HB_COMP_DECL ) if( pNegExpr->value.asNum.NumType == HB_ET_DOUBLE ) { pNegExpr->value.asNum.val.d = - pNegExpr->value.asNum.val.d; - pNegExpr->value.asNum.bWidth = ( UCHAR ) HB_DBL_LENGTH( pNegExpr->value.asNum.val.d ); + pNegExpr->value.asNum.bWidth = ( HB_UCHAR ) HB_DBL_LENGTH( pNegExpr->value.asNum.val.d ); } else { @@ -1128,7 +1128,7 @@ HB_EXPR_PTR hb_compExprNewNegate( HB_EXPR_PTR pNegExpr, HB_COMP_DECL ) { pNegExpr->value.asNum.NumType = HB_ET_DOUBLE; pNegExpr->value.asNum.val.d = - ( double ) pNegExpr->value.asNum.val.l; - pNegExpr->value.asNum.bWidth = ( UCHAR ) HB_DBL_LENGTH( pNegExpr->value.asNum.val.d ); + pNegExpr->value.asNum.bWidth = ( HB_UCHAR ) HB_DBL_LENGTH( pNegExpr->value.asNum.val.d ); pNegExpr->value.asNum.bDec = 0; } else diff --git a/harbour/src/common/expropt2.c b/harbour/src/common/expropt2.c index 29f8a807d5..d72d53f767 100644 --- a/harbour/src/common/expropt2.c +++ b/harbour/src/common/expropt2.c @@ -321,7 +321,7 @@ HB_EXPR_PTR hb_compExprReduceMult( HB_EXPR_PTR pSelf, HB_COMP_DECL ) { pSelf->value.asNum.val.d = pLeft->value.asNum.val.d * pRight->value.asNum.val.d; pSelf->value.asNum.bWidth = HB_DEFAULT_WIDTH; - pSelf->value.asNum.bDec = ( UCHAR ) ( pLeft->value.asNum.bDec + pRight->value.asNum.bDec ); + pSelf->value.asNum.bDec = ( HB_UCHAR ) ( pLeft->value.asNum.bDec + pRight->value.asNum.bDec ); pSelf->value.asNum.NumType = HB_ET_DOUBLE; break; } @@ -2111,7 +2111,7 @@ HB_BOOL hb_compExprReduceASC( HB_EXPR_PTR pSelf, HB_COMP_DECL ) if( pArg->ExprType == HB_ET_STRING ) { HB_EXPR_PTR pExpr = hb_compExprNewLong( - ( UCHAR ) pArg->value.asString.string[0], HB_COMP_PARAM ); + ( HB_UCHAR ) pArg->value.asString.string[0], HB_COMP_PARAM ); HB_COMP_EXPR_FREE( pParms ); HB_COMP_EXPR_FREE( pSelf->value.asFunCall.pFunName ); diff --git a/harbour/src/common/hbstr.c b/harbour/src/common/hbstr.c index 6b699b96f5..f495fb739a 100644 --- a/harbour/src/common/hbstr.c +++ b/harbour/src/common/hbstr.c @@ -136,7 +136,7 @@ char * hb_strupr( char * pszText ) HB_TRACE(HB_TR_DEBUG, ("hb_strupr(%s)", pszText)); for( pszPos = pszText; *pszPos; pszPos++ ) - *pszPos = ( char ) HB_TOUPPER( ( UCHAR ) *pszPos ); + *pszPos = ( char ) HB_TOUPPER( ( HB_UCHAR ) *pszPos ); return pszText; } @@ -148,7 +148,7 @@ char * hb_strlow( char * pszText ) HB_TRACE(HB_TR_DEBUG, ("hb_strlow(%s)", pszText)); for( pszPos = pszText; *pszPos; pszPos++ ) - *pszPos = ( char ) HB_TOLOWER( ( UCHAR ) *pszPos ); + *pszPos = ( char ) HB_TOLOWER( ( HB_UCHAR ) *pszPos ); return pszText; } @@ -847,7 +847,7 @@ char * hb_strncpyLower( char * pDest, const char * pSource, HB_SIZE ulLen ) pDest[ ulLen ] = '\0'; - while( ulLen && ( *pDest++ = ( char ) HB_TOLOWER( ( UCHAR ) *pSource ) ) != '\0' ) + while( ulLen && ( *pDest++ = ( char ) HB_TOLOWER( ( HB_UCHAR ) *pSource ) ) != '\0' ) { ulLen--; pSource++; @@ -871,7 +871,7 @@ char * hb_strncpyUpper( char * pDest, const char * pSource, HB_SIZE ulLen ) pDest[ ulLen ] = '\0'; - while( ulLen && ( *pDest++ = ( char ) HB_TOUPPER( ( UCHAR ) *pSource ) ) != '\0' ) + while( ulLen && ( *pDest++ = ( char ) HB_TOUPPER( ( HB_UCHAR ) *pSource ) ) != '\0' ) { ulLen--; pSource++; @@ -902,7 +902,7 @@ char * hb_strncpyUpperTrim( char * pDest, const char * pSource, HB_SIZE ulLen ) ulSLen--; while( ulLen && ulSLen && - ( *pDest++ = ( char ) HB_TOUPPER( ( UCHAR ) *pSource ) ) != '\0' ) + ( *pDest++ = ( char ) HB_TOUPPER( ( HB_UCHAR ) *pSource ) ) != '\0' ) { ulSLen--; ulLen--; @@ -1077,9 +1077,9 @@ void hb_strtohex( const char * pSource, HB_SIZE size, char * pDest ) for( i = 0; i < size; i++ ) { int b; - b = ( ( UCHAR ) pSource[ i ] >> 4 ) & 0x0F; + b = ( ( HB_UCHAR ) pSource[ i ] >> 4 ) & 0x0F; *pDest++ = ( char ) ( b + ( b > 9 ? 'a' - 10 : '0' ) ); - b = ( UCHAR ) pSource[ i ] & 0x0F; + b = ( HB_UCHAR ) pSource[ i ] & 0x0F; *pDest++ = ( char ) ( b + ( b > 9 ? 'a' - 10 : '0' ) ); } } diff --git a/harbour/src/compiler/compi18n.c b/harbour/src/compiler/compi18n.c index 4300939066..1d0f806ebf 100644 --- a/harbour/src/compiler/compi18n.c +++ b/harbour/src/compiler/compi18n.c @@ -228,7 +228,7 @@ static void hb_compI18nEscapeString( FILE* file, const char* szText ) { while( * szText ) { - if( ( UCHAR ) * szText < ' ' ) + if( ( HB_UCHAR ) * szText < ' ' ) { if( * szText == '\t' ) fprintf( file, "\\t" ); @@ -236,9 +236,9 @@ static void hb_compI18nEscapeString( FILE* file, const char* szText ) fprintf( file, "\\n" ); else if( * szText == '\r' ) fprintf( file, "\\r" ); - else if( ( ( UCHAR ) szText[ 1 ] >= '0' && ( UCHAR ) szText[ 1 ] <= '9' ) || - ( ( UCHAR ) szText[ 1 ] >= 'A' && ( UCHAR ) szText[ 1 ] <= 'F' ) || - ( ( UCHAR ) szText[ 1 ] >= 'a' && ( UCHAR ) szText[ 1 ] <= 'f' ) ) + else if( ( ( HB_UCHAR ) szText[ 1 ] >= '0' && ( HB_UCHAR ) szText[ 1 ] <= '9' ) || + ( ( HB_UCHAR ) szText[ 1 ] >= 'A' && ( HB_UCHAR ) szText[ 1 ] <= 'F' ) || + ( ( HB_UCHAR ) szText[ 1 ] >= 'a' && ( HB_UCHAR ) szText[ 1 ] <= 'f' ) ) fprintf( file, "\\%03o", * szText ); else fprintf( file, "\\x%02X", * szText ); diff --git a/harbour/src/compiler/complex.c b/harbour/src/compiler/complex.c index 4ae6db8723..151d8622eb 100644 --- a/harbour/src/compiler/complex.c +++ b/harbour/src/compiler/complex.c @@ -481,14 +481,14 @@ int hb_complex( YYSTYPE *yylval_ptr, HB_COMP_DECL ) if( hb_compStrToNum( pToken->value, pToken->len, &lNumber, &dNumber, &iDec, &iWidth ) ) { yylval_ptr->valDouble.dNumber = dNumber; - yylval_ptr->valDouble.bDec = ( UCHAR ) iDec; - yylval_ptr->valDouble.bWidth = ( UCHAR ) iWidth; + yylval_ptr->valDouble.bDec = ( HB_UCHAR ) iDec; + yylval_ptr->valDouble.bWidth = ( HB_UCHAR ) iWidth; return NUM_DOUBLE; } else { yylval_ptr->valLong.lNumber = lNumber; - yylval_ptr->valLong.bWidth = ( UCHAR ) iWidth; + yylval_ptr->valLong.bWidth = ( HB_UCHAR ) iWidth; return NUM_LONG; } } @@ -715,7 +715,7 @@ int hb_complex( YYSTYPE *yylval_ptr, HB_COMP_DECL ) return IDENTIFIER; } pLex->iState = OPERATOR; - return ( UCHAR ) pToken->value[ 0 ]; + return ( HB_UCHAR ) pToken->value[ 0 ]; case HB_PP_TOKEN_EQ: if( HB_SUPPORT_HARBOUR && pToken->pNext && pToken->pNext->spaces == 0 && @@ -740,13 +740,13 @@ int hb_complex( YYSTYPE *yylval_ptr, HB_COMP_DECL ) case HB_PP_TOKEN_GT: case HB_PP_TOKEN_REFERENCE: pLex->iState = OPERATOR; - return ( UCHAR ) pToken->value[ 0 ]; + return ( HB_UCHAR ) pToken->value[ 0 ]; case HB_PP_TOKEN_EOL: pLex->fEol = HB_TRUE; case HB_PP_TOKEN_EOC: pLex->iState = LOOKUP; - return ( UCHAR ) pToken->value[ 0 ]; + return ( HB_UCHAR ) pToken->value[ 0 ]; case HB_PP_TOKEN_KEYWORD: { @@ -1364,7 +1364,7 @@ int hb_complex( YYSTYPE *yylval_ptr, HB_COMP_DECL ) return iType; } default: - return ( UCHAR ) pToken->value[ 0 ]; + return ( HB_UCHAR ) pToken->value[ 0 ]; } } diff --git a/harbour/src/compiler/genc.c b/harbour/src/compiler/genc.c index 94e19f4b6a..4bdb2073aa 100644 --- a/harbour/src/compiler/genc.c +++ b/harbour/src/compiler/genc.c @@ -465,13 +465,13 @@ static void hb_compGenCFunc( FILE * yyc, const char *cDecor, const char *szName, while( ( c = *tmp++ ) != 0 ) { if( HB_ISNEXTIDCHAR( c ) ) - fputc( ( UCHAR ) c, yyc ); + fputc( ( HB_UCHAR ) c, yyc ); else if( !fStrip || c != '$' || *tmp != 0 ) { /* 'x' is used to force unique name and eliminate possible * collisions with other function names. */ - fprintf( yyc, "x%02x", ( UCHAR ) c ); + fprintf( yyc, "x%02x", ( HB_UCHAR ) c ); } } if( iFuncSuffix ) @@ -480,7 +480,7 @@ static void hb_compGenCFunc( FILE * yyc, const char *cDecor, const char *szName, } else { - fputc( ( UCHAR ) cDecor[ i ], yyc ); + fputc( ( HB_UCHAR ) cDecor[ i ], yyc ); i++; } } @@ -1517,15 +1517,15 @@ static HB_GENC_FUNC( hb_p_pushdouble ) ++lPCodePos; for( i = 0; i < ( int ) ( sizeof( double ) + sizeof( BYTE ) + sizeof( BYTE ) ); ++i ) { - fprintf( cargo->yyc, " %i,", ( UCHAR ) pFunc->pCode[ lPCodePos + i ] ); + fprintf( cargo->yyc, " %i,", ( HB_UCHAR ) pFunc->pCode[ lPCodePos + i ] ); } if( cargo->bVerbose ) { fprintf( cargo->yyc, "\t/* %.*f, %d, %d */", - ( UCHAR ) pFunc->pCode[ lPCodePos + sizeof( double ) + sizeof( BYTE ) ], + ( HB_UCHAR ) pFunc->pCode[ lPCodePos + sizeof( double ) + sizeof( BYTE ) ], HB_PCODE_MKDOUBLE( &pFunc->pCode[ lPCodePos ] ), - ( UCHAR ) pFunc->pCode[ lPCodePos + sizeof( double ) ], - ( UCHAR ) pFunc->pCode[ lPCodePos + sizeof( double ) + sizeof( BYTE ) ] ); + ( HB_UCHAR ) pFunc->pCode[ lPCodePos + sizeof( double ) ], + ( HB_UCHAR ) pFunc->pCode[ lPCodePos + sizeof( double ) + sizeof( BYTE ) ] ); } fprintf( cargo->yyc, "\n" ); diff --git a/harbour/src/compiler/harbour.y b/harbour/src/compiler/harbour.y index 463126878e..8e903411a0 100644 --- a/harbour/src/compiler/harbour.y +++ b/harbour/src/compiler/harbour.y @@ -121,14 +121,14 @@ static void hb_compDebugStart( void ) { } struct { HB_LONG lNumber; /* to hold a long number returned by lex */ - UCHAR bWidth; /* to hold the width of the value */ + HB_UCHAR bWidth; /* to hold the width of the value */ } valLong; struct { double dNumber; /* to hold a double number returned by lex */ /* NOTE: Intentionally using "unsigned char" instead of "BYTE" */ - UCHAR bWidth; /* to hold the width of the value */ - UCHAR bDec; /* to hold the number of decimal points in the value */ + HB_UCHAR bWidth; /* to hold the width of the value */ + HB_UCHAR bDec; /* to hold the number of decimal points in the value */ } valDouble; struct { @@ -1229,7 +1229,7 @@ Declaration: DECLARE IdentName '(' { hb_compDeclaredAdd( HB_COMP_PARAM, $2 ); HB if( ! HB_COMP_PARAM->pLastDeclared->pClass ) { hb_compGenWarning( HB_COMP_PARAM, hb_comp_szWarnings, 'W', HB_COMP_WARN_CLASS_NOT_FOUND, $7->szFromClass, HB_COMP_PARAM->pLastDeclared->szName ); - HB_COMP_PARAM->pLastDeclared->cType = ( HB_ISUPPER( ( UCHAR ) $7->cVarType ) ? 'O' : 'o' ); + HB_COMP_PARAM->pLastDeclared->cType = ( HB_ISUPPER( ( HB_UCHAR ) $7->cVarType ) ? 'O' : 'o' ); } } } @@ -1264,7 +1264,7 @@ DecMethod : IdentName '(' { HB_COMP_PARAM->pLastMethod = hb_compMethodAdd( HB_C if( ! HB_COMP_PARAM->pLastMethod->pClass ) { hb_compGenWarning( HB_COMP_PARAM, hb_comp_szWarnings, 'W', HB_COMP_WARN_CLASS_NOT_FOUND, $6->szFromClass, HB_COMP_PARAM->pLastMethod->szName ); - HB_COMP_PARAM->pLastMethod->cType = ( HB_ISUPPER( ( UCHAR ) $6->cVarType ) ? 'O' : 'o' ); + HB_COMP_PARAM->pLastMethod->cType = ( HB_ISUPPER( ( HB_UCHAR ) $6->cVarType ) ? 'O' : 'o' ); } } } @@ -1293,7 +1293,7 @@ DecData : IdentName { HB_COMP_PARAM->pLastMethod = hb_compMethodAdd( HB_COMP_ if( ! HB_COMP_PARAM->pLastMethod->pClass ) { hb_compGenWarning( HB_COMP_PARAM, hb_comp_szWarnings, 'W', HB_COMP_WARN_CLASS_NOT_FOUND, $3->szFromClass, HB_COMP_PARAM->pLastMethod->szName ); - HB_COMP_PARAM->pLastMethod->cType = ( HB_ISUPPER( ( UCHAR ) cVarType ) ? 'O' :'o' ); + HB_COMP_PARAM->pLastMethod->cType = ( HB_ISUPPER( ( HB_UCHAR ) cVarType ) ? 'O' :'o' ); } } else diff --git a/harbour/src/compiler/harbour.yyc b/harbour/src/compiler/harbour.yyc index b4c72ba361..6beec2c713 100644 --- a/harbour/src/compiler/harbour.yyc +++ b/harbour/src/compiler/harbour.yyc @@ -440,14 +440,14 @@ typedef union YYSTYPE struct { HB_LONG lNumber; /* to hold a long number returned by lex */ - UCHAR bWidth; /* to hold the width of the value */ + HB_UCHAR bWidth; /* to hold the width of the value */ } valLong; struct { double dNumber; /* to hold a double number returned by lex */ /* NOTE: Intentionally using "unsigned char" instead of "BYTE" */ - UCHAR bWidth; /* to hold the width of the value */ - UCHAR bDec; /* to hold the number of decimal points in the value */ + HB_UCHAR bWidth; /* to hold the width of the value */ + HB_UCHAR bDec; /* to hold the number of decimal points in the value */ } valDouble; struct { @@ -5983,7 +5983,7 @@ yyreduce: if( ! HB_COMP_PARAM->pLastDeclared->pClass ) { hb_compGenWarning( HB_COMP_PARAM, hb_comp_szWarnings, 'W', HB_COMP_WARN_CLASS_NOT_FOUND, (yyvsp[(7) - (8)].asVarType)->szFromClass, HB_COMP_PARAM->pLastDeclared->szName ); - HB_COMP_PARAM->pLastDeclared->cType = ( HB_ISUPPER( ( UCHAR ) (yyvsp[(7) - (8)].asVarType)->cVarType ) ? 'O' : 'o' ); + HB_COMP_PARAM->pLastDeclared->cType = ( HB_ISUPPER( ( HB_UCHAR ) (yyvsp[(7) - (8)].asVarType)->cVarType ) ? 'O' : 'o' ); } } } @@ -6044,7 +6044,7 @@ yyreduce: if( ! HB_COMP_PARAM->pLastMethod->pClass ) { hb_compGenWarning( HB_COMP_PARAM, hb_comp_szWarnings, 'W', HB_COMP_WARN_CLASS_NOT_FOUND, (yyvsp[(6) - (6)].asVarType)->szFromClass, HB_COMP_PARAM->pLastMethod->szName ); - HB_COMP_PARAM->pLastMethod->cType = ( HB_ISUPPER( ( UCHAR ) (yyvsp[(6) - (6)].asVarType)->cVarType ) ? 'O' : 'o' ); + HB_COMP_PARAM->pLastMethod->cType = ( HB_ISUPPER( ( HB_UCHAR ) (yyvsp[(6) - (6)].asVarType)->cVarType ) ? 'O' : 'o' ); } } } @@ -6079,7 +6079,7 @@ yyreduce: if( ! HB_COMP_PARAM->pLastMethod->pClass ) { hb_compGenWarning( HB_COMP_PARAM, hb_comp_szWarnings, 'W', HB_COMP_WARN_CLASS_NOT_FOUND, (yyvsp[(3) - (3)].asVarType)->szFromClass, HB_COMP_PARAM->pLastMethod->szName ); - HB_COMP_PARAM->pLastMethod->cType = ( HB_ISUPPER( ( UCHAR ) cVarType ) ? 'O' :'o' ); + HB_COMP_PARAM->pLastMethod->cType = ( HB_ISUPPER( ( HB_UCHAR ) cVarType ) ? 'O' :'o' ); } } else @@ -8027,4 +8027,3 @@ void yyerror( HB_COMP_DECL, const char * s ) else hb_compGenError( HB_COMP_PARAM, hb_comp_szErrors, 'E', HB_COMP_ERR_YACC, s, HB_COMP_PARAM->pLex->lasttok ); } - diff --git a/harbour/src/compiler/harbour.yyh b/harbour/src/compiler/harbour.yyh index 816bc83630..3a6dbe809b 100644 --- a/harbour/src/compiler/harbour.yyh +++ b/harbour/src/compiler/harbour.yyh @@ -277,14 +277,14 @@ typedef union YYSTYPE struct { HB_LONG lNumber; /* to hold a long number returned by lex */ - UCHAR bWidth; /* to hold the width of the value */ + HB_UCHAR bWidth; /* to hold the width of the value */ } valLong; struct { double dNumber; /* to hold a double number returned by lex */ /* NOTE: Intentionally using "unsigned char" instead of "BYTE" */ - UCHAR bWidth; /* to hold the width of the value */ - UCHAR bDec; /* to hold the number of decimal points in the value */ + HB_UCHAR bWidth; /* to hold the width of the value */ + HB_UCHAR bDec; /* to hold the number of decimal points in the value */ } valDouble; struct { @@ -312,6 +312,3 @@ typedef union YYSTYPE # define YYSTYPE_IS_DECLARED 1 # define YYSTYPE_IS_TRIVIAL 1 #endif - - - diff --git a/harbour/src/debug/dbgentry.c b/harbour/src/debug/dbgentry.c index 6a3eddc658..252d9be48c 100644 --- a/harbour/src/debug/dbgentry.c +++ b/harbour/src/debug/dbgentry.c @@ -987,8 +987,8 @@ static PHB_ITEM hb_dbgEvalMacro( const char *szExpr, PHB_ITEM pItem ) } -#define IS_IDENT_START( c ) HB_ISFIRSTIDCHAR( ( UCHAR ) ( c ) ) -#define IS_IDENT_CHAR( c ) HB_ISNEXTIDCHAR( ( UCHAR ) ( c ) ) +#define IS_IDENT_START( c ) HB_ISFIRSTIDCHAR( ( HB_UCHAR ) ( c ) ) +#define IS_IDENT_CHAR( c ) HB_ISNEXTIDCHAR( ( HB_UCHAR ) ( c ) ) static int hb_dbgEvalSubstituteVar( HB_WATCHPOINT *watch, char *szWord, int nStart, int nLen ) { diff --git a/harbour/src/macro/macro.y b/harbour/src/macro/macro.y index 139e16bbf2..5e942fcd1d 100644 --- a/harbour/src/macro/macro.y +++ b/harbour/src/macro/macro.y @@ -150,13 +150,13 @@ struct { HB_LONG lNumber; /* to hold a long number returned by lex */ - UCHAR bWidth; /* to hold the width of the value */ + HB_UCHAR bWidth; /* to hold the width of the value */ } valLong; struct { double dNumber; /* to hold a double number returned by lex */ - UCHAR bWidth; /* to hold the width of the value */ - UCHAR bDec; /* to hold the number of decimal points in the value */ + HB_UCHAR bWidth; /* to hold the width of the value */ + HB_UCHAR bDec; /* to hold the number of decimal points in the value */ } valDouble; struct { @@ -975,14 +975,14 @@ int hb_macrolex( YYSTYPE *yylval_ptr, HB_MACRO_PTR pMacro ) if( hb_compStrToNum( pToken->value, pToken->len, &lNumber, &dNumber, &iDec, &iWidth ) ) { yylval_ptr->valDouble.dNumber = dNumber; - yylval_ptr->valDouble.bDec = ( UCHAR ) iDec; - yylval_ptr->valDouble.bWidth = ( UCHAR ) iWidth; + yylval_ptr->valDouble.bDec = ( HB_UCHAR ) iDec; + yylval_ptr->valDouble.bWidth = ( HB_UCHAR ) iWidth; return NUM_DOUBLE; } else { yylval_ptr->valLong.lNumber = lNumber; - yylval_ptr->valLong.bWidth = ( UCHAR ) iWidth; + yylval_ptr->valLong.bWidth = ( HB_UCHAR ) iWidth; return NUM_LONG; } } diff --git a/harbour/src/macro/macro.yyc b/harbour/src/macro/macro.yyc index d69350a910..66652a0dee 100644 --- a/harbour/src/macro/macro.yyc +++ b/harbour/src/macro/macro.yyc @@ -326,13 +326,13 @@ typedef union YYSTYPE struct { HB_LONG lNumber; /* to hold a long number returned by lex */ - UCHAR bWidth; /* to hold the width of the value */ + HB_UCHAR bWidth; /* to hold the width of the value */ } valLong; struct { double dNumber; /* to hold a double number returned by lex */ - UCHAR bWidth; /* to hold the width of the value */ - UCHAR bDec; /* to hold the number of decimal points in the value */ + HB_UCHAR bWidth; /* to hold the width of the value */ + HB_UCHAR bDec; /* to hold the number of decimal points in the value */ } valDouble; struct { @@ -3314,14 +3314,14 @@ int hb_macrolex( YYSTYPE *yylval_ptr, HB_MACRO_PTR pMacro ) if( hb_compStrToNum( pToken->value, pToken->len, &lNumber, &dNumber, &iDec, &iWidth ) ) { yylval_ptr->valDouble.dNumber = dNumber; - yylval_ptr->valDouble.bDec = ( UCHAR ) iDec; - yylval_ptr->valDouble.bWidth = ( UCHAR ) iWidth; + yylval_ptr->valDouble.bDec = ( HB_UCHAR ) iDec; + yylval_ptr->valDouble.bWidth = ( HB_UCHAR ) iWidth; return NUM_DOUBLE; } else { yylval_ptr->valLong.lNumber = lNumber; - yylval_ptr->valLong.bWidth = ( UCHAR ) iWidth; + yylval_ptr->valLong.bWidth = ( HB_UCHAR ) iWidth; return NUM_LONG; } } @@ -3417,4 +3417,3 @@ int hb_macrolex( YYSTYPE *yylval_ptr, HB_MACRO_PTR pMacro ) } #endif /* HB_MACRO_PPLEX */ - diff --git a/harbour/src/macro/macro.yyh b/harbour/src/macro/macro.yyh index c1b7e5b274..990157b522 100644 --- a/harbour/src/macro/macro.yyh +++ b/harbour/src/macro/macro.yyh @@ -143,13 +143,13 @@ typedef union YYSTYPE struct { HB_LONG lNumber; /* to hold a long number returned by lex */ - UCHAR bWidth; /* to hold the width of the value */ + HB_UCHAR bWidth; /* to hold the width of the value */ } valLong; struct { double dNumber; /* to hold a double number returned by lex */ - UCHAR bWidth; /* to hold the width of the value */ - UCHAR bDec; /* to hold the number of decimal points in the value */ + HB_UCHAR bWidth; /* to hold the width of the value */ + HB_UCHAR bDec; /* to hold the number of decimal points in the value */ } valDouble; struct { @@ -164,6 +164,3 @@ typedef union YYSTYPE # define YYSTYPE_IS_DECLARED 1 # define YYSTYPE_IS_TRIVIAL 1 #endif - - - diff --git a/harbour/src/pp/ppcore.c b/harbour/src/pp/ppcore.c index b900b4737e..7683fc26f0 100644 --- a/harbour/src/pp/ppcore.c +++ b/harbour/src/pp/ppcore.c @@ -469,7 +469,7 @@ static PHB_PP_TOKEN hb_pp_tokenNew( const char * value, ULONG ulLen, { if( ulLen <= 1 ) { - pToken->value = hb_szAscii[ ulLen ? ( UCHAR ) value[ 0 ] : 0 ]; + pToken->value = hb_szAscii[ ulLen ? ( HB_UCHAR ) value[ 0 ] : 0 ]; type |= HB_PP_TOKEN_STATIC; } else @@ -498,7 +498,7 @@ static void hb_pp_tokenSetValue( PHB_PP_TOKEN pToken, hb_xfree( ( void * ) pToken->value ); if( ulLen <= 1 ) { - pToken->value = hb_szAscii[ ulLen ? ( UCHAR ) value[ 0 ] : 0 ]; + pToken->value = hb_szAscii[ ulLen ? ( HB_UCHAR ) value[ 0 ] : 0 ]; pToken->type |= HB_PP_TOKEN_STATIC; } else @@ -664,7 +664,7 @@ static void hb_pp_readLine( PHB_PP_STATE pState ) { if( pState->pFile->ulLineBufLen ) { - ch = ( UCHAR ) pState->pFile->pLineBuf[ 0 ]; + ch = ( HB_UCHAR ) pState->pFile->pLineBuf[ 0 ]; pState->pFile->pLineBuf++; pState->pFile->ulLineBufLen--; } @@ -5998,7 +5998,7 @@ void hb_pp_tokenUpper( PHB_PP_TOKEN pToken ) if( pToken->len <= 1 ) { - UCHAR ucVal = pToken->len ? ( UCHAR ) pToken->value[ 1 ] : 0; + HB_UCHAR ucVal = pToken->len ? ( HB_UCHAR ) pToken->value[ 1 ] : 0; if( HB_PP_TOKEN_ALLOC( pToken->type ) ) { hb_xfree( ( void * ) pToken->value ); @@ -6038,7 +6038,7 @@ void hb_pp_tokenUpper( PHB_PP_TOKEN pToken ) if( pToken->len <= 1 ) { - UCHAR ucVal = ( UCHAR ) HB_PP_UPPER( pToken->value[ 0 ] ); + HB_UCHAR ucVal = ( HB_UCHAR ) HB_PP_UPPER( pToken->value[ 0 ] ); if( HB_PP_TOKEN_ALLOC( pToken->type ) ) { hb_xfree( ( void * ) pToken->value ); diff --git a/harbour/src/rdd/dbf1.c b/harbour/src/rdd/dbf1.c index 0979d24850..f10da47fd7 100644 --- a/harbour/src/rdd/dbf1.c +++ b/harbour/src/rdd/dbf1.c @@ -1826,7 +1826,7 @@ static HB_ERRCODE hb_dbfGetValue( DBFAREAP pArea, USHORT uiIndex, PHB_ITEM pItem ulLen = pField->uiLen; if( hb_dbfGetNullFlag( pArea, pArea->pFieldBits[ uiIndex ].uiLengthBit ) ) { - ulLen = ( UCHAR ) pArea->pRecord[ pArea->pFieldOffset[ uiIndex ] + ulLen - 1 ]; + ulLen = ( HB_UCHAR ) pArea->pRecord[ pArea->pFieldOffset[ uiIndex ] + ulLen - 1 ]; /* protection against corrupted files */ if( ulLen > ( ULONG ) pField->uiLen ) ulLen = pField->uiLen; diff --git a/harbour/src/rdd/dbfnsx/dbfnsx1.c b/harbour/src/rdd/dbfnsx/dbfnsx1.c index 586632ab4e..9777b524da 100644 --- a/harbour/src/rdd/dbfnsx/dbfnsx1.c +++ b/harbour/src/rdd/dbfnsx/dbfnsx1.c @@ -126,74 +126,74 @@ static USHORT s_uiRddId; static USHORT hb_nsxGetKeyCount( LPPAGEINFO pPage ) { - UCHAR * ptr = hb_nsxPageBuffer( pPage ) + 2; + HB_UCHAR * ptr = hb_nsxPageBuffer( pPage ) + 2; return HB_GET_LE_UINT16( ptr ); } static void hb_nsxSetKeyCount( LPPAGEINFO pPage, USHORT uiKeys ) { - UCHAR * ptr = hb_nsxPageBuffer( pPage ) + 2; + HB_UCHAR * ptr = hb_nsxPageBuffer( pPage ) + 2; HB_PUT_LE_UINT16( ptr, uiKeys ); } static ULONG hb_nsxGetLowerPage( LPPAGEINFO pPage ) { - UCHAR * ptr = hb_nsxPageBuffer( pPage ) + 4; + HB_UCHAR * ptr = hb_nsxPageBuffer( pPage ) + 4; return HB_GET_LE_UINT32( ptr ); } static void hb_nsxSetLowerPage( LPPAGEINFO pPage, ULONG ulPage ) { - UCHAR * ptr = hb_nsxPageBuffer( pPage ) + 4; + HB_UCHAR * ptr = hb_nsxPageBuffer( pPage ) + 4; HB_PUT_LE_UINT32( ptr, ulPage ); } static ULONG hb_nsxGetKeyPage( LPPAGEINFO pPage, USHORT uiLen, USHORT uiKey ) { - UCHAR * ptr = hb_nsxGetBranchKeyPtr( pPage, uiLen, uiKey ); + HB_UCHAR * ptr = hb_nsxGetBranchKeyPtr( pPage, uiLen, uiKey ); return HB_GET_LE_UINT32( ptr ); } static void hb_nsxSetKeyPage( LPPAGEINFO pPage, USHORT uiLen, USHORT uiKey, ULONG ulPage ) { - UCHAR * ptr = hb_nsxGetBranchKeyPtr( pPage, uiLen, uiKey ); + HB_UCHAR * ptr = hb_nsxGetBranchKeyPtr( pPage, uiLen, uiKey ); HB_PUT_LE_UINT32( ptr, ulPage ); } static ULONG hb_nsxGetKeyRec( LPPAGEINFO pPage, USHORT uiLen, USHORT uiKey ) { - UCHAR * ptr = hb_nsxGetBranchKeyPtr( pPage, uiLen, uiKey ) + 4; + HB_UCHAR * ptr = hb_nsxGetBranchKeyPtr( pPage, uiLen, uiKey ) + 4; return HB_GET_LE_UINT32( ptr ); } static void hb_nsxSetKeyRec( LPPAGEINFO pPage, USHORT uiLen, USHORT uiKey, ULONG ulRec ) { - UCHAR * ptr = hb_nsxGetBranchKeyPtr( pPage, uiLen, uiKey ) + 4; + HB_UCHAR * ptr = hb_nsxGetBranchKeyPtr( pPage, uiLen, uiKey ) + 4; HB_PUT_LE_UINT32( ptr, ulRec ); } -static UCHAR * hb_nsxGetKeyVal( LPPAGEINFO pPage, USHORT uiLen, USHORT uiKey ) +static HB_UCHAR * hb_nsxGetKeyVal( LPPAGEINFO pPage, USHORT uiLen, USHORT uiKey ) { return hb_nsxGetBranchKeyPtr( pPage, uiLen, uiKey ) + 8; } -static void hb_nsxBranchKeySetPage( UCHAR * ptr, ULONG ulPage ) +static void hb_nsxBranchKeySetPage( HB_UCHAR * ptr, ULONG ulPage ) { HB_PUT_LE_UINT32( ptr, ulPage ); } -static void hb_nsxBranchKeySetRec( UCHAR * ptr, ULONG ulRec ) +static void hb_nsxBranchKeySetRec( HB_UCHAR * ptr, ULONG ulRec ) { ptr += 4; HB_PUT_LE_UINT32( ptr, ulRec ); } -static ULONG hb_nsxBranchKeyPage( UCHAR * ptr ) +static ULONG hb_nsxBranchKeyPage( HB_UCHAR * ptr ) { return HB_GET_LE_UINT32( ptr ); } -static ULONG hb_nsxBranchKeyRec( UCHAR * ptr ) +static ULONG hb_nsxBranchKeyRec( HB_UCHAR * ptr ) { ptr += 4; return HB_GET_LE_UINT32( ptr ); @@ -201,13 +201,13 @@ static ULONG hb_nsxBranchKeyRec( UCHAR * ptr ) static USHORT hb_nsxLeafGetFreeOffset( LPPAGEINFO pPage ) { - UCHAR * ptr = hb_nsxPageBuffer( pPage ) + 4; + HB_UCHAR * ptr = hb_nsxPageBuffer( pPage ) + 4; return HB_GET_LE_UINT16( ptr ); } static void hb_nsxLeafSetFreeOffset( LPPAGEINFO pPage, USHORT uiOffset ) { - UCHAR * ptr = hb_nsxPageBuffer( pPage ) + 4; + HB_UCHAR * ptr = hb_nsxPageBuffer( pPage ) + 4; HB_PUT_LE_UINT16( ptr, uiOffset ); } @@ -216,10 +216,10 @@ static void hb_nsxLeafSetFreeOffset( LPPAGEINFO pPage, USHORT uiOffset ) /* #define HB_NSX_NO_CORRUPT_PROTECT */ static USHORT hb_nsxLeafGetKey( LPTAGINFO pTag, LPPAGEINFO pPage, USHORT uiOffset, - UCHAR * bPrevValue, ULONG * pulRecNo ) + HB_UCHAR * bPrevValue, ULONG * pulRecNo ) { - UCHAR * ptr = ( UCHAR * ) hb_nsxPageBuffer( pPage ); - UCHAR ucRecLen = hb_nsxGetKeyRecSizePtr( ptr ), ucSize, ucDupCount; + HB_UCHAR * ptr = ( HB_UCHAR * ) hb_nsxPageBuffer( pPage ); + HB_UCHAR ucRecLen = hb_nsxGetKeyRecSizePtr( ptr ), ucSize, ucDupCount; #ifndef HB_NSX_NO_CORRUPT_PROTECT /* protection against corrupted NSX files */ @@ -251,7 +251,7 @@ static USHORT hb_nsxLeafGetKey( LPTAGINFO pTag, LPPAGEINFO pPage, USHORT uiOffse ucSize = ptr[ uiOffset++ ]; if( ucSize != ucRecLen + 1 ) /* key value is not fully duplicated */ { - UCHAR len = pTag->KeyLength; + HB_UCHAR len = pTag->KeyLength; /* ucSize = 0 is a special case when RecLen is 4 and KeySize is 250 * in such case ucSize - ( ucRecLen + 2 ) gives 250 = NSX_MAXKEYLEN @@ -281,11 +281,11 @@ static USHORT hb_nsxLeafGetKey( LPTAGINFO pTag, LPPAGEINFO pPage, USHORT uiOffse { while( ucSize-- ) { - UCHAR uc = ptr[ uiOffset++ ]; + HB_UCHAR uc = ptr[ uiOffset++ ]; if( uc == NSX_RLE_CHAR ) { - UCHAR ucRepl; + HB_UCHAR ucRepl; #ifndef HB_NSX_NO_CORRUPT_PROTECT /* protection against corrupted NSX files */ @@ -329,12 +329,12 @@ static USHORT hb_nsxLeafGetKey( LPTAGINFO pTag, LPPAGEINFO pPage, USHORT uiOffse } static USHORT hb_nsxLeafPutKey( LPTAGINFO pTag, LPPAGEINFO pPage, USHORT uiOffset, - UCHAR * bPrevValue, UCHAR *pKeyValue, ULONG ulRecNo ) + HB_UCHAR * bPrevValue, HB_UCHAR *pKeyValue, ULONG ulRecNo ) { - UCHAR *ptr = ( UCHAR * ) hb_nsxPageBuffer( pPage ) + uiOffset, + HB_UCHAR *ptr = ( HB_UCHAR * ) hb_nsxPageBuffer( pPage ) + uiOffset, *pDst, *pSrc, *pEnd; - UCHAR ucSize = hb_nsxGetKeyRecSize( pPage ), ucDupCount = 0, - ucLen = ( UCHAR ) pTag->KeyLength; + HB_UCHAR ucSize = hb_nsxGetKeyRecSize( pPage ), ucDupCount = 0, + ucLen = ( HB_UCHAR ) pTag->KeyLength; int iMax; if( uiOffset + ucSize >= NSX_PAGELEN ) @@ -343,7 +343,7 @@ static USHORT hb_nsxLeafPutKey( LPTAGINFO pTag, LPPAGEINFO pPage, USHORT uiOffse switch( ucSize ) { case 1: - *ptr++ = ( UCHAR ) ulRecNo; + *ptr++ = ( HB_UCHAR ) ulRecNo; break; case 2: HB_PUT_LE_UINT16( ptr, ulRecNo ); @@ -398,10 +398,10 @@ static USHORT hb_nsxLeafPutKey( LPTAGINFO pTag, LPPAGEINFO pPage, USHORT uiOffse while( iMax > 0 && pSrc < pEnd ) { - UCHAR uc = *pSrc++; + HB_UCHAR uc = *pSrc++; if( pSrc < pEnd - 2 && uc == *pSrc && uc == pSrc[ 1 ] ) { - UCHAR ucRepl = 3; + HB_UCHAR ucRepl = 3; iMax -= 3; if( iMax < 0 ) break; @@ -419,7 +419,7 @@ static USHORT hb_nsxLeafPutKey( LPTAGINFO pTag, LPPAGEINFO pPage, USHORT uiOffse { if( pSrc < pEnd && uc == *pSrc ) { - UCHAR ucRepl = 2; + HB_UCHAR ucRepl = 2; iMax -= 3; if( iMax < 0 ) break; @@ -451,7 +451,7 @@ static USHORT hb_nsxLeafPutKey( LPTAGINFO pTag, LPPAGEINFO pPage, USHORT uiOffse if( pSrc == pEnd ) { - ucSize += ( UCHAR ) ( pDst - ( ptr + 2 ) ); + ucSize += ( HB_UCHAR ) ( pDst - ( ptr + 2 ) ); *ptr = ucSize; return uiOffset + ucSize; } @@ -567,7 +567,7 @@ static BYTE hb_nsxItemType( PHB_ITEM pItem ) /* * convert NSX (Clipper) type of key expression to internal one */ -static UCHAR hb_nsxKeyType( USHORT uiType, BYTE * pbTrail ) +static HB_UCHAR hb_nsxKeyType( USHORT uiType, BYTE * pbTrail ) { switch( uiType ) { @@ -601,7 +601,7 @@ static UCHAR hb_nsxKeyType( USHORT uiType, BYTE * pbTrail ) /* * convert internal type of key expression to comparable type */ -static UCHAR hb_nsxKeyTypeCmp( UCHAR ucType ) +static HB_UCHAR hb_nsxKeyTypeCmp( HB_UCHAR ucType ) { return ucType == 'T' ? 'D' : ucType; } @@ -609,7 +609,7 @@ static UCHAR hb_nsxKeyTypeCmp( UCHAR ucType ) /* * convert internal type of key expression to NSX (Clipper) one */ -static USHORT hb_nsxKeyTypeRaw( UCHAR ucType ) +static USHORT hb_nsxKeyTypeRaw( HB_UCHAR ucType ) { switch( ucType ) { @@ -848,8 +848,8 @@ static HB_BOOL hb_nsxEvalSeekCond( LPTAGINFO pTag, PHB_ITEM pCondItem ) /* * compare two values using Tag conditions (len & type) */ -static int hb_nsxValCompare( LPTAGINFO pTag, UCHAR * val1, int len1, - UCHAR * val2, int len2, int iMode ) +static int hb_nsxValCompare( LPTAGINFO pTag, HB_UCHAR * val1, int len1, + HB_UCHAR * val2, int len2, int iMode ) { int iLimit, iResult = 0; @@ -904,7 +904,7 @@ static int hb_nsxValCompare( LPTAGINFO pTag, UCHAR * val1, int len1, /* * check if a given key is in top scope */ -static HB_BOOL hb_nsxInTopScope( LPTAGINFO pTag, UCHAR * key ) +static HB_BOOL hb_nsxInTopScope( LPTAGINFO pTag, HB_UCHAR * key ) { PHB_NSXSCOPE pScope = pTag->fUsrDescend ? &pTag->bottom : &pTag->top; @@ -921,7 +921,7 @@ static HB_BOOL hb_nsxInTopScope( LPTAGINFO pTag, UCHAR * key ) /* * check if a given key is in bottom scope */ -static HB_BOOL hb_nsxInBottomScope( LPTAGINFO pTag, UCHAR * key ) +static HB_BOOL hb_nsxInBottomScope( LPTAGINFO pTag, HB_UCHAR * key ) { PHB_NSXSCOPE pScope = pTag->fUsrDescend ? &pTag->top : &pTag->bottom; @@ -1101,7 +1101,7 @@ static void hb_nsxTagCheckBuffers( LPTAGINFO pTag ) static void hb_nsxPageCheckKeys( LPPAGEINFO pPage, LPTAGINFO pTag, int iPos, int iType ) { - UCHAR pKeyVal[ NSX_MAXKEYLEN ], pKeyPrev[ NSX_MAXKEYLEN ]; + HB_UCHAR pKeyVal[ NSX_MAXKEYLEN ], pKeyPrev[ NSX_MAXKEYLEN ]; ULONG ulRecNo = 0, ulPrevRec; USHORT uiOffset = NSX_LEAFKEYOFFSET, u; int i; @@ -1655,7 +1655,7 @@ static ULONG hb_nsxPageGetFree( LPTAGINFO pTag ) */ static LPTAGINFO hb_nsxTagNew( LPNSXINDEX pIndex, const char * szTagName, const char *szKeyExpr, PHB_ITEM pKeyExpr, - UCHAR ucKeyType, USHORT uiKeyLen, BYTE bTrail, + HB_UCHAR ucKeyType, USHORT uiKeyLen, BYTE bTrail, const char *szForExpr, PHB_ITEM pForExpr, HB_BOOL fAscendKey, HB_BOOL fUnique, HB_BOOL fCustom ) { @@ -1777,7 +1777,7 @@ static LPTAGINFO hb_nsxTagLoad( LPNSXINDEX pIndex, ULONG ulBlock, LPTAGINFO pTag; PHB_ITEM pKeyExp, pForExp = NULL; USHORT uiUnique, uiDescend, uiKeySize; - UCHAR ucType, ucTrail; + HB_UCHAR ucType, ucTrail; uiUnique = HB_GET_LE_UINT16( lpNSX->Unique ); uiDescend = HB_GET_LE_UINT16( lpNSX->Descend ); @@ -2346,7 +2346,7 @@ static HB_BOOL hb_nsxTagUnLockWrite( LPTAGINFO pTag ) /* * retrieve previous key value from upper branch page */ -static HB_BOOL hb_nsxTagGetPrevKey( LPTAGINFO pTag, UCHAR * pKeyVal, int iLevel ) +static HB_BOOL hb_nsxTagGetPrevKey( LPTAGINFO pTag, HB_UCHAR * pKeyVal, int iLevel ) { while( --iLevel >= 0 ) { @@ -2364,7 +2364,7 @@ static HB_BOOL hb_nsxTagGetPrevKey( LPTAGINFO pTag, UCHAR * pKeyVal, int iLevel * decode key from leaf page into given buffer */ static HB_BOOL hb_nsxPageGetLeafKey( LPTAGINFO pTag, LPPAGEINFO pPage, USHORT uiKey, - UCHAR * pKeyVal, ULONG * pulRecNo ) + HB_UCHAR * pKeyVal, ULONG * pulRecNo ) { USHORT uiOffset = NSX_LEAFKEYOFFSET; @@ -2465,7 +2465,7 @@ static void hb_nsxTagSetPageStack( LPTAGINFO pTag, LPPAGEINFO pPage, USHORT uiKe if( !hb_nsxIsLeaf( pPage ) && uiKey ) { if( !pTag->stack[ pTag->stackLevel ].value ) - pTag->stack[ pTag->stackLevel ].value = ( UCHAR * ) hb_xgrab( pTag->KeyLength ); + pTag->stack[ pTag->stackLevel ].value = ( HB_UCHAR * ) hb_xgrab( pTag->KeyLength ); memcpy( pTag->stack[ pTag->stackLevel ].value, hb_nsxGetKeyVal( pPage, pTag->KeyLength, uiKey - 1 ), pTag->KeyLength ); @@ -2612,7 +2612,7 @@ static HB_BOOL hb_nsxTagNextKey( LPTAGINFO pTag ) if( pPage->uiKeys && pTag->stack[ iLevel ].ikey < pPage->uiKeys ) { if( !pTag->stack[ iLevel ].value ) - pTag->stack[ iLevel ].value = ( UCHAR * ) hb_xgrab( pTag->KeyLength ); + pTag->stack[ iLevel ].value = ( HB_UCHAR * ) hb_xgrab( pTag->KeyLength ); memcpy( pTag->stack[ iLevel ].value, hb_nsxGetKeyVal( pPage, pTag->KeyLength, pTag->stack[ iLevel ].ikey ), @@ -2656,7 +2656,7 @@ static HB_BOOL hb_nsxTagPrevKey( LPTAGINFO pTag ) if( --pTag->stack[ iLevel ].ikey ) { if( !pTag->stack[ iLevel ].value ) - pTag->stack[ iLevel ].value = ( UCHAR * ) hb_xgrab( pTag->KeyLength ); + pTag->stack[ iLevel ].value = ( HB_UCHAR * ) hb_xgrab( pTag->KeyLength ); memcpy( pTag->stack[ iLevel ].value, hb_nsxGetKeyVal( pPage, pTag->KeyLength, pTag->stack[ iLevel ].ikey - 1 ), @@ -2696,7 +2696,7 @@ static HB_BOOL hb_nsxTagPrevKey( LPTAGINFO pTag ) * find a key value in page */ static int hb_nsxPageKeyFind( LPTAGINFO pTag, LPPAGEINFO pPage, - UCHAR * key, SHORT keylen, int mode, + HB_UCHAR * key, SHORT keylen, int mode, HB_BOOL fLast, ULONG ulRecNo, HB_BOOL *fStop ) { int iBegin, iEnd, iLast, k, i; @@ -2709,7 +2709,7 @@ static int hb_nsxPageKeyFind( LPTAGINFO pTag, LPPAGEINFO pPage, else if( hb_nsxIsLeaf( pPage ) ) { USHORT uiOffset = NSX_LEAFKEYOFFSET, u; - UCHAR pKeyVal[ NSX_MAXKEYLEN ]; + HB_UCHAR pKeyVal[ NSX_MAXKEYLEN ]; hb_nsxTagGetPrevKey( pTag, pKeyVal, pTag->stackLevel ); for( u = 0; u < pPage->uiKeys; ++u ) @@ -2887,7 +2887,7 @@ static HB_BOOL hb_nsxTagKeyFind( LPTAGINFO pTag, LPKEYINFO pKey, USHORT uiLen ) static void hb_nsxPageKeyAdd( LPTAGINFO pTag, LPPAGEINFO pPage, USHORT uiPos, LPKEYINFO pKey ) { - UCHAR * ptr = hb_nsxGetBranchKeyPtr( pPage, pTag->KeyLength, uiPos ); + HB_UCHAR * ptr = hb_nsxGetBranchKeyPtr( pPage, pTag->KeyLength, uiPos ); if( uiPos < pPage->uiKeys ) { @@ -2959,7 +2959,7 @@ static LPKEYINFO hb_nsxPageSplit( LPTAGINFO pTag, LPPAGEINFO pPage, if( uiPos != uiHalf ) { - UCHAR * ptr = hb_nsxGetBranchKeyPtr( pPage, pTag->KeyLength, pPage->uiKeys - 1 ); + HB_UCHAR * ptr = hb_nsxGetBranchKeyPtr( pPage, pTag->KeyLength, pPage->uiKeys - 1 ); pKey->page = hb_nsxBranchKeyPage( ptr ); pKey->rec = hb_nsxBranchKeyRec( ptr ); memcpy( pKey->val, hb_nsxBranchKeyVal( ptr ), pTag->KeyLength ); @@ -2983,21 +2983,21 @@ static LPKEYINFO hb_nsxPageSplit( LPTAGINFO pTag, LPPAGEINFO pPage, * insert key into current stack page */ static HB_BOOL hb_nsxTagInsertKey( LPTAGINFO pTag, LPPAGEINFO pPage, - LPKEYINFO pKey, UCHAR * pKeyPrev ) + LPKEYINFO pKey, HB_UCHAR * pKeyPrev ) { USHORT uiOffset = NSX_LEAFKEYOFFSET, uiKeyOffset = 0, uiKey = pTag->stack[ pTag->stackLevel - 1 ].ikey, uiKeys = pPage->uiKeys, uiHalfOffset = 0, uiHalfKeys = 0, u; int iLen = pTag->KeyLength; ULONG ulRecNo; - UCHAR pKeyVal[ NSX_MAXKEYLEN ], * pKeyBuff, * ptr, ucRecSize; + HB_UCHAR pKeyVal[ NSX_MAXKEYLEN ], * pKeyBuff, * ptr, ucRecSize; LPKEYINFO pNewKey = NULL; #ifdef HB_NSX_DEBUG_EXT hb_nsxPageCheckKeys( pPage, pTag, uiKey, 41 ); #endif - ptr = pKeyBuff = ( UCHAR * ) hb_xgrab( ( uiKeys + 1 ) * ( iLen + 4 ) ); + ptr = pKeyBuff = ( HB_UCHAR * ) hb_xgrab( ( uiKeys + 1 ) * ( iLen + 4 ) ); if( pKeyPrev ) memcpy( pKeyVal, pKeyPrev, iLen ); else @@ -3229,7 +3229,7 @@ static HB_BOOL hb_nsxTagKeyAdd( LPTAGINFO pTag, LPKEYINFO pKey ) */ static void hb_nsxPageLeafKeyDel( LPTAGINFO pTag, LPPAGEINFO pPage, USHORT uiKey ) { - UCHAR pKeyVal[ NSX_MAXKEYLEN ], pKeyVal2[ NSX_MAXKEYLEN ], * pPrevVal = NULL; + HB_UCHAR pKeyVal[ NSX_MAXKEYLEN ], pKeyVal2[ NSX_MAXKEYLEN ], * pPrevVal = NULL; ULONG ulRecNo; USHORT uiOffset = NSX_LEAFKEYOFFSET, u; HB_BOOL fPrev; @@ -3324,7 +3324,7 @@ static HB_BOOL hb_nsxTagKeyDel( LPTAGINFO pTag, LPKEYINFO pKey ) } hb_nsxSetKeyRec( pBasePage, pTag->KeyLength, iBaseKey, ulRecNo ); if( !pTag->stack[ iBaseLevel ].value ) - pTag->stack[ iBaseLevel ].value = ( UCHAR * ) hb_xgrab( pTag->KeyLength ); + pTag->stack[ iBaseLevel ].value = ( HB_UCHAR * ) hb_xgrab( pTag->KeyLength ); memcpy( pTag->stack[ iBaseLevel ].value, hb_nsxGetKeyVal( pBasePage, pTag->KeyLength, iBaseKey ), pTag->KeyLength ); @@ -3365,7 +3365,7 @@ static HB_BOOL hb_nsxTagKeyDel( LPTAGINFO pTag, LPKEYINFO pKey ) else { LPKEYINFO pKeyNew = hb_nsxKeyNew( pTag->KeyLength ); - UCHAR * pKeyPtr, * pKeyPrev = NULL; + HB_UCHAR * pKeyPtr, * pKeyPrev = NULL; iKey = pTag->stack[ iLevel ].ikey; if( iKey == 0 ) @@ -4433,7 +4433,7 @@ static HB_BOOL hb_nsxOrdSkipUnique( LPTAGINFO pTag, LONG lToSkip ) hb_nsxTagRefreshScope( pTag ); if( hb_nsxCurKeyRefresh( pTag ) ) { - UCHAR keyVal[ NSX_MAXKEYLEN ]; + HB_UCHAR keyVal[ NSX_MAXKEYLEN ]; memcpy( keyVal, pTag->CurKeyInfo->val, pTag->KeyLength ); do @@ -4616,7 +4616,7 @@ static HB_BOOL hb_nsxOrdSkipWild( LPTAGINFO pTag, HB_BOOL fForward, PHB_ITEM pWi int iStop = fForward ? -1 : 1; if( pTag->fUsrDescend ) iStop = -iStop; - if( iFixed && hb_nsxValCompare( pTag, ( UCHAR * ) szPattern, iFixed, + if( iFixed && hb_nsxValCompare( pTag, ( HB_UCHAR * ) szPattern, iFixed, pTag->CurKeyInfo->val, iFixed, NSX_CMP_PREFIX ) == -iStop ) { @@ -4656,7 +4656,7 @@ static HB_BOOL hb_nsxOrdSkipWild( LPTAGINFO pTag, HB_BOOL fForward, PHB_ITEM pWi break; } } - if( iFixed && hb_nsxValCompare( pTag, ( UCHAR * ) szPattern, iFixed, + if( iFixed && hb_nsxValCompare( pTag, ( HB_UCHAR * ) szPattern, iFixed, pTag->CurKeyInfo->val, iFixed, NSX_CMP_PREFIX ) == iStop ) { break; @@ -4978,7 +4978,7 @@ static ULONG hb_nsxOrdScopeEval( LPTAGINFO pTag, /* create index: hb_nsxTagCreate() */ /* ************************************************************************* */ -static int hb_nsxQuickSortCompare( LPNSXSORTINFO pSort, UCHAR * pKey1, UCHAR * pKey2 ) +static int hb_nsxQuickSortCompare( LPNSXSORTINFO pSort, HB_UCHAR * pKey1, HB_UCHAR * pKey2 ) { int iLen = pSort->keyLen, i; @@ -4989,13 +4989,13 @@ static int hb_nsxQuickSortCompare( LPNSXSORTINFO pSort, UCHAR * pKey1, UCHAR * p return i; } -static HB_BOOL hb_nsxQSort( LPNSXSORTINFO pSort, UCHAR * pSrc, UCHAR * pBuf, LONG lKeys ) +static HB_BOOL hb_nsxQSort( LPNSXSORTINFO pSort, HB_UCHAR * pSrc, HB_UCHAR * pBuf, LONG lKeys ) { if( lKeys > 1 ) { int iLen = pSort->keyLen + 4; LONG l1, l2; - UCHAR * pPtr1, * pPtr2, *pDst; + HB_UCHAR * pPtr1, * pPtr2, *pDst; HB_BOOL f1, f2; l1 = lKeys >> 1; @@ -5108,7 +5108,7 @@ static void hb_nsxSortStorePage( LPNSXSORTINFO pSort, LPPAGEINFO pPage ) hb_nsxPageSave( pIndex, pPage ); } -static void hb_nsxSortAddNodeKey( LPNSXSORTINFO pSort, UCHAR *pKeyVal, ULONG ulRec ) +static void hb_nsxSortAddNodeKey( LPNSXSORTINFO pSort, HB_UCHAR *pKeyVal, ULONG ulRec ) { LPPAGEINFO pPage; ULONG ulPage = 0; @@ -5182,7 +5182,7 @@ static void hb_nsxSortAddNodeKey( LPNSXSORTINFO pSort, UCHAR *pKeyVal, ULONG ulR if( iLevel > 0 ) { - UCHAR * pKeyPtr = hb_nsxGetBranchKeyPtr( pPage, pSort->keyLen, pPage->uiKeys ); + HB_UCHAR * pKeyPtr = hb_nsxGetBranchKeyPtr( pPage, pSort->keyLen, pPage->uiKeys ); hb_nsxBranchKeySetRec( pKeyPtr, ulRec ); memcpy( hb_nsxBranchKeyVal( pKeyPtr ), pKeyVal, pSort->keyLen ); } @@ -5221,7 +5221,7 @@ static void hb_nsxSortWritePage( LPNSXSORTINFO pSort ) } static void hb_nsxSortGetPageKey( LPNSXSORTINFO pSort, ULONG ulPage, - UCHAR ** pKeyVal, ULONG *pulRec ) + HB_UCHAR ** pKeyVal, ULONG *pulRec ) { int iLen = pSort->keyLen; @@ -5250,7 +5250,7 @@ static void hb_nsxSortOrderPages( LPNSXSORTINFO pSort ) int iLen = pSort->keyLen, i; LONG l, r, m; ULONG n, ulPage, ulRec; - UCHAR *pKey = NULL, *pTmp; + HB_UCHAR *pKey = NULL, *pTmp; pSort->ulFirst = 0; pSort->pSortedPages = ( ULONG * ) hb_xgrab( pSort->ulPages * sizeof( ULONG ) ); @@ -5283,7 +5283,7 @@ static void hb_nsxSortOrderPages( LPNSXSORTINFO pSort ) } } -static HB_BOOL hb_nsxSortKeyGet( LPNSXSORTINFO pSort, UCHAR ** pKeyVal, ULONG *pulRec ) +static HB_BOOL hb_nsxSortKeyGet( LPNSXSORTINFO pSort, HB_UCHAR ** pKeyVal, ULONG *pulRec ) { int iLen = pSort->keyLen, i; LONG l, r, m; @@ -5294,7 +5294,7 @@ static HB_BOOL hb_nsxSortKeyGet( LPNSXSORTINFO pSort, UCHAR ** pKeyVal, ULONG *p /* check if first page has some keys yet */ if( pSort->pSwapPage[ ulPage ].ulKeys > 0 ) { - UCHAR *pKey, *pTmp; + HB_UCHAR *pKey, *pTmp; ULONG ulRec, ulPg; /* @@ -5353,7 +5353,7 @@ static HB_BOOL hb_nsxSortKeyGet( LPNSXSORTINFO pSort, UCHAR ** pKeyVal, ULONG *p static void hb_nsxSortKeyAdd( LPNSXSORTINFO pSort, ULONG ulRec, const char * pKeyVal, int iKeyLen ) { int iLen = pSort->keyLen; - UCHAR *pDst; + HB_UCHAR *pDst; if( pSort->ulKeys >= pSort->ulPgKeys ) { @@ -5378,7 +5378,7 @@ static void hb_nsxSortKeyAdd( LPNSXSORTINFO pSort, ULONG ulRec, const char * pKe static LPNSXSORTINFO hb_nsxSortNew( LPTAGINFO pTag, ULONG ulRecCount ) { LPNSXSORTINFO pSort; - UCHAR * pBuf; + HB_UCHAR * pBuf; int iLen = pTag->KeyLength; ULONG ulSize, ulMax, ulMin; @@ -5406,11 +5406,11 @@ static LPNSXSORTINFO hb_nsxSortNew( LPTAGINFO pTag, ULONG ulRecCount ) do { ulSize = ulMax * ( iLen + 4 ); - pBuf = ( UCHAR * ) hb_xalloc( ulSize << 2 ); + pBuf = ( HB_UCHAR * ) hb_xalloc( ulSize << 2 ); if( pBuf ) { hb_xfree( pBuf ); - pBuf = ( UCHAR * ) hb_xalloc( ulSize << 1 ); + pBuf = ( HB_UCHAR * ) hb_xalloc( ulSize << 1 ); } else { @@ -5440,7 +5440,7 @@ static LPNSXSORTINFO hb_nsxSortNew( LPTAGINFO pTag, ULONG ulRecCount ) * take many hours, Druzus. */ ulMax = ulMin; - pBuf = ( UCHAR * ) hb_xgrab( ( ulMax << 1 ) * ( iLen + 4 ) ); + pBuf = ( HB_UCHAR * ) hb_xgrab( ( ulMax << 1 ) * ( iLen + 4 ) ); } pSort->pTag = pTag; @@ -5506,14 +5506,14 @@ static void hb_nsxSortOut( LPNSXSORTINFO pSort ) HB_BOOL fUnique = pSort->fUnique, fNext; LPTAGINFO pTag = pSort->pTag; ULONG ulLastPage = 0, ulPage, ulRec, ulKey; - UCHAR * pKeyVal = NULL; + HB_UCHAR * pKeyVal = NULL; int iLen = pSort->keyLen, iLevel; pSort->ulPages = pSort->ulCurPage + 1; pSort->ulPgKeys = pSort->ulMaxKey / pSort->ulPages; if( pSort->ulPages > 1 ) { - UCHAR * pBuf = pSort->pKeyPool; + HB_UCHAR * pBuf = pSort->pKeyPool; hb_nsxSortWritePage( pSort ); for( ulPage = 0; ulPage < pSort->ulPages; ulPage++ ) { @@ -5586,7 +5586,7 @@ static void hb_nsxSortOut( LPNSXSORTINFO pSort ) #ifdef HB_NSX_DEBUG { - UCHAR * pTemp; + HB_UCHAR * pTemp; if( hb_nsxSortKeyGet( pSort, &pTemp, &ulRec ) ) { if( hb_vmRequestQuery() != 0 ) @@ -5688,11 +5688,11 @@ static void hb_nsxSortOut( LPNSXSORTINFO pSort ) pLastPage = hb_nsxPageLoad( pTag, ulLastPage ); if( pLastPage ) { - UCHAR * pBuffer; + HB_UCHAR * pBuffer; USHORT uiKey, uiRecSize; /* remove the key before last from the last nonempty leaf page */ - pBuffer = ( UCHAR * ) hb_nsxPageBuffer( pLastLeaf ); + pBuffer = ( HB_UCHAR * ) hb_nsxPageBuffer( pLastLeaf ); uiRecSize = hb_nsxGetKeyRecSize( pLastLeaf ); pLastLeaf->uiOffset = NSX_LEAFKEYOFFSET; pLastLeaf->uiKeys--; @@ -5703,7 +5703,7 @@ static void hb_nsxSortOut( LPNSXSORTINFO pSort ) NSX_PAGELEN - pLastLeaf->uiOffset ); #endif /* copy last key to last leaf page */ - pKeyVal = ( UCHAR * ) hb_nsxGetKeyVal( pLastPage, pTag->KeyLength, + pKeyVal = ( HB_UCHAR * ) hb_nsxGetKeyVal( pLastPage, pTag->KeyLength, pLastPage->uiKeys - 1 ); ulRec = hb_nsxGetKeyRec( pLastPage, pTag->KeyLength, pLastPage->uiKeys - 1 ); @@ -5836,7 +5836,7 @@ static HB_ERRCODE hb_nsxTagCreate( LPTAGINFO pTag, HB_BOOL fReindex ) ( pArea->lpCurTag == NULL && !fUseFilter ) ); pSort->ulSizeIO = ( 1 << 16 ) / NSX_PAGELEN; - pSort->pBuffIO = ( UCHAR * ) hb_xgrab( pSort->ulSizeIO * NSX_PAGELEN ); + pSort->pBuffIO = ( HB_UCHAR * ) hb_xgrab( pSort->ulSizeIO * NSX_PAGELEN ); iRecBufSize = ( pSort->ulSizeIO * NSX_PAGELEN ) / pArea->dbfarea.uiRecordLen; if( ulStartRec == 0 && pArea->lpCurTag == NULL ) diff --git a/harbour/src/rdd/dbsql.c b/harbour/src/rdd/dbsql.c index ff6d045e6d..664895e8ea 100644 --- a/harbour/src/rdd/dbsql.c +++ b/harbour/src/rdd/dbsql.c @@ -150,7 +150,7 @@ static HB_BOOL hb_exportBufSqlVar( PHB_FILEBUF pFileBuf, PHB_ITEM pValue, { if( *szVal == *szDelim || *szVal == *szEsc ) hb_addToFBuffer( pFileBuf, *szEsc ); - if( ( UCHAR ) *szVal >= 32 ) + if( ( HB_UCHAR ) *szVal >= 32 ) hb_addToFBuffer( pFileBuf, *szVal ); else { diff --git a/harbour/src/rdd/hbsix/sxcompr.c b/harbour/src/rdd/hbsix/sxcompr.c index 9ea109970c..3b701922c2 100644 --- a/harbour/src/rdd/hbsix/sxcompr.c +++ b/harbour/src/rdd/hbsix/sxcompr.c @@ -156,9 +156,9 @@ /* create compressed item from match position and length */ #define LZSS_ITEM(o, l) ( ( (o) << LENGTHBITS ) | ( (l) - MINLENGTH ) ) /* create low byte of compressed item */ -#define LZSS_ITMLO(o, l) ( ( UCHAR ) (o) ) +#define LZSS_ITMLO(o, l) ( ( HB_UCHAR ) (o) ) /* create high byte of compressed item */ -#define LZSS_ITMHI(o, l) ( ( UCHAR ) ( ( ( (o) >> ( 8 - LENGTHBITS ) ) & ~MATCHMASK ) | \ +#define LZSS_ITMHI(o, l) ( ( HB_UCHAR ) ( ( ( (o) >> ( 8 - LENGTHBITS ) ) & ~MATCHMASK ) | \ ( (l) - MINLENGTH ) ) ) /* maximum size of item set: byte with item type bits plus 8 items */ #define ITEMSETSIZE ( ( ITEMBITS << 3 ) + 1 ) @@ -190,7 +190,7 @@ typedef struct _HB_LZSSX_COMPR HB_BOOL fResult; HB_BOOL fContinue; - UCHAR ring_buffer[ RBUFLENGTH + MAXLENGTH - 1 ]; + HB_UCHAR ring_buffer[ RBUFLENGTH + MAXLENGTH - 1 ]; SHORT match_offset; SHORT match_length; @@ -269,7 +269,7 @@ static HB_BOOL hb_LZSSxFlush( PHB_LZSSX_COMPR pCompr ) return pCompr->fResult; } -static HB_BOOL hb_LZSSxWrite( PHB_LZSSX_COMPR pCompr, UCHAR ucVal ) +static HB_BOOL hb_LZSSxWrite( PHB_LZSSX_COMPR pCompr, HB_UCHAR ucVal ) { if( pCompr->fResult ) { @@ -287,7 +287,7 @@ static HB_BOOL hb_LZSSxWrite( PHB_LZSSX_COMPR pCompr, UCHAR ucVal ) static int hb_LZSSxRead( PHB_LZSSX_COMPR pCompr ) { if( pCompr->inBuffPos < pCompr->inBuffRead ) - return ( UCHAR ) pCompr->inBuffer[ pCompr->inBuffPos++ ]; + return ( HB_UCHAR ) pCompr->inBuffer[ pCompr->inBuffPos++ ]; if( pCompr->hInput != FS_ERROR ) { @@ -295,7 +295,7 @@ static int hb_LZSSxRead( PHB_LZSSX_COMPR pCompr ) pCompr->inBuffSize ); pCompr->inBuffPos = 0; if( pCompr->inBuffPos < pCompr->inBuffRead ) - return ( UCHAR ) pCompr->inBuffer[ pCompr->inBuffPos++ ]; + return ( HB_UCHAR ) pCompr->inBuffer[ pCompr->inBuffPos++ ]; } return -1; } @@ -325,12 +325,12 @@ static HB_BOOL hb_LZSSxDecode( PHB_LZSSX_COMPR pCompr ) if( itemMask & 1 ) /* Is the next character normal byte ? */ { - if( ! hb_LZSSxWrite( pCompr, ( UCHAR ) c ) ) + if( ! hb_LZSSxWrite( pCompr, ( HB_UCHAR ) c ) ) { fResult = HB_FALSE; break; } - pCompr->ring_buffer[ index ] = ( UCHAR ) c; + pCompr->ring_buffer[ index ] = ( HB_UCHAR ) c; index = RBUFINDEX( index + 1 ); } else /* we have an item pair (ring buffer offset : match length) */ @@ -345,7 +345,7 @@ static HB_BOOL hb_LZSSxDecode( PHB_LZSSX_COMPR pCompr ) for( h = 0; h < length; h++ ) { c = pCompr->ring_buffer[ RBUFINDEX( offset + h ) ]; - if( ! hb_LZSSxWrite( pCompr, ( UCHAR ) c ) ) + if( ! hb_LZSSxWrite( pCompr, ( HB_UCHAR ) c ) ) { fResult = HB_FALSE; break; @@ -354,7 +354,7 @@ static HB_BOOL hb_LZSSxDecode( PHB_LZSSX_COMPR pCompr ) overwrite the ring buffer - we have to make exactly the same or our results will be differ when abs( offset - index ) < length */ - pCompr->ring_buffer[ index ] = ( UCHAR ) c; + pCompr->ring_buffer[ index ] = ( HB_UCHAR ) c; index = RBUFINDEX( index + 1 ); } } @@ -369,7 +369,7 @@ static HB_BOOL hb_LZSSxDecode( PHB_LZSSX_COMPR pCompr ) static void hb_LZSSxNodeInsert( PHB_LZSSX_COMPR pCompr, int r ) { int i, p, cmp; - UCHAR *key; + HB_UCHAR * key; cmp = 1; key = &pCompr->ring_buffer[ r ]; @@ -464,8 +464,8 @@ static void hb_LZSSxNodeDelete( PHB_LZSSX_COMPR pCompr, int p ) static HB_SIZE hb_LZSSxEncode( PHB_LZSSX_COMPR pCompr ) { - UCHAR itemSet[ITEMSETSIZE]; - UCHAR itemMask; + HB_UCHAR itemSet[ ITEMSETSIZE ]; + HB_UCHAR itemMask; HB_SIZE ulSize = 0; int iItem; short int i, c, len, r, s, last_match_length; @@ -484,7 +484,7 @@ static HB_SIZE hb_LZSSxEncode( PHB_LZSSX_COMPR pCompr ) { if( ( c = hb_LZSSxRead( pCompr ) ) == -1 ) break; - pCompr->ring_buffer[ r + len ] = ( UCHAR ) c; + pCompr->ring_buffer[ r + len ] = ( HB_UCHAR ) c; } if( len == 0 ) return ulSize; @@ -526,9 +526,9 @@ static HB_SIZE hb_LZSSxEncode( PHB_LZSSX_COMPR pCompr ) ( c = hb_LZSSxRead( pCompr ) ) != -1; i++ ) { hb_LZSSxNodeDelete( pCompr, s ); - pCompr->ring_buffer[ s ] = ( UCHAR ) c; + pCompr->ring_buffer[ s ] = ( HB_UCHAR ) c; if( s < MAXLENGTH - 1 ) - pCompr->ring_buffer[ s + RBUFLENGTH ] = ( UCHAR ) c; + pCompr->ring_buffer[ s + RBUFLENGTH ] = ( HB_UCHAR ) c; s = ( short int ) RBUFINDEX( s + 1 ); r = ( short int ) RBUFINDEX( r + 1 ); hb_LZSSxNodeInsert( pCompr, r ); diff --git a/harbour/src/rdd/hbsix/sxcrypt.c b/harbour/src/rdd/hbsix/sxcrypt.c index 9ebd8c0c15..e253f178df 100644 --- a/harbour/src/rdd/hbsix/sxcrypt.c +++ b/harbour/src/rdd/hbsix/sxcrypt.c @@ -96,15 +96,15 @@ void hb_sxEnCrypt( const char * pSrc, char * pDst, const char * pKeyVal, HB_SIZE { HB_U32 ulSeed; HB_U16 uiKey; - UCHAR ucChar, ucShft; + HB_UCHAR ucChar, ucShft; HB_SIZE ul; int i; ulSeed = hb_sxInitSeed( pKeyVal, &uiKey ); for( ul = 0, i = 0; ul < ulLen; ul++ ) { - ucChar = ( UCHAR ) pSrc[ul]; - ucShft = ( UCHAR ) ( uiKey & 0x07 ); + ucChar = ( HB_UCHAR ) pSrc[ul]; + ucShft = ( HB_UCHAR ) ( uiKey & 0x07 ); pDst[ul] = ( ( ucChar >> ucShft ) + ( ucChar << ( 8 - ucShft ) ) + ( uiKey & 0xFF ) ); ulSeed = hb_sxNextSeed( ulSeed, &pKeyVal[i], &uiKey ); @@ -117,15 +117,15 @@ void hb_sxDeCrypt( const char * pSrc, char * pDst, const char * pKeyVal, HB_SIZE { HB_U32 ulSeed; HB_U16 uiKey; - UCHAR ucChar, ucShft; + HB_UCHAR ucChar, ucShft; HB_SIZE ul; int i; ulSeed = hb_sxInitSeed( pKeyVal, &uiKey ); for( ul = 0, i = 0; ul < ulLen; ul++ ) { - ucChar = ( UCHAR ) pSrc[ul] - ( uiKey & 0xFF ); - ucShft = ( UCHAR ) ( uiKey & 0x07 ); + ucChar = ( HB_UCHAR ) pSrc[ul] - ( uiKey & 0xFF ); + ucShft = ( HB_UCHAR ) ( uiKey & 0x07 ); pDst[ul] = ( ( ucChar << ucShft ) + ( ucChar >> ( 8 - ucShft ) ) ); ulSeed = hb_sxNextSeed( ulSeed, &pKeyVal[i], &uiKey ); if( ++i == 7 ) diff --git a/harbour/src/rdd/hbsix/sxutil.c b/harbour/src/rdd/hbsix/sxutil.c index af9172cf16..3c82b0e9d2 100644 --- a/harbour/src/rdd/hbsix/sxutil.c +++ b/harbour/src/rdd/hbsix/sxutil.c @@ -78,7 +78,7 @@ HB_FUNC( SX_SLIMFAST ) { if( c == ' ' && ulDst && szDst[ulDst - 1] == ' ' ) continue; - c = ( char ) hb_charUpper( ( UCHAR ) c ); + c = ( char ) hb_charUpper( ( HB_UCHAR ) c ); } szDst[ulDst++] = c; } diff --git a/harbour/src/rdd/hsx/hsx.c b/harbour/src/rdd/hsx/hsx.c index fd7a24b2f6..f5be32b6b6 100644 --- a/harbour/src/rdd/hsx/hsx.c +++ b/harbour/src/rdd/hsx/hsx.c @@ -386,7 +386,7 @@ static HB_CRITICAL_NEW( s_hsxMtx ); #endif /* the conversion table for ASCII alpha pairs */ -static const UCHAR hb_hsxHashArray[] = { +static const HB_UCHAR hb_hsxHashArray[] = { /* A B C D E F G H I J K L M N O P Q R S T U W V X Y Z */ /* A */ 7,102,222,185, 19, 48,167, 4,173, 4, 79,251,194,250, 7,187, 7,251,209,249, 41,101, 39, 29, 71, 40, /* B */ 156, 3, 7, 7,149, 7, 7, 7,172, 7, 7,100, 7, 7,148, 7, 7,107, 38, 7,126, 7, 7, 7, 7, 7, @@ -425,8 +425,8 @@ static int hb_hsxHashVal( int c1, int c2, int iKeyBits, if( iFilter == 3 ) { PHB_CODEPAGE cdp = hb_vmCDP(); - c1 = ( UCHAR ) cdp->upper[ c1 ]; - c2 = ( UCHAR ) cdp->upper[ c2 ]; + c1 = ( HB_UCHAR ) cdp->upper[ c1 ]; + c2 = ( HB_UCHAR ) cdp->upper[ c2 ]; } else { @@ -468,18 +468,18 @@ static void hb_hsxHashStr( const char * pStr, ULONG ulLen, BYTE * pKey, int iKey #if 0 /* This code keeps the strict CFTS behavior which stops string manipulating at first chr(0) character */ - if( pStr && ulLen-- && ( c1 = ( UCHAR ) *pStr++ ) != 0 ) + if( pStr && ulLen-- && ( c1 = ( HB_UCHAR ) *pStr++ ) != 0 ) { - while( ulLen-- && ( c2 = ( UCHAR ) *pStr++ ) != 0 ) + while( ulLen-- && ( c2 = ( HB_UCHAR ) *pStr++ ) != 0 ) { #else /* This version can work well with embedded 0 characters */ if( pStr && ulLen-- ) { - c1 = ( UCHAR ) *pStr++; + c1 = ( HB_UCHAR ) *pStr++; while( ulLen-- ) { - c2 = ( UCHAR ) *pStr++; + c2 = ( HB_UCHAR ) *pStr++; #endif iBitNum = hb_hsxHashVal( c1, c2, iKeyBits, fNoCase, iFilter, fUseHash ); if( iBitNum-- ) @@ -495,7 +495,7 @@ static int hb_hsxStrCmp( const char * pSub, ULONG ulSub, const char * pStr, ULON HB_BOOL fNoCase, int iFilter ) { HB_BOOL fResult = HB_FALSE; - UCHAR c1, c2; + HB_UCHAR c1, c2; ULONG ul; if( ulSub == 0 ) @@ -506,15 +506,15 @@ static int hb_hsxStrCmp( const char * pSub, ULONG ulSub, const char * pStr, ULON fResult = HB_TRUE; for( ul = 0; fResult && ul < ulSub; ul++ ) { - c1 = ( UCHAR ) pSub[ ul ]; - c2 = ( UCHAR ) pStr[ ul ]; + c1 = ( HB_UCHAR ) pSub[ ul ]; + c2 = ( HB_UCHAR ) pStr[ ul ]; if( fNoCase ) { if( iFilter == 3 ) { PHB_CODEPAGE cdp = hb_vmCDP(); - c1 = ( UCHAR ) cdp->upper[ c1 ]; - c2 = ( UCHAR ) cdp->upper[ c2 ]; + c1 = ( HB_UCHAR ) cdp->upper[ c1 ]; + c2 = ( HB_UCHAR ) cdp->upper[ c2 ]; } else { diff --git a/harbour/src/rtl/cdpapi.c b/harbour/src/rtl/cdpapi.c index d9b3713af0..119afd24d3 100644 --- a/harbour/src/rtl/cdpapi.c +++ b/harbour/src/rtl/cdpapi.c @@ -698,7 +698,7 @@ HB_SIZE hb_cdpUTF8StringLength( const char * pSrc, HB_SIZE ulLen ) for( ul = ulDst = 0; ul < ulLen; ++ul ) { - if( hb_cdpUTF8ToU16NextChar( ( UCHAR ) pSrc[ ul ], &n, &uc ) ) + if( hb_cdpUTF8ToU16NextChar( ( HB_UCHAR ) pSrc[ ul ], &n, &uc ) ) { if( n == 0 ) ++ulDst; @@ -718,7 +718,7 @@ HB_SIZE hb_cdpUTF8StringPeek( const char * pSrc, HB_SIZE ulLen, HB_SIZE ulPos ) for( ul = 0; ul < ulLen && ulPos; ++ul ) { - if( hb_cdpUTF8ToU16NextChar( ( UCHAR ) pSrc[ ul ], &n, &uc ) ) + if( hb_cdpUTF8ToU16NextChar( ( HB_UCHAR ) pSrc[ ul ], &n, &uc ) ) { if( n == 0 ) --ulPos; @@ -730,7 +730,7 @@ HB_SIZE hb_cdpUTF8StringPeek( const char * pSrc, HB_SIZE ulLen, HB_SIZE ulPos ) n = 0; do { - if( hb_cdpUTF8ToU16NextChar( ( UCHAR ) pSrc[ ul ], &n, &uc ) ) + if( hb_cdpUTF8ToU16NextChar( ( HB_UCHAR ) pSrc[ ul ], &n, &uc ) ) { if( n == 0 ) return uc; @@ -1044,7 +1044,7 @@ HB_WCHAR hb_cdpGetU16( PHB_CODEPAGE cdp, HB_BOOL fCtrl, unsigned char ch ) return ch; } -unsigned char hb_cdpGetChar( PHB_CODEPAGE cdp, HB_BOOL fCtrl, HB_WCHAR wc ) +HB_UCHAR char hb_cdpGetChar( PHB_CODEPAGE cdp, HB_BOOL fCtrl, HB_WCHAR wc ) { if( cdp && ( fCtrl || wc >= 32 ) ) { @@ -1058,7 +1058,7 @@ unsigned char hb_cdpGetChar( PHB_CODEPAGE cdp, HB_BOOL fCtrl, HB_WCHAR wc ) wc = uc; } } - return wc >= 0x100 ? '?' : ( UCHAR ) wc; + return wc >= 0x100 ? '?' : ( HB_UCHAR ) wc; } HB_SIZE hb_cdpStrAsU16Len( PHB_CODEPAGE cdp, HB_BOOL fCtrl, diff --git a/harbour/src/rtl/cdpapihb.c b/harbour/src/rtl/cdpapihb.c index 72421f2ab6..6e62a13c7e 100644 --- a/harbour/src/rtl/cdpapihb.c +++ b/harbour/src/rtl/cdpapihb.c @@ -76,7 +76,7 @@ static HB_SIZE utf8pos( const char * szUTF8, HB_SIZE ulLen, HB_SIZE ulUTF8Pos ) for( ul = ul2 = 0; ul < ulLen; ++ul ) { - if( hb_cdpUTF8ToU16NextChar( ( UCHAR ) szUTF8[ ul ], &n, &uc ) ) + if( hb_cdpUTF8ToU16NextChar( ( HB_UCHAR ) szUTF8[ ul ], &n, &uc ) ) { if( n == 0 ) { diff --git a/harbour/src/rtl/chrasc.c b/harbour/src/rtl/chrasc.c index 9d340e3709..ef11987d3b 100644 --- a/harbour/src/rtl/chrasc.c +++ b/harbour/src/rtl/chrasc.c @@ -84,7 +84,7 @@ HB_FUNC( ASC ) const char * szValue = hb_parc( 1 ); if( szValue ) - hb_retni( ( UCHAR ) szValue[ 0 ] ); + hb_retni( ( HB_UCHAR ) szValue[ 0 ] ); else hb_errRT_BASE_SubstR( EG_ARG, 1107, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); } diff --git a/harbour/src/rtl/dates.c b/harbour/src/rtl/dates.c index 85f9d19db3..41c9f1739e 100644 --- a/harbour/src/rtl/dates.c +++ b/harbour/src/rtl/dates.c @@ -96,10 +96,10 @@ char * hb_dateFormat( const char * szDate, char * szFormattedDate, const char * while( format_count < size ) { - digit = HB_TOUPPER( ( UCHAR ) *szPtr ); + digit = HB_TOUPPER( ( HB_UCHAR ) *szPtr ); szPtr++; digit_count = 1; - while( HB_TOUPPER( ( UCHAR ) *szPtr ) == digit && format_count < size ) + while( HB_TOUPPER( ( HB_UCHAR ) *szPtr ) == digit && format_count < size ) { szPtr++; if( format_count + digit_count < size ) diff --git a/harbour/src/rtl/filesys.c b/harbour/src/rtl/filesys.c index 546b8d683f..e00a163ffb 100644 --- a/harbour/src/rtl/filesys.c +++ b/harbour/src/rtl/filesys.c @@ -2834,14 +2834,14 @@ HB_ERRCODE hb_fsCurDirBuff( int iDrive, char * pszBuffer, HB_SIZE ulSize ) ulLen -= 2; } #endif - if( strchr( HB_OS_PATH_DELIM_CHR_LIST, ( UCHAR ) pszStart[ 0 ] ) ) + if( strchr( HB_OS_PATH_DELIM_CHR_LIST, ( HB_UCHAR ) pszStart[ 0 ] ) ) { pszStart++; ulLen--; } /* Strip the trailing (back)slash if there's one */ - if( ulLen && strchr( HB_OS_PATH_DELIM_CHR_LIST, ( UCHAR ) pszStart[ ulLen - 1 ] ) ) + if( ulLen && strchr( HB_OS_PATH_DELIM_CHR_LIST, ( HB_UCHAR ) pszStart[ ulLen - 1 ] ) ) ulLen--; if( ulLen && pszBuffer != pszStart ) diff --git a/harbour/src/rtl/gtdos/gtdos.c b/harbour/src/rtl/gtdos/gtdos.c index 103399661c..231266cc7f 100644 --- a/harbour/src/rtl/gtdos/gtdos.c +++ b/harbour/src/rtl/gtdos/gtdos.c @@ -138,14 +138,14 @@ #endif #if defined( __WATCOMC__ ) && defined( __386__ ) - #define HB_PEEK_BYTE(s,o) ( *( ( UCHAR * ) ( ( (s) << 4 ) | (o) ) ) ) - #define HB_POKE_BYTE(s,o,b) *( ( UCHAR * ) ( ( (s) << 4 ) | (o) ) ) = (b) + #define HB_PEEK_BYTE(s,o) ( *( ( HB_UCHAR * ) ( ( (s) << 4 ) | (o) ) ) ) + #define HB_POKE_BYTE(s,o,b) *( ( HB_UCHAR * ) ( ( (s) << 4 ) | (o) ) ) = (b) #elif defined( __DJGPP__ ) #define HB_PEEK_BYTE(s,o) _farpeekb( (s), (o) ) #define HB_POKE_BYTE(s,o,b) _farpokeb( (s), (o), (b) ) #else - #define HB_PEEK_BYTE(s,o) ( *( ( UCHAR FAR * ) MK_FP( (s), (o) ) ) ) - #define HB_POKE_BYTE(s,o,b) *( ( UCHAR FAR * ) MK_FP( (s), (o) ) ) = (b) + #define HB_PEEK_BYTE(s,o) ( *( ( HB_UCHAR FAR * ) MK_FP( (s), (o) ) ) ) + #define HB_POKE_BYTE(s,o,b) *( ( HB_UCHAR FAR * ) MK_FP( (s), (o) ) ) = (b) #endif static int s_GtId; @@ -1359,13 +1359,13 @@ static void hb_gt_dos_Refresh( PHB_GT pGT ) #define HB_BIOS_CAPSLOCK 0x40 #define HB_BIOS_INSERT 0x80 -// #define HB_PEEK_BYTE(s,o) ( *( ( UCHAR * ) ( ( (s) << 4 ) | (o) ) ) ) -// #define HB_POKE_BYTE(s,o,b) *( ( UCHAR * ) ( ( (s) << 4 ) | (o) ) ) = (b) +// #define HB_PEEK_BYTE(s,o) ( *( ( HB_UCHAR * ) ( ( (s) << 4 ) | (o) ) ) ) +// #define HB_POKE_BYTE(s,o,b) *( ( HB_UCHAR * ) ( ( (s) << 4 ) | (o) ) ) = (b) static int hb_gt_dos_getKbdState( void ) { int iKbdState = 0; - UCHAR ucStat; + HB_UCHAR ucStat; ucStat = HB_PEEK_BYTE( 0x0040, 0x0017 ); @@ -1382,7 +1382,7 @@ static int hb_gt_dos_getKbdState( void ) static void hb_gt_dos_setKbdState( int iKbdState ) { - UCHAR ucStat = 0; + HB_UCHAR ucStat = 0; ucStat |= ( iKbdState & HB_GTI_KBD_SHIFT ) ? HB_BIOS_SHIFT : 0; ucStat |= ( iKbdState & HB_GTI_KBD_CTRL ) ? HB_BIOS_CTRL : 0; diff --git a/harbour/src/rtl/gttrm/gttrm.c b/harbour/src/rtl/gttrm/gttrm.c index 831ce7e7d7..995546c141 100644 --- a/harbour/src/rtl/gttrm/gttrm.c +++ b/harbour/src/rtl/gttrm/gttrm.c @@ -327,7 +327,7 @@ typedef struct _HB_GTTRM PHB_CODEPAGE cdpIn; HB_BOOL fUTF8; - UCHAR keyTransTbl[ 256 ]; + HB_UCHAR keyTransTbl[ 256 ]; int charmap[ 256 ]; int chrattr[ 256 ]; @@ -1464,7 +1464,7 @@ again: { USHORT uc = 0; n = i = 0; - if( hb_cdpGetFromUTF8( pTerm->cdpIn, HB_FALSE, ( UCHAR ) nKey, &n, &uc ) ) + if( hb_cdpGetFromUTF8( pTerm->cdpIn, HB_FALSE, ( HB_UCHAR ) nKey, &n, &uc ) ) { while( n > 0 ) { diff --git a/harbour/src/rtl/gtwin/gtwin.c b/harbour/src/rtl/gtwin/gtwin.c index 655a763146..5035400f1f 100644 --- a/harbour/src/rtl/gtwin/gtwin.c +++ b/harbour/src/rtl/gtwin/gtwin.c @@ -603,11 +603,11 @@ static void hb_gt_win_xGetScreenContents( PHB_GT pGT, SMALL_RECT * psrWin ) if( uc != '?' ) bAttr |= HB_GT_ATTR_BOX; } - HB_GTSELF_PUTSCRCHAR( pGT, iRow, iCol, ( UCHAR ) s_pCharInfoScreen[ i ].Attributes, + HB_GTSELF_PUTSCRCHAR( pGT, iRow, iCol, ( HB_UCHAR ) s_pCharInfoScreen[ i ].Attributes, bAttr, uc ); #else - HB_GTSELF_PUTSCRCHAR( pGT, iRow, iCol, ( UCHAR ) s_pCharInfoScreen[ i ].Attributes, 0, - s_charTransRev[ ( UCHAR ) s_pCharInfoScreen[ i ].Char.AsciiChar ] ); + HB_GTSELF_PUTSCRCHAR( pGT, iRow, iCol, ( HB_UCHAR ) s_pCharInfoScreen[ i ].Attributes, 0, + s_charTransRev[ ( HB_UCHAR ) s_pCharInfoScreen[ i ].Char.AsciiChar ] ); #endif ++i; } @@ -1818,7 +1818,7 @@ static void hb_gt_win_Redraw( PHB_GT pGT, int iRow, int iCol, int iSize ) #if defined( UNICODE ) s_pCharInfoScreen[ i ].Char.UnicodeChar = hb_cdpGetU16( bAttr & HB_GT_ATTR_BOX ? s_cdpBox : s_cdpHost, - HB_TRUE, ( UCHAR ) usChar ); + HB_TRUE, ( HB_UCHAR ) usChar ); #else s_pCharInfoScreen[ i ].Char.AsciiChar = ( CHAR ) s_charTrans[ usChar & 0xFF ]; #endif diff --git a/harbour/src/rtl/hbhex.c b/harbour/src/rtl/hbhex.c index e9ef44b831..a190ec6665 100644 --- a/harbour/src/rtl/hbhex.c +++ b/harbour/src/rtl/hbhex.c @@ -153,7 +153,7 @@ HB_FUNC( HB_STRTOHEX ) szPtr = szDest = ( char * ) hb_xgrab( ulDest + 1 ); do { - UCHAR uc = ( UCHAR ) *szStr++, ud; + HB_UCHAR uc = ( HB_UCHAR ) *szStr++, ud; ud = uc >> 4; *szPtr++ = ud + ( ud < 10 ? '0' : 'A' - 10 ); ud = uc & 0x0F; diff --git a/harbour/src/rtl/hbi18n1.c b/harbour/src/rtl/hbi18n1.c index fab06d2292..4daef7f273 100644 --- a/harbour/src/rtl/hbi18n1.c +++ b/harbour/src/rtl/hbi18n1.c @@ -149,7 +149,7 @@ static const HB_PLURAL_FORMS s_plural_forms[] = #define HB_PLURAL_FOMRS_COUNT ( sizeof( s_plural_forms ) / sizeof( HB_PLURAL_FORMS ) ) -static const UCHAR s_signature[ 4 ] = { 193, 'H', 'B', 'L' }; +static const HB_UCHAR s_signature[ 4 ] = { 193, 'H', 'B', 'L' }; typedef struct _HB_I18N_TRANS { HB_COUNTER iUsers; diff --git a/harbour/src/rtl/itemseri.c b/harbour/src/rtl/itemseri.c index 2c750eb3df..aeeeecce73 100644 --- a/harbour/src/rtl/itemseri.c +++ b/harbour/src/rtl/itemseri.c @@ -57,7 +57,7 @@ /* -UCHAR [ 1 ] - item type +HB_UCHAR [ 1 ] - item type 0. NIL 0 1. TRUE 0 2. FALSE 0 @@ -157,7 +157,7 @@ typedef struct _HB_CYCLIC_REF static HB_SIZE hb_deserializeItem( PHB_ITEM pItem, PHB_CODEPAGE cdpIn, PHB_CODEPAGE cdpOut, - const UCHAR * pBuffer, HB_SIZE ulOffset, + const HB_UCHAR * pBuffer, HB_SIZE ulOffset, PHB_CYCLIC_REF pRef ); static HB_BOOL hb_itemSerialValueRef( PHB_CYCLIC_REF * pRefPtr, void * value, @@ -427,7 +427,7 @@ static HB_SIZE hb_itemSerialSize( PHB_ITEM pItem, HB_BOOL fNumSize, static HB_SIZE hb_serializeItem( PHB_ITEM pItem, HB_BOOL fNumSize, PHB_CODEPAGE cdpIn, PHB_CODEPAGE cdpOut, - UCHAR * pBuffer, HB_SIZE ulOffset, + HB_UCHAR * pBuffer, HB_SIZE ulOffset, PHB_CYCLIC_REF pRef ) { HB_LONG lVal; @@ -475,7 +475,7 @@ static HB_SIZE hb_serializeItem( PHB_ITEM pItem, HB_BOOL fNumSize, if( HB_LIM_INT8( lVal ) ) { pBuffer[ ulOffset++ ] = HB_SERIAL_INT8NUM; - pBuffer[ ulOffset++ ] = ( UCHAR ) lVal; + pBuffer[ ulOffset++ ] = ( HB_UCHAR ) lVal; } else if( HB_LIM_INT16( lVal ) ) { @@ -501,7 +501,7 @@ static HB_SIZE hb_serializeItem( PHB_ITEM pItem, HB_BOOL fNumSize, HB_PUT_LE_UINT64( &pBuffer[ ulOffset ], lVal ); ulOffset += 8; } - pBuffer[ ulOffset++ ] = ( UCHAR ) iWidth; + pBuffer[ ulOffset++ ] = ( HB_UCHAR ) iWidth; } else if( lVal == 0 ) { @@ -510,7 +510,7 @@ static HB_SIZE hb_serializeItem( PHB_ITEM pItem, HB_BOOL fNumSize, else if( HB_LIM_INT8( lVal ) ) { pBuffer[ ulOffset++ ] = HB_SERIAL_INT8; - pBuffer[ ulOffset++ ] = ( UCHAR ) lVal; + pBuffer[ ulOffset++ ] = ( HB_UCHAR ) lVal; } else if( HB_LIM_INT16( lVal ) ) { @@ -546,8 +546,8 @@ static HB_SIZE hb_serializeItem( PHB_ITEM pItem, HB_BOOL fNumSize, pBuffer[ ulOffset++ ] = HB_SERIAL_DBLNUM; HB_PUT_LE_DOUBLE( &pBuffer[ ulOffset ], d ); ulOffset += 8; - pBuffer[ ulOffset++ ] = ( UCHAR ) iWidth; - pBuffer[ ulOffset++ ] = ( UCHAR ) iDecimal; + pBuffer[ ulOffset++ ] = ( HB_UCHAR ) iWidth; + pBuffer[ ulOffset++ ] = ( HB_UCHAR ) iDecimal; } else if( d == 0.0 ) { @@ -567,7 +567,7 @@ static HB_SIZE hb_serializeItem( PHB_ITEM pItem, HB_BOOL fNumSize, if( ulLen > 0xFF ) ulLen = 0xFF; pBuffer[ ulOffset++ ] = HB_SERIAL_SYMBOL; - pBuffer[ ulOffset++ ] = ( UCHAR ) ulLen; + pBuffer[ ulOffset++ ] = ( HB_UCHAR ) ulLen; memcpy( &pBuffer[ ulOffset ], szVal, ulLen ); ulOffset += ulLen; break; @@ -594,13 +594,13 @@ static HB_SIZE hb_serializeItem( PHB_ITEM pItem, HB_BOOL fNumSize, ulLen -= u; ulSize -= u; pBuffer[ ulOffset++ ] = HB_SERIAL_STRPAD8; - pBuffer[ ulOffset++ ] = ( UCHAR ) ulLen; - pBuffer[ ulOffset++ ] = ( UCHAR ) u; + pBuffer[ ulOffset++ ] = ( HB_UCHAR ) ulLen; + pBuffer[ ulOffset++ ] = ( HB_UCHAR ) u; } else { pBuffer[ ulOffset++ ] = HB_SERIAL_STRING8; - pBuffer[ ulOffset++ ] = ( UCHAR ) ulLen; + pBuffer[ ulOffset++ ] = ( HB_UCHAR ) ulLen; } } else if( ulLen <= UINT16_MAX ) @@ -678,7 +678,7 @@ static HB_SIZE hb_serializeItem( PHB_ITEM pItem, HB_BOOL fNumSize, { pBuffer[ ulOffset++ ] = ulRef == HB_SERIAL_DUMMYOFFSET ? HB_SERIAL_ARRAY8 : HB_SERIAL_ARRAYREF8; - pBuffer[ ulOffset++ ] = ( UCHAR ) ulLen; + pBuffer[ ulOffset++ ] = ( HB_UCHAR ) ulLen; } else if( ulLen <= UINT16_MAX ) { @@ -729,7 +729,7 @@ static HB_SIZE hb_serializeItem( PHB_ITEM pItem, HB_BOOL fNumSize, { pBuffer[ ulOffset++ ] = ulRef == HB_SERIAL_DUMMYOFFSET ? HB_SERIAL_HASH8 : HB_SERIAL_HASHREF8; - pBuffer[ ulOffset++ ] = ( UCHAR ) ulLen; + pBuffer[ ulOffset++ ] = ( HB_UCHAR ) ulLen; } else if( ulLen <= UINT16_MAX ) { @@ -766,7 +766,7 @@ static HB_SIZE hb_serializeItem( PHB_ITEM pItem, HB_BOOL fNumSize, static HB_SIZE hb_deserializeHash( PHB_ITEM pItem, PHB_CODEPAGE cdpIn, PHB_CODEPAGE cdpOut, - const UCHAR * pBuffer, HB_SIZE ulOffset, + const HB_UCHAR * pBuffer, HB_SIZE ulOffset, HB_SIZE ulLen, PHB_CYCLIC_REF pRef ) { hb_hashNew( pItem ); @@ -807,7 +807,7 @@ static HB_SIZE hb_deserializeHash( PHB_ITEM pItem, static HB_SIZE hb_deserializeArray( PHB_ITEM pItem, PHB_CODEPAGE cdpIn, PHB_CODEPAGE cdpOut, - const UCHAR * pBuffer, HB_SIZE ulOffset, + const HB_UCHAR * pBuffer, HB_SIZE ulOffset, HB_SIZE ulLen, PHB_CYCLIC_REF pRef ) { HB_SIZE u; @@ -822,7 +822,7 @@ static HB_SIZE hb_deserializeArray( PHB_ITEM pItem, static HB_SIZE hb_deserializeItem( PHB_ITEM pItem, PHB_CODEPAGE cdpIn, PHB_CODEPAGE cdpOut, - const UCHAR * pBuffer, HB_SIZE ulOffset, + const HB_UCHAR * pBuffer, HB_SIZE ulOffset, PHB_CYCLIC_REF pRef ) { HB_SIZE ulLen, ulPad, ulSize; @@ -1085,10 +1085,10 @@ static HB_SIZE hb_deserializeItem( PHB_ITEM pItem, return ulOffset; } -static HB_BOOL hb_deserializeTest( const UCHAR ** pBufferPtr, HB_SIZE * pulSize, +static HB_BOOL hb_deserializeTest( const HB_UCHAR ** pBufferPtr, HB_SIZE * pulSize, HB_SIZE ulOffset, PHB_CYCLIC_REF * pRefPtr ) { - const UCHAR * pBuffer = * pBufferPtr; + const HB_UCHAR * pBuffer = * pBufferPtr; HB_SIZE ulSize = * pulSize, ulLen = 0; if( ulSize == 0 ) @@ -1282,7 +1282,7 @@ char * hb_itemSerialize( PHB_ITEM pItem, HB_BOOL fNumSize, HB_SIZE *pulSize ) { PHB_CYCLIC_REF pRef = NULL; HB_SIZE ulSize = hb_itemSerialSize( pItem, fNumSize, NULL, NULL, &pRef, 0 ); - UCHAR * pBuffer = ( UCHAR * ) hb_xgrab( ulSize + 1 ); + HB_UCHAR * pBuffer = ( HB_UCHAR * ) hb_xgrab( ulSize + 1 ); hb_itemSerialUnRefFree( &pRef ); hb_serializeItem( pItem, fNumSize, NULL, NULL, pBuffer, 0, pRef ); @@ -1301,7 +1301,7 @@ char * hb_itemSerializeCP( PHB_ITEM pItem, HB_BOOL fNumSize, { PHB_CYCLIC_REF pRef = NULL; HB_SIZE ulSize = hb_itemSerialSize( pItem, fNumSize, cdpIn, cdpOut, &pRef, 0 ); - UCHAR * pBuffer = ( UCHAR * ) hb_xgrab( ulSize + 1 ); + HB_UCHAR * pBuffer = ( HB_UCHAR * ) hb_xgrab( ulSize + 1 ); hb_itemSerialUnRefFree( &pRef ); hb_serializeItem( pItem, fNumSize, cdpIn, cdpOut, pBuffer, 0, pRef ); @@ -1317,10 +1317,10 @@ char * hb_itemSerializeCP( PHB_ITEM pItem, HB_BOOL fNumSize, PHB_ITEM hb_itemDeserialize( const char ** pBufferPtr, HB_SIZE * pulSize ) { PHB_CYCLIC_REF pRef = NULL; - const UCHAR * pBuffer = ( const UCHAR * ) *pBufferPtr; + const HB_UCHAR * pBuffer = ( const HB_UCHAR * ) *pBufferPtr; PHB_ITEM pItem = NULL; - if( !pulSize || hb_deserializeTest( ( const UCHAR ** ) pBufferPtr, pulSize, 0, &pRef ) ) + if( !pulSize || hb_deserializeTest( ( const HB_UCHAR ** ) pBufferPtr, pulSize, 0, &pRef ) ) { pItem = hb_itemNew( NULL ); hb_deserializeItem( pItem, NULL, NULL, pBuffer, 0, pRef ); @@ -1334,10 +1334,10 @@ PHB_ITEM hb_itemDeserializeCP( const char ** pBufferPtr, HB_SIZE * pulSize, PHB_CODEPAGE cdpIn, PHB_CODEPAGE cdpOut ) { PHB_CYCLIC_REF pRef = NULL; - const UCHAR * pBuffer = ( const UCHAR * ) *pBufferPtr; + const HB_UCHAR * pBuffer = ( const HB_UCHAR * ) *pBufferPtr; PHB_ITEM pItem = NULL; - if( !pulSize || hb_deserializeTest( ( const UCHAR ** ) pBufferPtr, pulSize, 0, &pRef ) ) + if( !pulSize || hb_deserializeTest( ( const HB_UCHAR ** ) pBufferPtr, pulSize, 0, &pRef ) ) { pItem = hb_itemNew( NULL ); hb_deserializeItem( pItem, cdpIn, cdpOut, pBuffer, 0, pRef ); diff --git a/harbour/src/rtl/scroll.c b/harbour/src/rtl/scroll.c index 83e49e4157..8f1f4d6f52 100644 --- a/harbour/src/rtl/scroll.c +++ b/harbour/src/rtl/scroll.c @@ -167,7 +167,7 @@ HB_FUNC( HB_SCROLL ) if( HB_ISNUM( 8 ) ) iChar = hb_parni( 8 ); else if( HB_ISCHAR( 8 ) ) - iChar = ( UCHAR ) hb_parc( 8 )[0]; + iChar = ( HB_UCHAR ) hb_parc( 8 )[0]; else iChar = -1; diff --git a/harbour/src/rtl/transfrm.c b/harbour/src/rtl/transfrm.c index 6e7277f277..993394ec7b 100644 --- a/harbour/src/rtl/transfrm.c +++ b/harbour/src/rtl/transfrm.c @@ -558,7 +558,7 @@ HB_FUNC( TRANSFORM ) } else if( cPic == ',' && i && iCount < iWidth ) { - if( HB_ISDIGIT( ( UCHAR ) szResult[ i - 1 ] ) ) + if( HB_ISDIGIT( ( HB_UCHAR ) szResult[ i - 1 ] ) ) szResult[ i ] = ( uiPicFlags & PF_EXCHANG ) ? '.' : ','; else { diff --git a/harbour/src/vm/dynlibhb.c b/harbour/src/vm/dynlibhb.c index fa33553aa7..a0b4533f56 100644 --- a/harbour/src/vm/dynlibhb.c +++ b/harbour/src/vm/dynlibhb.c @@ -120,7 +120,7 @@ HB_FUNC( HB_LIBLOAD ) } #elif defined( HB_OS_OS2 ) { - UCHAR LoadError[ 256 ] = ""; /* Area for load failure information */ + HB_UCHAR LoadError[ 256 ] = ""; /* Area for load failure information */ HMODULE hDynModule; if( DosLoadModule( ( PSZ ) LoadError, sizeof( LoadError ), ( PCSZ ) hb_parc( 1 ), &hDynModule ) == NO_ERROR ) diff --git a/harbour/src/vm/itemapi.c b/harbour/src/vm/itemapi.c index 104df82d13..b58463d1a2 100644 --- a/harbour/src/vm/itemapi.c +++ b/harbour/src/vm/itemapi.c @@ -2097,7 +2097,7 @@ int hb_itemStrCmp( PHB_ITEM pFirst, PHB_ITEM pSecond, HB_BOOL bForceExact ) { if( *szFirst != *szSecond ) { - iRet = ( ( UCHAR ) *szFirst < ( UCHAR ) *szSecond ) ? -1 : 1; + iRet = ( ( HB_UCHAR ) *szFirst < ( HB_UCHAR ) *szSecond ) ? -1 : 1; break; } szFirst++; @@ -2174,8 +2174,8 @@ int hb_itemStrICmp( PHB_ITEM pFirst, PHB_ITEM pSecond, HB_BOOL bForceExact ) { do { - int i1 = HB_TOUPPER( ( UCHAR ) *szFirst ); - int i2 = HB_TOUPPER( ( UCHAR ) *szSecond ); + int i1 = HB_TOUPPER( ( HB_UCHAR ) *szFirst ); + int i2 = HB_TOUPPER( ( HB_UCHAR ) *szSecond ); if( i1 != i2 ) { iRet = ( i1 < i2 ) ? -1 : 1; @@ -2603,7 +2603,7 @@ char * hb_itemString( PHB_ITEM pItem, HB_SIZE * ulLen, HB_BOOL * bFreeReq ) buffer[ --size ] = '\0'; do { - UCHAR uc = ( UCHAR ) ( addr & 0xf ); + HB_UCHAR uc = ( HB_UCHAR ) ( addr & 0xf ); buffer[ --size ] = ( char ) ( uc + ( uc < 10 ? '0' : 'A' - 10 ) ); addr >>= 4; } diff --git a/harbour/src/vm/set.c b/harbour/src/vm/set.c index 5686655aa7..7092563ce5 100644 --- a/harbour/src/vm/set.c +++ b/harbour/src/vm/set.c @@ -127,13 +127,13 @@ static HB_BOOL set_logical( PHB_ITEM pItem, HB_BOOL bDefault ) HB_SIZE ulLen = hb_itemGetCLen( pItem ); if( ulLen >= 2 - && ( ( UCHAR ) szString[ 0 ] == 'O' || ( UCHAR ) szString[ 0 ] == 'o' ) - && ( ( UCHAR ) szString[ 1 ] == 'N' || ( UCHAR ) szString[ 1 ] == 'n' ) ) + && ( ( HB_UCHAR ) szString[ 0 ] == 'O' || ( HB_UCHAR ) szString[ 0 ] == 'o' ) + && ( ( HB_UCHAR ) szString[ 1 ] == 'N' || ( HB_UCHAR ) szString[ 1 ] == 'n' ) ) bLogical = HB_TRUE; else if( ulLen >= 3 - && ( ( UCHAR ) szString[ 0 ] == 'O' || ( UCHAR ) szString[ 0 ] == 'o' ) - && ( ( UCHAR ) szString[ 1 ] == 'F' || ( UCHAR ) szString[ 1 ] == 'f' ) - && ( ( UCHAR ) szString[ 2 ] == 'F' || ( UCHAR ) szString[ 2 ] == 'f' ) ) + && ( ( HB_UCHAR ) szString[ 0 ] == 'O' || ( HB_UCHAR ) szString[ 0 ] == 'o' ) + && ( ( HB_UCHAR ) szString[ 1 ] == 'F' || ( HB_UCHAR ) szString[ 1 ] == 'f' ) + && ( ( HB_UCHAR ) szString[ 2 ] == 'F' || ( HB_UCHAR ) szString[ 2 ] == 'f' ) ) bLogical = HB_FALSE; } } @@ -418,7 +418,7 @@ HB_BOOL hb_setSetCentury( HB_BOOL new_century_setting ) size = strlen( szDateFormat ); for( count = 0; count < size; count++ ) { - digit = HB_TOUPPER( ( UCHAR ) szDateFormat[ count ] ); + digit = HB_TOUPPER( ( HB_UCHAR ) szDateFormat[ count ] ); if( digit == 'Y' ) { if( y_start == -1 )