diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 662184de7c..911cfe9900 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,53 @@ past entries belonging to author(s): Viktor Szakats. */ +2010-02-07 12:48 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) + * contrib/hbbmcdx/bmdbfcdx.c + * contrib/hbbmcdx/hbbmcdx.h + * contrib/hbbtree/hb_btree.h + * contrib/hbbtree/hb_btree.c + * contrib/hbnetio/netiocli.c + * contrib/hbnetio/netiosrv.c + * contrib/rddsql/sddmy/mysqldd.c + * contrib/rddsql/sddpg/pgsqldd.c + * contrib/rddsql/sddfb/fbirddd.c + * contrib/rddsql/sddodbc/odbcdd.c + * contrib/rddsql/hbrddsql.h + * contrib/rddsql/sqlbase.c + * contrib/rddsql/sqlmix.c + * contrib/rddads/adsx.c + * contrib/rddads/ads1.c + * contrib/xhb/bkgtsks.c + * contrib/xhb/hbcrypt.c + * contrib/xhb/dbf2txt.c + * contrib/xhb/xhbcopyf.c + * contrib/xhb/xhbfunc.c + * contrib/xpp/philesx.c + * contrib/hbnf/ftattr.c + * USHORT -> HB_USHORT + + * contrib/xhb/xhbsave.c + * USHORT -> int + + * contrib/xhb/filestat.c + * USHORT -> HB_FATTR + + * contrib/hbmemio/memio.c + * USHORT -> HB_USHORT + * USHORT -> HB_ERRCODE + + * contrib/hbqt/gtqtc/gtqtc.cpp + * contrib/hbqt/gtqtc/gtqtc.h + * USHORT -> int, HB_USHORT + + * contrib/hbnf/fttext.c + * contrib/hbmisc/hb_f.c + + Added "largefile" support. (at least on the low-level) + * USHORT -> HB_USHORT + + * contrib/hbmisc/tests/testhbf.prg + - Deleted old comment. + 2010-02-07 11:49 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) * contrib/hbwin/wapi_wingdi.c * contrib/hbwin/hbwin.ch diff --git a/harbour/contrib/hbbmcdx/bmdbfcdx.c b/harbour/contrib/hbbmcdx/bmdbfcdx.c index 234ec0bdb0..03da3c4a7f 100644 --- a/harbour/contrib/hbbmcdx/bmdbfcdx.c +++ b/harbour/contrib/hbbmcdx/bmdbfcdx.c @@ -362,7 +362,7 @@ static void hb_cdxErrInternal( const char * szMsg ) */ static HB_ERRCODE hb_cdxErrorRT( CDXAREAP pArea, HB_ERRCODE uiGenCode, HB_ERRCODE uiSubCode, const char * filename, HB_ERRCODE uiOsCode, - USHORT uiFlags, PHB_ITEM * pErrorPtr ) + HB_USHORT uiFlags, PHB_ITEM * pErrorPtr ) { PHB_ITEM pError; HB_ERRCODE iRet = HB_FAILURE; @@ -489,7 +489,7 @@ static LPCDXKEY hb_cdxKeyCopy( LPCDXKEY pKeyDest, LPCDXKEY pKey ) /* * store bytes value in inkdex key */ -static LPCDXKEY hb_cdxKeyPut( LPCDXKEY pKey, HB_BYTE * pbVal, USHORT uiLen, ULONG ulRec ) +static LPCDXKEY hb_cdxKeyPut( LPCDXKEY pKey, HB_BYTE * pbVal, HB_USHORT uiLen, ULONG ulRec ) { if( !pKey ) pKey = hb_cdxKeyNew(); @@ -518,9 +518,9 @@ static LPCDXKEY hb_cdxKeyPut( LPCDXKEY pKey, HB_BYTE * pbVal, USHORT uiLen, ULON /* * store string0 value in index key */ -static LPCDXKEY hb_cdxKeyPutC( LPCDXKEY pKey, const char * szText, USHORT uiRealLen, ULONG ulRec ) +static LPCDXKEY hb_cdxKeyPutC( LPCDXKEY pKey, const char * szText, HB_USHORT uiRealLen, ULONG ulRec ) { - USHORT uiLen; + HB_USHORT uiLen; if( !pKey ) pKey = hb_cdxKeyNew(); @@ -533,7 +533,7 @@ static LPCDXKEY hb_cdxKeyPutC( LPCDXKEY pKey, const char * szText, USHORT uiReal pKey->len = 0; } } - uiLen = ( USHORT ) ( szText ? strlen( szText ) : 0 ); + uiLen = ( HB_USHORT ) ( szText ? strlen( szText ) : 0 ); if( uiLen > uiRealLen ) uiLen = uiRealLen; pKey->len = ( HB_BYTE ) uiRealLen; @@ -712,8 +712,8 @@ static LPCDXKEY hb_cdxKeyPutItem( LPCDXKEY pKey, PHB_ITEM pItem, ULONG ulRec, LP ptr = NULL; break; } - pKey = hb_cdxKeyPut( pKey, ptr, ( USHORT ) ulLen, ulRec ); - pKey->mode = ( USHORT ) iMode; + pKey = hb_cdxKeyPut( pKey, ptr, ( HB_USHORT ) ulLen, ulRec ); + pKey->mode = ( HB_USHORT ) iMode; if( pTag->uiType == 'C' ) { if( fTrans ) @@ -922,7 +922,7 @@ static HB_BOOL hb_cdxBottomScope( LPCDXTAG pTag ) /* * clear top or bottom scope */ -static void hb_cdxTagClearScope( LPCDXTAG pTag, USHORT nScope ) +static void hb_cdxTagClearScope( LPCDXTAG pTag, HB_USHORT nScope ) { CDXAREAP pArea = pTag->pIndex->pArea; LPCDXKEY *pScopeKey; @@ -962,7 +962,7 @@ static void hb_cdxTagClearScope( LPCDXTAG pTag, USHORT nScope ) /* * set top or bottom scope */ -static void hb_cdxTagSetScope( LPCDXTAG pTag, USHORT nScope, PHB_ITEM pItem ) +static void hb_cdxTagSetScope( LPCDXTAG pTag, HB_USHORT nScope, PHB_ITEM pItem ) { CDXAREAP pArea = pTag->pIndex->pArea; PHB_ITEM pScopeVal; @@ -1010,7 +1010,7 @@ static void hb_cdxTagSetScope( LPCDXTAG pTag, USHORT nScope, PHB_ITEM pItem ) } } -static void hb_cdxTagGetScope( LPCDXTAG pTag, USHORT nScope, PHB_ITEM pItem ) +static void hb_cdxTagGetScope( LPCDXTAG pTag, HB_USHORT nScope, PHB_ITEM pItem ) { CDXAREAP pArea = pTag->pIndex->pArea; PHB_ITEM *pScope; @@ -1269,7 +1269,7 @@ static void hb_cdxIndexDropAvailPage( LPCDXINDEX pIndex ) * write index page */ static void hb_cdxIndexPageWrite( LPCDXINDEX pIndex, ULONG ulPos, HB_BYTE * pBuffer, - USHORT uiSize ) + HB_USHORT uiSize ) { if( pIndex->fReadonly ) hb_errInternal( 9101, "hb_cdxIndexPageWrite on readonly database.", NULL, NULL ); @@ -1288,7 +1288,7 @@ static void hb_cdxIndexPageWrite( LPCDXINDEX pIndex, ULONG ulPos, HB_BYTE * pBuf * read index page */ static void hb_cdxIndexPageRead( LPCDXINDEX pIndex, ULONG ulPos, HB_BYTE * pBuffer, - USHORT uiSize ) + HB_USHORT uiSize ) { if( pIndex->fShared && !( pIndex->lockRead || pIndex->lockWrite ) ) hb_errInternal( 9103, "hb_cdxIndexPageRead on not locked index file.", NULL, NULL ); @@ -1876,7 +1876,7 @@ static void hb_cdxSetLeafRecord( HB_BYTE *pDst, ULONG ulRec, int iDup, int iTrl, int iReq, int iDCbits, int iTCbits ) { int i; - USHORT usBit; + HB_USHORT usBit; usBit = ( ( iTrl << iDCbits ) | iDup ) << ( 16 - iTCbits - iDCbits ); for( i = 0; i < iReq; i++, ulRec >>= 8 ) @@ -3506,7 +3506,7 @@ static int hb_cdxPageKeyInsert( LPCDXPAGE pPage, LPCDXKEY pKey ) */ static void hb_cdxTagHeaderStore( LPCDXTAG pTag ) { - USHORT uiKeyLen, uiForLen; + HB_USHORT uiKeyLen, uiForLen; CDXTAGHEADER tagHeader; if( !pTag->TagChanged ) @@ -3582,7 +3582,7 @@ static void hb_cdxTagHeaderStore( LPCDXTAG pTag ) static void hb_cdxTagLoad( LPCDXTAG pTag ) { CDXTAGHEADER tagHeader; - USHORT uiForPos, uiForLen, uiKeyPos, uiKeyLen; + HB_USHORT uiForPos, uiForLen, uiKeyPos, uiKeyLen; ULONG ulRecNo; /* read the page from a file */ @@ -4635,7 +4635,7 @@ static void hb_cdxReorderTagList( LPCDXTAG * TagListPtr ) static LPCDXTAG hb_cdxIndexCreateTag( HB_BOOL fStruct, LPCDXINDEX pIndex, const char * szTagName, const char * szKeyExp, PHB_ITEM pKeyItem, - HB_BYTE bType, USHORT uiLen, + HB_BYTE bType, HB_USHORT uiLen, const char * szForExp, PHB_ITEM pForItem, HB_BOOL fAscnd, HB_BOOL fUniq, HB_BOOL fNoCase, HB_BOOL fCustom, HB_BOOL fReindex ) @@ -4755,7 +4755,7 @@ static void hb_cdxIndexDelTag( LPCDXINDEX pIndex, const char * szTagName ) */ static LPCDXTAG hb_cdxIndexAddTag( LPCDXINDEX pIndex, const char * szTagName, const char * szKeyExp, PHB_ITEM pKeyItem, - HB_BYTE bType, USHORT uiLen, + HB_BYTE bType, HB_USHORT uiLen, const char * szForExp, PHB_ITEM pForItem, HB_BOOL fAscend, HB_BOOL fUnique, HB_BOOL fNoCase, HB_BOOL fCustom, HB_BOOL fReindex ) @@ -5105,7 +5105,7 @@ static LPCDXINDEX hb_cdxFindBag( CDXAREAP pArea, const char * szBagName ) /* * get Tag by number */ -static LPCDXTAG hb_cdxGetTagByNumber( CDXAREAP pArea, USHORT uiTag ) +static LPCDXTAG hb_cdxGetTagByNumber( CDXAREAP pArea, HB_USHORT uiTag ) { LPCDXTAG pTag = NULL; LPCDXINDEX pIndex = pArea->lpIndexes; @@ -5126,9 +5126,9 @@ static LPCDXTAG hb_cdxGetTagByNumber( CDXAREAP pArea, USHORT uiTag ) /* * get Tag number */ -static USHORT hb_cdxGetTagNumber( CDXAREAP pArea, LPCDXTAG pFindTag ) +static HB_USHORT hb_cdxGetTagNumber( CDXAREAP pArea, LPCDXTAG pFindTag ) { - USHORT uiTag = 0; + HB_USHORT uiTag = 0; LPCDXTAG pTag = NULL; LPCDXINDEX pIndex = pArea->lpIndexes; @@ -5156,7 +5156,7 @@ static USHORT hb_cdxGetTagNumber( CDXAREAP pArea, LPCDXTAG pFindTag ) * find Tag in tag list */ static LPCDXTAG hb_cdxFindTag( CDXAREAP pArea, PHB_ITEM pTagItem, - PHB_ITEM pBagItem, USHORT *puiTag ) + PHB_ITEM pBagItem, HB_USHORT *puiTag ) { LPCDXTAG pTag = NULL; int iTag = 0, iFind = 0; @@ -7755,7 +7755,7 @@ static HB_ERRCODE hb_cdxOpen( CDXAREAP pArea, LPDBOPENINFO pOpenInfo ) /* * Retrieve the size of the WorkArea structure. */ -static HB_ERRCODE hb_cdxStructSize( CDXAREAP pArea, USHORT * uiSize ) +static HB_ERRCODE hb_cdxStructSize( CDXAREAP pArea, HB_USHORT * uiSize ) { HB_TRACE(HB_TR_DEBUG, ("hb_cdxStrucSize(%p, %p)", pArea, uiSize)); HB_SYMBOL_UNUSED( pArea ); @@ -7819,7 +7819,7 @@ static HB_ERRCODE hb_cdxZap ( CDXAREAP pArea ) /* ( DBENTRYP_VOI ) hb_cdxOrderListAdd */ static HB_ERRCODE hb_cdxOrderListAdd( CDXAREAP pArea, LPDBORDERINFO pOrderInfo ) { - USHORT uiFlags; + HB_USHORT uiFlags; PHB_FILE pFile; char szBaseName[ CDX_MAXTAGNAMELEN + 1 ]; char szFileName[ HB_PATH_MAX ]; @@ -8014,7 +8014,7 @@ static HB_ERRCODE hb_cdxOrderListFocus( CDXAREAP pArea, LPDBORDERINFO pOrderInfo static HB_ERRCODE hb_cdxOrderListRebuild( CDXAREAP pArea ) { LPCDXINDEX pIndex, * pIndexPtr; - USHORT uiPrevTag; + HB_USHORT uiPrevTag; HB_TRACE(HB_TR_DEBUG, ("hb_cdxPack(%p)", pArea )); @@ -8074,7 +8074,7 @@ static HB_ERRCODE hb_cdxOrderCreate( CDXAREAP pArea, LPDBORDERCREATEINFO pOrderI char *szFor = NULL; LPCDXINDEX pIndex; LPCDXTAG pTag; - USHORT uiLen; + HB_USHORT uiLen; HB_BYTE bType; HB_TRACE(HB_TR_DEBUG, ("hb_cdxOrderCreate(%p, %p)", pArea, pOrderInfo)); @@ -8142,7 +8142,7 @@ static HB_ERRCODE hb_cdxOrderCreate( CDXAREAP pArea, LPDBORDERCREATEINFO pOrderI uiLen = 1; break; case 'C': - uiLen = ( USHORT ) hb_itemGetCLen( pResult ); + uiLen = ( HB_USHORT ) hb_itemGetCLen( pResult ); break; default: bType = 'U'; @@ -8424,7 +8424,7 @@ static HB_ERRCODE hb_cdxOrderDestroy( CDXAREAP pArea, LPDBORDERINFO pOrderInfo ) { LPCDXINDEX pIndex, pIndexTmp; LPCDXTAG pTag; - USHORT uiTag; + HB_USHORT uiTag; HB_TRACE(HB_TR_DEBUG, ("hb_cdxOrderDestroy(%p, %p)", pArea, pOrderInfo)); @@ -8492,10 +8492,10 @@ static HB_ERRCODE hb_cdxOrderDestroy( CDXAREAP pArea, LPDBORDERINFO pOrderInfo ) /* * Provides information about order management. */ -static HB_ERRCODE hb_cdxOrderInfo( CDXAREAP pArea, USHORT uiIndex, LPDBORDERINFO pInfo ) +static HB_ERRCODE hb_cdxOrderInfo( CDXAREAP pArea, HB_USHORT uiIndex, LPDBORDERINFO pInfo ) { LPCDXTAG pTag; - USHORT uiTag = 0; + HB_USHORT uiTag = 0; HB_TRACE(HB_TR_DEBUG, ("hb_cdxOrderInfo(%p, %hu, %p)", pArea, uiIndex, pInfo)); @@ -9381,7 +9381,7 @@ static HB_ERRCODE hb_cdxSetFilter( CDXAREAP pArea, LPDBFILTERINFO pFilterInfo ) * Retrieve (set) information about RDD * ( DBENTRYP_RSLV ) hb_fptFieldInfo */ -static HB_ERRCODE hb_cdxRddInfo( LPRDDNODE pRDD, USHORT uiIndex, ULONG ulConnect, PHB_ITEM pItem ) +static HB_ERRCODE hb_cdxRddInfo( LPRDDNODE pRDD, HB_USHORT uiIndex, ULONG ulConnect, PHB_ITEM pItem ) { LPDBFDATA pData; @@ -10132,7 +10132,7 @@ static void hb_cdxTagDoIndex( LPCDXTAG pTag, HB_BOOL fReindex ) } else { - USHORT uiSaveTag = pArea->uiTag; + HB_USHORT uiSaveTag = pArea->uiTag; ULONG ulStartRec = 0, ulNextCount = 0; HB_BOOL fDirectRead, fUseFilter = HB_FALSE; HB_BYTE * pSaveRecBuff = pArea->dbfarea.pRecord, cTemp[8]; @@ -10392,9 +10392,9 @@ HB_FUNC( BMSIXCDX ) {;} HB_FUNC( BMSIXCDX_GETFUNCTABLE ) { RDDFUNCS * pTable; - USHORT * uiCount; + HB_USHORT * uiCount; - uiCount = ( USHORT * ) hb_parptr( 1 ); + uiCount = ( HB_USHORT * ) hb_parptr( 1 ); pTable = ( RDDFUNCS * ) hb_parptr( 2 ); HB_TRACE(HB_TR_DEBUG, ("BMSIXCDX_GETFUNCTABLE(%p, %p)", uiCount, pTable)); @@ -10447,9 +10447,9 @@ HB_FUNC( BMDBFCDX ) {;} HB_FUNC( BMDBFCDX_GETFUNCTABLE ) { RDDFUNCS * pTable; - USHORT * uiCount; + HB_USHORT * uiCount; - uiCount = ( USHORT * ) hb_parptr( 1 ); + uiCount = ( HB_USHORT * ) hb_parptr( 1 ); pTable = ( RDDFUNCS * ) hb_parptr( 2 ); HB_TRACE(HB_TR_DEBUG, ("BMDBFCDX_GETFUNCTABLE(%p, %p)", uiCount, pTable)); diff --git a/harbour/contrib/hbbmcdx/hbbmcdx.h b/harbour/contrib/hbbmcdx/hbbmcdx.h index c54ac5efe6..a4d64c8c2b 100644 --- a/harbour/contrib/hbbmcdx/hbbmcdx.h +++ b/harbour/contrib/hbbmcdx/hbbmcdx.h @@ -135,7 +135,7 @@ HB_EXTERN_BEGIN #define CURKEY_REFRESH(pTag) */ -#define HB_CDXMAXKEY( x ) ( ( USHORT ) ( ( x ) > CDX_MAXKEY ? CDX_MAXKEY : ( x ) ) ) +#define HB_CDXMAXKEY( x ) ( ( HB_USHORT ) ( ( x ) > CDX_MAXKEY ? CDX_MAXKEY : ( x ) ) ) #define HB_CDXBITMASK( x ) ( ( LONG ) ( ( 1L << ( x ) ) - 1 ) ) #define FAST_GOCOLD( A ) SELF_GOCOLD(A) @@ -254,8 +254,8 @@ struct _CDXTAG; /* forward declaration */ typedef struct _CDXKEY { HB_BYTE * val; - USHORT len; - USHORT mode; + HB_USHORT len; + HB_USHORT mode; ULONG rec; } CDXKEY; typedef CDXKEY * LPCDXKEY; @@ -319,44 +319,44 @@ typedef CDXLIST * LPCDXLIST; typedef struct _CDXTAG { - char * szName; /* Name of tag */ - char * KeyExpr; /* a tag key expression as text */ - char * ForExpr; /* a tag for expression as text */ - PHB_ITEM pKeyItem; /* item with a macro pcode for a tag key expression */ - PHB_ITEM pForItem; /* item with a macro pcode for a tag for expression */ - USHORT uiType; /* a type of key expression value */ - USHORT uiLen; /* length of the key expression value */ - USHORT nField; /* Field number for simple (one field) key expersion */ - HB_BYTE bTrail; /* trailing character for shorter key value */ - HB_BYTE OptFlags; /* index options flag */ - HB_BOOL AscendKey; /* ascending/descending order flag */ - HB_BOOL UniqueKey; /* unique order flag */ - HB_BOOL Temporary; /* temporary order flag */ - HB_BOOL Custom; /* custom order flag */ - HB_BOOL Template; /* user keyadata in ordKeyAdd()/ordKeyDel() accepted */ - HB_BOOL MultiKey; /* repeated key values in custom indexes accepted */ - HB_BOOL Partial; /* order is updated only partially - missing keys possible */ - HB_BOOL ChgOnly; /* only existing key modifications are updated, no new key added */ - HB_BOOL UsrAscend; /* user settable ascending/descending order flag */ - HB_BOOL UsrUnique; /* user settable unique order flag */ - HB_BOOL IgnoreCase; /* ignore case (upper keys) */ + char * szName; /* Name of tag */ + char * KeyExpr; /* a tag key expression as text */ + char * ForExpr; /* a tag for expression as text */ + PHB_ITEM pKeyItem; /* item with a macro pcode for a tag key expression */ + PHB_ITEM pForItem; /* item with a macro pcode for a tag for expression */ + HB_USHORT uiType; /* a type of key expression value */ + HB_USHORT uiLen; /* length of the key expression value */ + HB_USHORT nField; /* Field number for simple (one field) key expersion */ + HB_BYTE bTrail; /* trailing character for shorter key value */ + HB_BYTE OptFlags; /* index options flag */ + HB_BOOL AscendKey; /* ascending/descending order flag */ + HB_BOOL UniqueKey; /* unique order flag */ + HB_BOOL Temporary; /* temporary order flag */ + HB_BOOL Custom; /* custom order flag */ + HB_BOOL Template; /* user keyadata in ordKeyAdd()/ordKeyDel() accepted */ + HB_BOOL MultiKey; /* repeated key values in custom indexes accepted */ + HB_BOOL Partial; /* order is updated only partially - missing keys possible */ + HB_BOOL ChgOnly; /* only existing key modifications are updated, no new key added */ + HB_BOOL UsrAscend; /* user settable ascending/descending order flag */ + HB_BOOL UsrUnique; /* user settable unique order flag */ + HB_BOOL IgnoreCase; /* ignore case (upper keys) */ - HB_BOOL TagChanged; - HB_BOOL TagBOF; - HB_BOOL TagEOF; + HB_BOOL TagChanged; + HB_BOOL TagBOF; + HB_BOOL TagEOF; - HB_BOOL fRePos; - int curKeyState; /* see: CDX_CURKEY_* */ - ULONG rawKeyCount; - ULONG rawKeyPos; - ULONG rawKeyRec; - ULONG logKeyCount; - ULONG logKeyPos; - ULONG logKeyRec; + HB_BOOL fRePos; + int curKeyState; /* see: CDX_CURKEY_* */ + ULONG rawKeyCount; + ULONG rawKeyPos; + ULONG rawKeyRec; + ULONG logKeyCount; + ULONG logKeyPos; + ULONG logKeyRec; - ULONG TagBlock; /* a page offset where a tag header is stored */ - ULONG RootBlock; /* a page offset with the root of keys tree */ - USHORT MaxKeys; /* maximum number of keys in Interior node */ + ULONG TagBlock; /* a page offset where a tag header is stored */ + ULONG RootBlock; /* a page offset with the root of keys tree */ + HB_USHORT MaxKeys; /* maximum number of keys in Interior node */ struct _CDXINDEX * pIndex; /* a parent index info */ struct _CDXTAG * pNext; /* pointer to next tag in index */ @@ -468,7 +468,7 @@ typedef struct _CDXAREA HB_BOOL fCdxAppend; /* Appended record changed */ LPCDXINDEX lpIndexes; /* Pointer to indexes array */ - USHORT uiTag; /* current tag focus */ + HB_USHORT uiTag; /* current tag focus */ LPCDXSORTINFO pSort; /* Index build structure */ HB_BYTE * bCdxSortTab; /* Table with storted characters */ @@ -546,7 +546,7 @@ static HB_ERRCODE hb_cdxClose( CDXAREAP pArea ); #define hb_cdxNewArea NULL static HB_ERRCODE hb_cdxOpen( CDXAREAP pArea, LPDBOPENINFO pOpenInfo ); #define hb_cdxRelease NULL -static HB_ERRCODE hb_cdxStructSize( CDXAREAP pArea, USHORT * uiSize ); +static HB_ERRCODE hb_cdxStructSize( CDXAREAP pArea, HB_USHORT * uiSize ); #define hb_cdxSysName NULL #define hb_cdxEval NULL static HB_ERRCODE hb_cdxPack ( CDXAREAP pArea ); @@ -573,7 +573,7 @@ static HB_ERRCODE hb_cdxOrderListRebuild( CDXAREAP pArea ); #define hb_cdxOrderCondition NULL static HB_ERRCODE hb_cdxOrderCreate( CDXAREAP pArea, LPDBORDERCREATEINFO pOrderInfo ); static HB_ERRCODE hb_cdxOrderDestroy( CDXAREAP pArea, LPDBORDERINFO pOrderInfo ); -static HB_ERRCODE hb_cdxOrderInfo( CDXAREAP pArea, USHORT uiIndex, LPDBORDERINFO pOrderInfo ); +static HB_ERRCODE hb_cdxOrderInfo( CDXAREAP pArea, HB_USHORT uiIndex, LPDBORDERINFO pOrderInfo ); static HB_ERRCODE hb_cdxClearFilter( CDXAREAP pArea ); #define hb_cdxClearLocate NULL #define hb_cdxClearScope NULL @@ -603,7 +603,7 @@ static HB_ERRCODE hb_cdxSetFilter( CDXAREAP pArea, LPDBFILTERINFO pFilterInfo ); #define hb_cdxDrop NULL #define hb_cdxExists NULL #define hb_cdxRename NULL -static HB_ERRCODE hb_cdxRddInfo( LPRDDNODE pRDD, USHORT uiIndex, ULONG ulConnect, PHB_ITEM pItem ); +static HB_ERRCODE hb_cdxRddInfo( LPRDDNODE pRDD, HB_USHORT uiIndex, ULONG ulConnect, PHB_ITEM pItem ); #define hb_cdxWhoCares NULL HB_EXTERN_END diff --git a/harbour/contrib/hbbtree/hb_btree.c b/harbour/contrib/hbbtree/hb_btree.c index ec552d9df2..f9a1c54f28 100644 --- a/harbour/contrib/hbbtree/hb_btree.c +++ b/harbour/contrib/hbbtree/hb_btree.c @@ -121,7 +121,7 @@ typedef struct stack_item typedef struct stack_tag { - USHORT usCount; + HB_USHORT usCount; BTreeStackItem items[ 1 ]; } BTreeStack; @@ -192,10 +192,10 @@ struct hb_BTree HB_FHANDLE hFile; ULONG ulRootPage; ULONG ulFreePage; - USHORT usPageSize; - USHORT usKeySize; - USHORT usMaxKeys; - USHORT usMinKeys; + HB_USHORT usPageSize; + HB_USHORT usKeySize; + HB_USHORT usMaxKeys; + HB_USHORT usMinKeys; hb_BTreeFlags_T ulFlags; ULONG ulKeyCount; hb_KeyData_T * pThisKeyData; @@ -218,7 +218,7 @@ static int s_BTree_List_Count = 0; /* forward declarations */ -static USHORT CountGet( struct hb_BTree * pBTree, ULONG ulNode ); +static HB_USHORT CountGet( struct hb_BTree * pBTree, ULONG ulNode ); static hb_KeyData_T *KeyGet( struct hb_BTree * pBTree, ULONG ulNode, int iPosition, hb_KeyData_T *buffer ); static ULONG BranchGet( struct hb_BTree * pBTree, ULONG ulNode, int iPosition ); @@ -227,14 +227,14 @@ static ULONG BranchGet( struct hb_BTree * pBTree, ULONG ulNode, int iPosition ); static void raiseError( ULONG ulGenCode, ULONG ulSubCode, const char * szDescription, const char * szOperation, int uiArguments ) { PHB_ITEM pErr = hb_errRT_New( - ES_ERROR /* USHORT uiSeverity */, + ES_ERROR /* HB_USHORT uiSeverity */, "HB_BTREE" /* const char * szSubSystem */, ulGenCode /* ULONG ulGenCode */, ulSubCode /* ULONG ulSubCode */, szDescription /* const char * szDescription */, szOperation /* const char * szOperation */, - 0 /* USHORT uiOsCode */, - EF_NONE /* USHORT uiFlags */ + 0 /* HB_ERRCODE uiOsCode */, + EF_NONE /* HB_USHORT uiFlags */ ); if ( uiArguments > 0 ) @@ -696,10 +696,10 @@ static void Prune( struct hb_BTree * pBTree, ULONG ulNode ) } } -static USHORT CountGet( struct hb_BTree * pBTree, ULONG ulNode ) +static HB_USHORT CountGet( struct hb_BTree * pBTree, ULONG ulNode ) { READPAGE_IF_NEEDED( pBTree, ulNode ); - return ( USHORT )( *pBTree->ioBuffer->pulPageCount ); + return ( HB_USHORT )( *pBTree->ioBuffer->pulPageCount ); } static void CountSet( struct hb_BTree * pBTree, ULONG ulNode, ULONG newPageCount ) @@ -709,14 +709,14 @@ static void CountSet( struct hb_BTree * pBTree, ULONG ulNode, ULONG newPageCount pBTree->ioBuffer->IsDirty = pBTree->IsDirtyFlagAssignment; } -static USHORT CountAdj( struct hb_BTree * pBTree, ULONG ulNode, LONG adjPageCount ) +static HB_USHORT CountAdj( struct hb_BTree * pBTree, ULONG ulNode, LONG adjPageCount ) { READPAGE_IF_NEEDED( pBTree, ulNode ); *pBTree->ioBuffer->pulPageCount += adjPageCount; pBTree->ioBuffer->IsDirty = pBTree->IsDirtyFlagAssignment; - return ( USHORT )*pBTree->ioBuffer->pulPageCount; + return ( HB_USHORT )*pBTree->ioBuffer->pulPageCount; } static void NodeCopy( struct hb_BTree * pBTree, ULONG toNode, int toPosition, ULONG fromNode, int fromPosition, hb_KeyData_T *buffer ) @@ -1472,7 +1472,7 @@ static int hb_BTstrncmp( const char *s1, const char *s2, size_t n ) } /* allocate hb_BTree structure */ -struct hb_BTree * hb_BTreeNew( const char * FileName, USHORT usPageSize, USHORT usKeySize, ULONG ulFlags, ULONG ulBuffers ) +struct hb_BTree * hb_BTreeNew( const char * FileName, HB_USHORT usPageSize, HB_USHORT usKeySize, ULONG ulFlags, ULONG ulBuffers ) { struct hb_BTree *pBTree = ( struct hb_BTree * ) BufferAlloc( sizeof( struct hb_BTree ) ); int iFileIOmode; @@ -1545,8 +1545,8 @@ struct hb_BTree * hb_BTreeNew( const char * FileName, USHORT usPageSize, USHORT pBTree->ulRootPage = NULLPAGE; pBTree->usPageSize = usPageSize; pBTree->usKeySize = usKeySize; - pBTree->usMaxKeys = ( USHORT ) MAXKEYS( usPageSize, usKeySize, ulFlags ); - pBTree->usMinKeys = ( USHORT ) MINKEYS( pBTree->usMaxKeys ); + pBTree->usMaxKeys = ( HB_USHORT ) MAXKEYS( usPageSize, usKeySize, ulFlags ); + pBTree->usMinKeys = ( HB_USHORT ) MINKEYS( pBTree->usMaxKeys ); pBTree->ulFlags = ulFlags; pBTree->ulKeyCount = 0; pBTree->pStack = NULL; @@ -1743,7 +1743,7 @@ HB_FUNC( HB_BTREENEW ) /* hb_BTreeNew( CHAR cFileName, int nPageSize, int nKeyS ( ( ulFlags & HB_BTREE_INMEMORY ) == HB_BTREE_INMEMORY || ( HB_ISNUM( 3 ) && iKeySize >= 4 && iMinKeys > 0 && iMaxKeys > 2 ) ) && ( 1 == 1 ) ) { - hb_retni( BTree_SetTreeIndex( hb_BTreeNew( hb_parc( 1 ), ( USHORT ) iPageSize, ( USHORT ) iKeySize, ulFlags, hb_parnl( 5 ) ) ) ); + hb_retni( BTree_SetTreeIndex( hb_BTreeNew( hb_parc( 1 ), ( HB_USHORT ) iPageSize, ( HB_USHORT ) iKeySize, ulFlags, hb_parnl( 5 ) ) ) ); } else { diff --git a/harbour/contrib/hbbtree/hb_btree.h b/harbour/contrib/hbbtree/hb_btree.h index c4f8ed25ce..8553bd9aeb 100644 --- a/harbour/contrib/hbbtree/hb_btree.h +++ b/harbour/contrib/hbbtree/hb_btree.h @@ -42,7 +42,7 @@ HB_EXTERN_BEGIN struct hb_BTree; -struct hb_BTree * hb_BTreeNew( const char * FileName, USHORT usPageSize, USHORT usKeySize, ULONG ulFlags, ULONG ulBuffers ); +struct hb_BTree * hb_BTreeNew( const char * FileName, HB_USHORT usPageSize, HB_USHORT usKeySize, ULONG ulFlags, ULONG ulBuffers ); struct hb_BTree *hb_BTreeOpen( const char *FileName, ULONG ulFlags, ULONG ulBuffers ); void hb_BTreeClose( struct hb_BTree * pBTree ); HB_BOOL hb_BTreeInsert( struct hb_BTree * pBTree, const char * szKey, PHB_ITEM pData ); diff --git a/harbour/contrib/hbmemio/memio.c b/harbour/contrib/hbmemio/memio.c index 61725635f1..4de2d8ed0d 100644 --- a/harbour/contrib/hbmemio/memio.c +++ b/harbour/contrib/hbmemio/memio.c @@ -97,7 +97,7 @@ typedef struct _HB_MEMFS_INODE char * szName; unsigned int uiCount; unsigned int uiCountRead, uiCountWrite; - USHORT uiDeny; + HB_USHORT uiDeny; } HB_MEMFS_INODE, * PHB_MEMFS_INODE; @@ -105,7 +105,7 @@ typedef struct _HB_MEMFS_FILE { PHB_MEMFS_INODE pInode; HB_FOFFSET llPos; - USHORT uiFlags; + HB_USHORT uiFlags; } HB_MEMFS_FILE, * PHB_MEMFS_FILE; @@ -121,7 +121,7 @@ typedef struct _HB_MEMFS_FS static HB_MEMFS_FS s_fs; -static USHORT s_error; +static HB_ERRCODE s_error; static HB_CRITICAL_NEW( s_mtx ); @@ -298,7 +298,7 @@ static HB_FHANDLE memfsHandleAlloc( PHB_MEMFS_FILE pFile ) /* ======== Public Memory FS functions ======== */ -HB_MEMFS_EXPORT USHORT hb_memfsError( void ) +HB_MEMFS_EXPORT HB_ERRCODE hb_memfsError( void ) { return s_error; } @@ -364,12 +364,12 @@ HB_MEMFS_EXPORT HB_BOOL hb_memfsRename( const char * szName, const char * szNewN } -HB_MEMFS_EXPORT HB_FHANDLE hb_memfsOpen( const char * szName, USHORT uiFlags ) +HB_MEMFS_EXPORT HB_FHANDLE hb_memfsOpen( const char * szName, HB_USHORT uiFlags ) { PHB_MEMFS_FILE pFile = NULL; HB_FHANDLE hFile; ULONG ulInode; - USHORT uiError = 0; + HB_ERRCODE uiError = 0; /* Recalculate flags. Bit should indicate feature: 1=read, 2=write, 16=denyread, 32=denywrite. @@ -616,7 +616,7 @@ HB_MEMFS_EXPORT HB_BOOL hb_memfsTruncAt( HB_FHANDLE hFile, HB_FOFFSET llOffset ) } -HB_MEMFS_EXPORT HB_FOFFSET hb_memfsSeek( HB_FHANDLE hFile, HB_FOFFSET llOffset, USHORT uiFlags ) +HB_MEMFS_EXPORT HB_FOFFSET hb_memfsSeek( HB_FHANDLE hFile, HB_FOFFSET llOffset, HB_USHORT uiFlags ) { PHB_MEMFS_FILE pFile; PHB_MEMFS_INODE pInode; @@ -727,11 +727,11 @@ static HB_BOOL s_fileRename( const char * szName, const char * szNewName ) } -static PHB_FILE s_fileOpen( const char * szName, const char * szDefExt, USHORT uiExFlags, const char * pPaths, PHB_ITEM pError ) +static PHB_FILE s_fileOpen( const char * szName, const char * szDefExt, HB_USHORT uiExFlags, const char * pPaths, PHB_ITEM pError ) { HB_FHANDLE hFile; char szNameNew[ HB_PATH_MAX + 1 ]; - USHORT uiFlags; + HB_USHORT uiFlags; ULONG ulLen; HB_SYMBOL_UNUSED( pPaths ); @@ -769,7 +769,7 @@ static PHB_FILE s_fileOpen( const char * szName, const char * szDefExt, USHORT u { hb_errPutFileName( pError, szName ); hb_errPutOsCode( pError, hb_memfsError() ); - hb_errPutGenCode( pError, ( USHORT ) ( ( uiExFlags & FXO_TRUNCATE ) ? EG_CREATE : EG_OPEN ) ); + hb_errPutGenCode( pError, ( HB_ERRCODE ) ( ( uiExFlags & FXO_TRUNCATE ) ? EG_CREATE : EG_OPEN ) ); } return NULL; } diff --git a/harbour/contrib/hbmisc/hb_f.c b/harbour/contrib/hbmisc/hb_f.c index e9f9c95788..fb187fac81 100644 --- a/harbour/contrib/hbmisc/hb_f.c +++ b/harbour/contrib/hbmisc/hb_f.c @@ -59,13 +59,13 @@ static long last_rec[ 10 ]; static long recno[ 10 ]; -static long offset[ 10 ]; +static HB_FOFFSET offset[ 10 ]; static HB_FHANDLE handles[ 10 ]; static int area = 0; static char * b; static char * c; -static long last_off[ 10 ]; -static long lastbyte[ 10 ]; +static HB_FOFFSET last_off[ 10 ]; +static HB_FOFFSET lastbyte[ 10 ]; static HB_BOOL isEof[ 10 ]; HB_FUNC( HB_FUSE ) @@ -81,12 +81,12 @@ HB_FUNC( HB_FUSE ) else open_flags = 0; - handles[area] = hb_fsOpen( hb_parc( 1 ), ( USHORT ) open_flags ); + handles[area] = hb_fsOpen( hb_parc( 1 ), ( HB_USHORT ) open_flags ); offset[area] = 0; recno[area] = 1; b = ( char * ) hb_xgrab( b_size ); c = ( char * ) hb_xgrab( c_size ); - lastbyte[area] = hb_fsSeek( handles[ area ], 0L, FS_END ); + lastbyte[area] = hb_fsSeekLarge( handles[ area ], 0, FS_END ); isEof[area] = ( lastbyte[ area ] == 0 ); hb_retnint( handles[ area ] ); } @@ -95,12 +95,12 @@ HB_FUNC( HB_FUSE ) hb_xfree( b ); hb_xfree( c ); hb_retnint( 1 ); - recno[area] = 0L; - offset[area] = 0L; + recno[area] = 0; + offset[area] = 0; handles[area] = 0; - last_rec[area] = 0L; - last_off[area] = 0L; - lastbyte[area] = 0L; + last_rec[area] = 0; + last_off[area] = 0; + lastbyte[area] = 0; isEof[area] = HB_FALSE; } } @@ -122,8 +122,8 @@ static long hb_hbfskip( int recs ) if ( recs > 0 ) { for (y = 0; y < recs; y++ ) { - hb_fsSeek( handles[area], offset[area], FS_SET ); - read_len = hb_fsRead( handles[area], b, b_size ); + hb_fsSeekLarge( handles[area], offset[area], FS_SET ); + read_len = hb_fsReadLarge( handles[area], b, b_size ); for (x = 0; x < read_len; x++ ) { if ( ((*(b + x) == 13) && (*(b + x + 1) == 10)) || ((*(b + x) == 10) && (*(b + x + 1) == 13)) ) { @@ -147,7 +147,7 @@ static long hb_hbfskip( int recs ) return( 1 ); for (y = recs; y > 0; y-- ) { - if ( offset[area] - b_size < 0L ) { + if ( offset[area] - b_size < 0 ) { read_pos = 0; read_len = (size_t)offset[area]; } @@ -156,8 +156,8 @@ static long hb_hbfskip( int recs ) read_len = b_size; } - hb_fsSeek( handles[area], read_pos, FS_SET ); - read_len = hb_fsRead( handles[area], b, ( USHORT )read_len ); + hb_fsSeekLarge( handles[area], read_pos, FS_SET ); + read_len = hb_fsReadLarge( handles[area], b, read_len ); for (x = read_len - 4; x >= 0; x-- ) { if ( ((*(b + x) == 13) && (*(b + x + 1) == 10)) || @@ -189,8 +189,8 @@ HB_FUNC( HB_FREADLN ) int x; long read; - hb_fsSeek( handles[area], offset[area], FS_SET ); - read = hb_fsRead( handles[area], b, b_size ); + hb_fsSeekLarge( handles[area], offset[area], FS_SET ); + read = hb_fsReadLarge( handles[area], b, b_size ); for ( x = 0; x < b_size; x++ ) { if ( ((*(b + x) == 13) && (*(b + x + 1) == 10)) || @@ -237,7 +237,8 @@ HB_FUNC( HB_FGOBOTTOM ) { int x; int len; - long loc, last; + long loc; + HB_FOFFSET last; if ( last_rec[area] != 0 ) { recno[area] = last_rec[area]; @@ -245,12 +246,12 @@ HB_FUNC( HB_FGOBOTTOM ) } else { - loc = 0L; + loc = 0; last = offset[area]; do { - hb_fsSeek( handles[area], offset[area], FS_SET ); - len = hb_fsRead( handles[area], c, c_size ); + hb_fsSeekLarge( handles[area], offset[area], FS_SET ); + len = hb_fsReadLarge( handles[area], c, c_size ); for ( x = 0; x < len; x++ ) { if ( ((*(c + x) == 13) && (*(c + x + 1) == 10)) || ((*(c + x) == 10) && (*(c + x + 1) == 13)) || @@ -272,15 +273,15 @@ HB_FUNC( HB_FGOBOTTOM ) HB_FUNC( HB_FGOTOP ) { - offset[area] = 0L; - recno[area] = 1L; + offset[area] = 0; + recno[area] = 1; isEof[area] = (lastbyte[area] == 0); } HB_FUNC( HB_FLASTREC ) { long old_rec; - long old_offset; + HB_FOFFSET old_offset; HB_BOOL bIsEof; old_rec = recno[area]; @@ -309,8 +310,8 @@ HB_FUNC( HB_FINFO ) /* used for debugging */ hb_storvni( area+1, -1, 1 ); hb_storvni( last_rec[area], -1, 2 ); hb_storvni( recno[area], -1, 3 ); - hb_storvni( offset[area], -1, 4 ); - hb_storvni( lastbyte[area], -1, 5 ); + hb_storvnint( offset[area], -1, 4 ); + hb_storvnint( lastbyte[area], -1, 5 ); hb_storvl( isEof[area], -1, 6 ); } @@ -335,8 +336,8 @@ HB_FUNC( HB_FREADANDSKIP ) long read; HB_BOOL bInField = HB_FALSE, bHasCRLF = HB_FALSE; - hb_fsSeek( handles[area], offset[area], FS_SET ); - read = hb_fsRead( handles[area], b, b_size ); + hb_fsSeekLarge( handles[area], offset[area], FS_SET ); + read = hb_fsReadLarge( handles[area], b, b_size ); while ( x < read ) { diff --git a/harbour/contrib/hbmisc/tests/testhbf.prg b/harbour/contrib/hbmisc/tests/testhbf.prg index a87598180d..e7c201b269 100644 --- a/harbour/contrib/hbmisc/tests/testhbf.prg +++ b/harbour/contrib/hbmisc/tests/testhbf.prg @@ -15,7 +15,6 @@ inplementation of : * hb_fgoto() * hb_fgotop() * hb_fgobottom() -tested with Borland 32bit only */ function main() diff --git a/harbour/contrib/hbnetio/netiocli.c b/harbour/contrib/hbnetio/netiocli.c index 361788e2c4..ec89c48a2f 100644 --- a/harbour/contrib/hbnetio/netiocli.c +++ b/harbour/contrib/hbnetio/netiocli.c @@ -110,7 +110,7 @@ typedef struct _HB_FILE { const HB_FILE_FUNCS * pFuncs; PHB_CONCLI conn; - USHORT fd; + HB_USHORT fd; } HB_FILE; @@ -980,7 +980,7 @@ static HB_BOOL s_fileRename( const char * pszFileName, const char * pszNewName ) } static PHB_FILE s_fileOpen( const char * pFilename, const char * pDefExt, - USHORT uiExFlags, const char * pPaths, + HB_USHORT uiExFlags, const char * pPaths, PHB_ITEM pError ) { PHB_FILE pFile = NULL; @@ -1063,7 +1063,7 @@ static HB_BOOL s_fileLock( PHB_FILE pFile, HB_FOFFSET ulStart, HB_FOFFSET ulLen, HB_PUT_LE_UINT16( &msgbuf[ 4 ], pFile->fd ); HB_PUT_LE_UINT64( &msgbuf[ 6 ], ulStart ); HB_PUT_LE_UINT64( &msgbuf[ 14 ], ulLen ); - HB_PUT_LE_UINT16( &msgbuf[ 22 ], ( USHORT ) iType ); + HB_PUT_LE_UINT16( &msgbuf[ 22 ], ( HB_USHORT ) iType ); #if NETIO_MSGLEN > 24 memset( msgbuf + 24, '\0', sizeof( msgbuf ) - 24 ); #endif diff --git a/harbour/contrib/hbnetio/netiosrv.c b/harbour/contrib/hbnetio/netiosrv.c index 42018d65bb..c12cfb8477 100644 --- a/harbour/contrib/hbnetio/netiosrv.c +++ b/harbour/contrib/hbnetio/netiosrv.c @@ -695,7 +695,7 @@ HB_FUNC( NETIO_SERVER ) long len = 0, size, size2; int iFileNo; HB_U32 uiMsg; - USHORT uiFalgs; + HB_USHORT uiFalgs; char * szExt; PHB_FILE pFile; HB_FOFFSET llOffset, llSize; @@ -1031,7 +1031,7 @@ HB_FUNC( NETIO_SERVER ) if( hb_vmRequestReenter() ) { HB_SIZE ulSize = size - size2; - USHORT uiPCount = 0; + HB_USHORT uiPCount = 0; HB_BOOL fSend = HB_FALSE; data += size2; diff --git a/harbour/contrib/hbnf/ftattr.c b/harbour/contrib/hbnf/ftattr.c index e09e6b1715..09385812a1 100644 --- a/harbour/contrib/hbnf/ftattr.c +++ b/harbour/contrib/hbnf/ftattr.c @@ -204,7 +204,7 @@ HB_FUNC( FT_SAVEATT ) { int iColor; HB_BYTE bAttr; - USHORT usChar; + HB_USHORT usChar; hb_gtGetChar( iTop, iCol, &iColor, &bAttr, &usChar ); *pBuffer++ = ( char ) iColor; ++iCol; @@ -417,7 +417,7 @@ HB_FUNC( FT_RESTATT ) { int iColor; HB_BYTE bAttr; - USHORT usChar; + HB_USHORT usChar; hb_gtGetChar( iTop, iCol, &iColor, &bAttr, &usChar ); iColor = ( HB_UCHAR ) *pAttrib++; hb_gtPutChar( iTop, iCol, iColor, bAttr, usChar ); diff --git a/harbour/contrib/hbnf/fttext.c b/harbour/contrib/hbnf/fttext.c index 90783b386f..9e9aa49b0d 100644 --- a/harbour/contrib/hbnf/fttext.c +++ b/harbour/contrib/hbnf/fttext.c @@ -197,11 +197,11 @@ static HB_BOOL _writeeol( HB_FHANDLE fhnd ); /* arrays used by the text workareas */ static int area = 0; static long recno[ TEXT_WORKAREAS]; -static long offset[ TEXT_WORKAREAS]; +static HB_FOFFSET offset[ TEXT_WORKAREAS]; static HB_FHANDLE handles[ TEXT_WORKAREAS]; static long last_rec[TEXT_WORKAREAS]; -static long last_off[TEXT_WORKAREAS]; -static long lastbyte[TEXT_WORKAREAS]; +static HB_FOFFSET last_off[TEXT_WORKAREAS]; +static HB_FOFFSET lastbyte[TEXT_WORKAREAS]; static HB_BOOL isBof[ TEXT_WORKAREAS]; static HB_BOOL isEof[ TEXT_WORKAREAS]; static HB_ERRCODE error[ TEXT_WORKAREAS]; @@ -218,7 +218,7 @@ HB_FUNC( FTSETINT ) HB_FUNC( FT_FOFFSET ) { - hb_retnl( offset[area] ); + hb_retnint( offset[area] ); } /* standard macros */ @@ -298,18 +298,18 @@ HB_FUNC( FT_FOFFSET ) HB_FUNC( FT_FUSE ) { - int attr = HB_ISNUM( 2 ) ? hb_parni(2) : FO_READWRITE|FO_DENYNONE; + int attr = HB_ISNUM( 2 ) ? hb_parni( 2 ) : FO_READWRITE | FO_DENYNONE; error[area] = 0; if ( HB_ISCHAR(1) ) { - handles[area] = hb_fsOpen( hb_parc(1), ( USHORT ) attr ) ; + handles[area] = hb_fsOpen( hb_parc( 1 ), ( HB_USHORT ) attr ) ; if( handles[area] <= 0 ) error[area] = hb_fsError(); offset[area] = 0 ; recno[area] = 1; - lastbyte[area] = hb_fsSeek( handles[area], 0L, FS_END ); + lastbyte[area] = hb_fsSeekLarge( handles[area], 0, FS_END ); hb_retnint( handles[area] ); } else @@ -721,7 +721,7 @@ static long _ft_skip( long iRecs ) long iSkipped = 0; char * cBuff = ( char * ) hb_xgrab( BUFFSIZE ); - long fpOffset = offset[area]; + HB_FOFFSET fpOffset = offset[area]; isBof[area] = HB_FALSE; isEof[area] = HB_FALSE; @@ -740,7 +740,7 @@ static long _ft_skip( long iRecs ) cPtr = cBuff; /* position file pointer to beginning of current record */ - hb_fsSeek( handles[area], fpOffset, FS_SET ); + hb_fsSeekLarge( handles[area], fpOffset, FS_SET ); /* read a chunk */ iBytesRead = hb_fsRead( handles[area], cBuff, BUFFSIZE ); @@ -797,7 +797,7 @@ static long _ft_skip( long iRecs ) /* buffer was full, so probably not EOF, but maybe CRLF straddled end of buffer, so back up pointer a bit before doing the next read */ - fpOffset = hb_fsSeek( handles[area], 0, FS_RELATIVE ) - 1; + fpOffset = hb_fsSeekLarge( handles[area], 0, FS_RELATIVE ) - 1; iBytesRemaining = 0; } } @@ -817,7 +817,7 @@ static long _ft_skip( long iRecs ) fpOffset = __max( offset[area] - BUFFSIZE, 0L ); /* move file pointer */ - hb_fsSeek( handles[area], fpOffset, FS_SET ); + hb_fsSeekLarge( handles[area], fpOffset, FS_SET ); /* read a chunk */ iBytesRead = @@ -959,7 +959,7 @@ HB_FUNC( FT_FREADLN ) int iBytesRead; char * cPtr = ( char * ) hb_xgrab( BUFFSIZE ); - hb_fsSeek( handles[area], offset[area], FS_SET ); + hb_fsSeekLarge( handles[area], offset[area], FS_SET ); iBytesRead = (int) hb_fsReadLarge( handles[area], cPtr, BUFFSIZE ); error[area] = 0; @@ -1025,10 +1025,10 @@ HB_FUNC( FT_FREADLN ) HB_FUNC( FT_FDELETE ) { int iBytesRead ; - long srcPtr ; - long destPtr ; + HB_FOFFSET srcPtr; + HB_FOFFSET destPtr; long cur_rec = recno[area]; - long cur_off = offset[area]; + HB_FOFFSET cur_off = offset[area]; char * Buff = ( char * ) hb_xgrab( BUFFSIZE ); /* save address to current record ( first record to be deleted ) */ @@ -1036,21 +1036,21 @@ HB_FUNC( FT_FDELETE ) /* skip over deleted records, point to first 'to be retained' record */ _ft_skip( ( HB_ISNUM( 1 ) ? hb_parni( 1 ) : 1 ) ) ; - srcPtr = hb_fsSeek( handles[area], offset[area], FS_SET ); + srcPtr = hb_fsSeekLarge( handles[area], offset[area], FS_SET ); /* buffer read retained data, write atop old data */ do { - hb_fsSeek( handles[area], srcPtr, FS_SET ); + hb_fsSeekLarge( handles[area], srcPtr, FS_SET ); iBytesRead = hb_fsRead( handles[area], Buff , BUFFSIZE ); /* now read in a big glob */ srcPtr += iBytesRead; - hb_fsSeek( handles[area], destPtr, FS_SET ); + hb_fsSeekLarge( handles[area], destPtr, FS_SET ); destPtr += hb_fsWriteLarge( handles[area], Buff, iBytesRead ); } while( iBytesRead > 0 ); /* move DOS EOF marker */ - hb_fsSeek( handles[area], srcPtr, FS_SET ); + hb_fsSeekLarge( handles[area], srcPtr, FS_SET ); hb_fsWrite( handles[area], Buff, 0 ); error[area] = hb_fsError(); @@ -1060,7 +1060,7 @@ HB_FUNC( FT_FDELETE ) offset[area]= cur_off; /* re_calc EOF */ - lastbyte[area] = hb_fsSeek( handles[area], 0L, FS_END ); + lastbyte[area] = hb_fsSeekLarge( handles[area], 0L, FS_END ); _ft_skip( 0 ); /* restore pointers again */ @@ -1223,7 +1223,7 @@ HB_FUNC( FT_FAPPEND ) /* find end of record */ - hb_fsSeek( handles[area], offset[area], FS_SET ); + hb_fsSeekLarge( handles[area], offset[area], FS_SET ); iRead = hb_fsRead( handles[area], buff, BUFFSIZE ); /* now read in a big glob */ /* determine if CRLF pair exists, if not, add one */ @@ -1231,10 +1231,10 @@ HB_FUNC( FT_FAPPEND ) /* get count of chars in this line */ iByteCount = _findeol( buff, iRead ); if( iByteCount == 0 ) - hb_fsSeek( handles[area], 0, FS_END ); + hb_fsSeekLarge( handles[area], 0, FS_END ); else { - offset[area] = hb_fsSeek( handles[area], offset[area] + iByteCount, FS_SET ); + offset[area] = hb_fsSeekLarge( handles[area], offset[area] + iByteCount, FS_SET ); recno[area]++; no_lines--; } @@ -1247,7 +1247,7 @@ HB_FUNC( FT_FAPPEND ) break; } recno[area]++; - offset[area] = hb_fsSeek( handles[area], 0, FS_RELATIVE ); + offset[area] = hb_fsSeekLarge( handles[area], 0, FS_RELATIVE ); /* no_lines--; !Harbour FIX! */ } @@ -1342,7 +1342,7 @@ HB_FUNC( FT_FWRITEL ) /* position file pointer to insertion point */ - hb_fsSeek( handles[area], offset[area], FS_SET ); + hb_fsSeekLarge( handles[area], offset[area], FS_SET ); if( lInsert ) { @@ -1351,7 +1351,7 @@ HB_FUNC( FT_FWRITEL ) if( !err ) { - hb_fsSeek( handles[area], offset[area], FS_SET ); + hb_fsSeekLarge( handles[area], offset[area], FS_SET ); err = _writeLine( theData, iDataLen ); } } @@ -1442,7 +1442,7 @@ HB_FUNC( FT_FWRITEL ) HB_FUNC( FT_FLASTRE ) { long cur_rec; - long cur_offset; + HB_FOFFSET cur_offset; cur_rec = recno[area]; cur_offset = offset[area]; @@ -1810,7 +1810,7 @@ static int _ins_buff( int iLen ) char * ReadBuff = ( char * ) hb_xgrab( BUFFSIZE ); char * WriteBuff = ( char * ) hb_xgrab( BUFFSIZE ); char * SaveBuff; - long fpRead, fpWrite; + HB_FOFFSET fpRead, fpWrite; int WriteLen, ReadLen; int SaveLen; int iLenRemaining = iLen; @@ -1825,7 +1825,7 @@ static int _ins_buff( int iLen ) fpWrite= offset[area] + iLen; /* do initial load of both buffers */ - hb_fsSeek( handles[area], fpRead, FS_SET ); + hb_fsSeekLarge( handles[area], fpRead, FS_SET ); WriteLen = hb_fsRead( handles[area], WriteBuff, BUFFSIZE ); fpRead += WriteLen; @@ -1839,7 +1839,7 @@ static int _ins_buff( int iLen ) while( WriteLen > 0 ) { /* position to beginning of write area */ - if( hb_fsSeek( handles[area], fpWrite, FS_SET ) != (unsigned long) fpWrite ) + if( hb_fsSeekLarge( handles[area], fpWrite, FS_SET ) != (unsigned long) fpWrite ) { error[area] = hb_fsError(); break; @@ -1871,7 +1871,7 @@ static int _ins_buff( int iLen ) WriteLen = ReadLen ; /* return to read area and read another buffer */ - hb_fsSeek( handles[area], fpRead, FS_SET ); + hb_fsSeekLarge( handles[area], fpRead, FS_SET ); ReadLen = hb_fsRead( handles[area], ReadBuff, BUFFSIZE ); fpRead += ReadLen; } @@ -1881,12 +1881,12 @@ static int _ins_buff( int iLen ) } /* store length in bytes, set EOF marker for DOS */ - lastbyte[area] = hb_fsSeek( handles[area], fpWrite, FS_SET ); + lastbyte[area] = hb_fsSeekLarge( handles[area], fpWrite, FS_SET ); hb_fsWrite( handles[area], WriteBuff, 0 ); /* clear last_rec so next gobot will recount the records */ last_rec[area] = 0L; - hb_fsSeek( handles[area], offset[area], FS_SET ); + hb_fsSeekLarge( handles[area], offset[area], FS_SET ); hb_xfree( ( void * ) ReadBuff ); hb_xfree( ( void * ) WriteBuff ); @@ -1902,7 +1902,7 @@ static int _ins_buff( int iLen ) static int _del_buff( int iLen ) { char * WriteBuff = ( char * ) hb_xgrab( BUFFSIZE ); - long fpRead, fpWrite; + HB_FOFFSET fpRead, fpWrite; int WriteLen; int SaveLen; @@ -1911,7 +1911,7 @@ static int _del_buff( int iLen ) fpRead = offset[area] + iLen; /* do initial load of buffer */ - hb_fsSeek( handles[area], fpRead, FS_SET ); + hb_fsSeekLarge( handles[area], fpRead, FS_SET ); WriteLen = hb_fsRead( handles[area], WriteBuff, BUFFSIZE ); fpRead += WriteLen; @@ -1920,7 +1920,7 @@ static int _del_buff( int iLen ) while( WriteLen > 0 ) { /* position to beginning of write area */ - hb_fsSeek( handles[area], fpWrite, FS_SET ); + hb_fsSeekLarge( handles[area], fpWrite, FS_SET ); SaveLen = hb_fsWriteLarge( handles[area], WriteBuff, WriteLen ); /* move write pointer */ @@ -1934,19 +1934,19 @@ static int _del_buff( int iLen ) } /* return to read area and read another buffer */ - hb_fsSeek( handles[area], fpRead, FS_SET ); + hb_fsSeekLarge( handles[area], fpRead, FS_SET ); WriteLen = hb_fsRead( handles[area], WriteBuff, BUFFSIZE ); fpRead += WriteLen; } /* store length in bytes, set EOF marker for DOS */ - lastbyte[area] = hb_fsSeek( handles[area], fpWrite, FS_SET ); + lastbyte[area] = hb_fsSeekLarge( handles[area], fpWrite, FS_SET ); hb_fsWrite( handles[area], WriteBuff, 0 ); /* clear last_rec so next gobot will recount the records */ last_rec[area] = 0L; - hb_fsSeek( handles[area], offset[area], FS_SET ); + hb_fsSeekLarge( handles[area], offset[area], FS_SET ); hb_xfree( ( void * ) WriteBuff ); diff --git a/harbour/contrib/hbqt/gtqtc/gtqtc.cpp b/harbour/contrib/hbqt/gtqtc/gtqtc.cpp index 0d9d6f092e..ea5eceb338 100644 --- a/harbour/contrib/hbqt/gtqtc/gtqtc.cpp +++ b/harbour/contrib/hbqt/gtqtc/gtqtc.cpp @@ -395,8 +395,8 @@ static bool hb_gt_wvt_QSetWindowSize( PHB_GTWVT pWVT, int iRows, int iCols ) { if( HB_GTSELF_RESIZE( pWVT->pGT, iRows, iCols ) ) { - pWVT->ROWS = ( USHORT ) iRows; - pWVT->COLS = ( USHORT ) iCols; + pWVT->ROWS = iRows; + pWVT->COLS = iCols; pWVT->qWnd->_drawingArea->_iROWS = iRows; pWVT->qWnd->_drawingArea->_iCOLS = iCols; @@ -948,7 +948,7 @@ static HB_BOOL hb_gt_wvt_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo ) iVal = hb_itemGetNI( pInfo->pNewVal ); if( iVal > 0 ) { - HB_GTSELF_SETMODE( pGT, ( USHORT ) ( iVal / pWVT->PTEXTSIZE.y() ), pWVT->COLS ); + HB_GTSELF_SETMODE( pGT, ( int ) ( iVal / pWVT->PTEXTSIZE.y() ), pWVT->COLS ); } break; @@ -957,7 +957,7 @@ static HB_BOOL hb_gt_wvt_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo ) iVal = hb_itemGetNI( pInfo->pNewVal ); if( iVal > 0 ) { - HB_GTSELF_SETMODE( pGT, pWVT->ROWS, ( USHORT ) ( iVal / pWVT->PTEXTSIZE.x() ) ); + HB_GTSELF_SETMODE( pGT, pWVT->ROWS, ( int ) ( iVal / pWVT->PTEXTSIZE.x() ) ); } break; @@ -1080,7 +1080,7 @@ static HB_BOOL hb_gt_wvt_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo ) { bool bOldCentre = pWVT->CenterWindow; pWVT->CenterWindow = pWVT->bMaximized ? HB_TRUE : HB_FALSE; - HB_GTSELF_SETMODE( pGT, ( USHORT ) ( iY / pWVT->PTEXTSIZE.y() ), ( USHORT ) ( iX / pWVT->PTEXTSIZE.x() ) ); + HB_GTSELF_SETMODE( pGT, ( int ) ( iY / pWVT->PTEXTSIZE.y() ), ( int ) ( iX / pWVT->PTEXTSIZE.x() ) ); pWVT->CenterWindow = bOldCentre; } } @@ -1400,7 +1400,7 @@ void DrawingArea::copyTextOnClipboard( void ) { int bColor; HB_BYTE bAttr; - USHORT usChar; + HB_USHORT usChar; if( !HB_GTSELF_GETSCRCHAR( pWVT->pGT, irow, icol, &bColor, &bAttr, &usChar ) ) break; @@ -1456,7 +1456,7 @@ void DrawingArea::redrawBuffer( const QRect & rect ) painter.setFont( font ); painter.setBackgroundMode( Qt::OpaqueMode ); - USHORT usChar; + HB_USHORT usChar; int iCol, iRow, len, iTop, startCol; int bColor; HB_BYTE bAttr, bOldAttr = 0; @@ -1581,14 +1581,14 @@ void DrawingArea::displayCell( int iRow, int iCol ) QFont font( _qFont, painter.device() ); painter.setFont( font ); - USHORT usChar; + HB_USHORT usChar; HB_BYTE bAttr; - int bColor = 0; + int iColor = 0; - if( HB_GTSELF_GETSCRCHAR( pGT, iRow, iCol, &bColor, &bAttr, &usChar ) ) + if( HB_GTSELF_GETSCRCHAR( pGT, iRow, iCol, &iColor, &bAttr, &usChar ) ) { - painter.setPen( QPen( _COLORS[ bColor & 0x0F ] ) ); - painter.setBackground( QBrush( _COLORS[ bColor >> 4 ] ) ); + painter.setPen( QPen( _COLORS[ iColor & 0x0F ] ) ); + painter.setBackground( QBrush( _COLORS[ iColor >> 4 ] ) ); painter.drawText( QPoint( iCol*_fontWidth, ( iRow*_fontHeight ) + _fontAscent ), QString( usChar ) ); } /* We need immediate painting */ @@ -2386,7 +2386,7 @@ void MainWindow::setWindowSize( void ) resize( _drawingArea->_wndWidth, _drawingArea->_wndHeight ); } -void DrawingArea::drawBoxCharacter( QPainter *painter, USHORT usChar, int bColor, int x, int y ) +void DrawingArea::drawBoxCharacter( QPainter *painter, HB_USHORT usChar, int iColor, int x, int y ) { /* Common to all drawing operations except characters */ int iGap = 2; @@ -2394,12 +2394,12 @@ void DrawingArea::drawBoxCharacter( QPainter *painter, USHORT usChar, int bColor int iMidX = x + _fontWidth / 2; int iEndY = y + _fontHeight; int iEndX = x + _fontWidth; - int x1,x2,y1,y2; + int x1, x2, y1, y2; - /* painter->setPen( QPen( QBrush( _COLORS[ bColor & 0x0F ] ),1 ) ); */ - painter->setPen( QPen( _COLORS[ bColor & 0x0F ] ) ); - painter->setBackground( QBrush( _COLORS[ ( bColor >> 4 ) & 0x0F ] ) ); - painter->fillRect( x, y, _fontWidth, _fontHeight, QBrush( _COLORS[ ( bColor >> 4 ) & 0x0F ] ) ); + /* painter->setPen( QPen( QBrush( _COLORS[ iColor & 0x0F ] ),1 ) ); */ + painter->setPen( QPen( _COLORS[ iColor & 0x0F ] ) ); + painter->setBackground( QBrush( _COLORS[ ( iColor >> 4 ) & 0x0F ] ) ); + painter->fillRect( x, y, _fontWidth, _fontHeight, QBrush( _COLORS[ ( iColor >> 4 ) & 0x0F ] ) ); switch( usChar ) { @@ -2649,15 +2649,15 @@ void DrawingArea::drawBoxCharacter( QPainter *painter, USHORT usChar, int bColor /* B_THIN B_FAT */ /* --------------------------------------------------------------------- */ case 219: /* Full Column */ - painter->fillRect( x, y, _fontWidth, _fontHeight, _COLORS[ bColor & 0x0F ] ); + painter->fillRect( x, y, _fontWidth, _fontHeight, _COLORS[ iColor & 0x0F ] ); break; case 223: /* Upper Half Column */ - painter->fillRect( x, y, _fontWidth, _fontHeight, _COLORS[ bColor >> 4 ] ); - painter->fillRect( x, y, _fontWidth, _fontWidth, _COLORS[ bColor & 0x0F ] ); + painter->fillRect( x, y, _fontWidth, _fontHeight, _COLORS[ iColor >> 4 ] ); + painter->fillRect( x, y, _fontWidth, _fontWidth, _COLORS[ iColor & 0x0F ] ); break; case 220: /* Lower Half Half Column */ - painter->fillRect( x, y, _fontWidth, _fontHeight, _COLORS[ bColor >> 4 ] ); - painter->fillRect( x, y+_fontHeight-_fontWidth, _fontWidth, _fontWidth, _COLORS[ bColor & 0x0F ] ); + painter->fillRect( x, y, _fontWidth, _fontHeight, _COLORS[ iColor >> 4 ] ); + painter->fillRect( x, y+_fontHeight-_fontWidth, _fontWidth, _fontWidth, _COLORS[ iColor & 0x0F ] ); break; default: painter->drawText( QPoint( x,y+_fontAscent ), QString( usChar ) ); diff --git a/harbour/contrib/hbqt/gtqtc/gtqtc.h b/harbour/contrib/hbqt/gtqtc/gtqtc.h index d911cec1d9..a23ed4b699 100644 --- a/harbour/contrib/hbqt/gtqtc/gtqtc.h +++ b/harbour/contrib/hbqt/gtqtc/gtqtc.h @@ -196,7 +196,7 @@ public: void displayCell( int iRow, int iCol ); void displayBlock( int iRow, int iCol ); void resizeImage( const QSize &newSize ); - void drawBoxCharacter( QPainter *painter, USHORT usChar, int bColor, int x, int y ); + void drawBoxCharacter( QPainter *painter, HB_USHORT usChar, int iColor, int x, int y ); void copyTextOnClipboard( void ); void paintCopyOperation( void ); @@ -281,8 +281,8 @@ typedef struct int iCmdShow; - USHORT ROWS; /* number of displayable rows in window */ - USHORT COLS; /* number of displayable columns in window */ + int ROWS; /* number of displayable rows in window */ + int COLS; /* number of displayable columns in window */ bool CaretExist; /* TRUE if a caret has been created */ bool CaretHidden; /* TRUE if a caret has been hiden */ diff --git a/harbour/contrib/rddads/ads1.c b/harbour/contrib/rddads/ads1.c index 4d6c41962c..cd5f96fd57 100644 --- a/harbour/contrib/rddads/ads1.c +++ b/harbour/contrib/rddads/ads1.c @@ -70,13 +70,13 @@ static int s_iSetListenerHandle = 0; -static USHORT s_uiRddCount = 0; -static USHORT s_uiRddIdADS = ( USHORT ) -1; -static USHORT s_uiRddIdADSADT = ( USHORT ) -1; -static USHORT s_uiRddIdADSNTX = ( USHORT ) -1; -static USHORT s_uiRddIdADSCDX = ( USHORT ) -1; +static HB_USHORT s_uiRddCount = 0; +static HB_USHORT s_uiRddIdADS = ( HB_USHORT ) -1; +static HB_USHORT s_uiRddIdADSADT = ( HB_USHORT ) -1; +static HB_USHORT s_uiRddIdADSNTX = ( HB_USHORT ) -1; +static HB_USHORT s_uiRddIdADSCDX = ( HB_USHORT ) -1; #if ADS_LIB_VERSION >= 900 -static USHORT s_uiRddIdADSVFP = ( USHORT ) -1; +static HB_USHORT s_uiRddIdADSVFP = ( HB_USHORT ) -1; #endif static RDDFUNCS adsSuper; @@ -149,7 +149,7 @@ static void adsSetSend( void ) static HB_ERRCODE commonError( ADSAREAP pArea, HB_ERRCODE errGenCode, HB_ERRCODE errSubCode, HB_ERRCODE errOsCode, const char * szFileName, - USHORT uiFlags, PHB_ITEM * pErrorPtr ) + HB_USHORT uiFlags, PHB_ITEM * pErrorPtr ) { PHB_ITEM pError; HB_ERRCODE errCode = HB_FAILURE; @@ -263,7 +263,7 @@ static HB_BOOL adsIndexKeyCmp( ADSHANDLE hIndex, UNSIGNED8 * pszKey, UNSIGNED16 } -static int adsGetFileType( USHORT uiRddID ) +static int adsGetFileType( HB_USHORT uiRddID ) { if( uiRddID == s_uiRddIdADSCDX ) return ADS_CDX; @@ -492,7 +492,7 @@ static void adsGetKeyItem( ADSAREAP pArea, PHB_ITEM pItem, int iKeyType, } } -static void adsScopeGet( ADSAREAP pArea, ADSHANDLE hOrder, USHORT nScope, PHB_ITEM pItem ) +static void adsScopeGet( ADSAREAP pArea, ADSHANDLE hOrder, HB_USHORT nScope, PHB_ITEM pItem ) { UNSIGNED8 pucScope[ ADS_MAX_KEY_LENGTH + 1 ]; UNSIGNED16 u16Len = ADS_MAX_KEY_LENGTH; @@ -518,7 +518,7 @@ static void adsScopeGet( ADSAREAP pArea, ADSHANDLE hOrder, USHORT nScope, PHB_IT } } -static HB_ERRCODE adsScopeSet( ADSAREAP pArea, ADSHANDLE hOrder, USHORT nScope, PHB_ITEM pItem ) +static HB_ERRCODE adsScopeSet( ADSAREAP pArea, ADSHANDLE hOrder, HB_USHORT nScope, PHB_ITEM pItem ) { HB_TRACE(HB_TR_DEBUG, ("adsScopeSet(%p, %lu, %hu, %p)", pArea, hOrder, nScope, pItem)); @@ -1481,7 +1481,7 @@ static HB_ERRCODE adsAppend( ADSAREAP pArea, HB_BOOL fUnLockAll ) static HB_ERRCODE adsCreateFields( ADSAREAP pArea, PHB_ITEM pStruct ) { - USHORT uiItems, uiCount, uiLen, uiDec; + HB_USHORT uiItems, uiCount, uiLen, uiDec; DBFIELDINFO dbFieldInfo; PHB_ITEM pFieldDesc; const char *szFieldType; @@ -1489,7 +1489,7 @@ static HB_ERRCODE adsCreateFields( ADSAREAP pArea, PHB_ITEM pStruct ) HB_TRACE(HB_TR_DEBUG, ("adsCreateFields(%p, %p)", pArea, pStruct)); - uiItems = ( USHORT ) hb_arrayLen( pStruct ); + uiItems = ( HB_USHORT ) hb_arrayLen( pStruct ); SELF_SETFIELDEXTENT( ( AREAP ) pArea, uiItems ); memset( &dbFieldInfo, 0, sizeof( dbFieldInfo ) ); @@ -1503,11 +1503,11 @@ static HB_ERRCODE adsCreateFields( ADSAREAP pArea, PHB_ITEM pStruct ) iData = hb_arrayGetNI( pFieldDesc, 3 ); if( iData < 0 ) iData = 0; - uiLen = dbFieldInfo.uiLen = ( USHORT ) iData; + uiLen = dbFieldInfo.uiLen = ( HB_USHORT ) iData; iData = hb_arrayGetNI( pFieldDesc, 4 ); if( iData < 0 ) iData = 0; - uiDec = ( USHORT ) iData; + uiDec = ( HB_USHORT ) iData; dbFieldInfo.uiDec = 0; szFieldType = hb_arrayGetCPtr( pFieldDesc, 2 ); iNameLen = strlen( szFieldType ); @@ -1879,7 +1879,7 @@ static HB_ERRCODE adsDeleted( ADSAREAP pArea, HB_BOOL * pDeleted ) return HB_SUCCESS; } -static HB_ERRCODE adsFieldCount( ADSAREAP pArea, USHORT * uiFields ) +static HB_ERRCODE adsFieldCount( ADSAREAP pArea, HB_USHORT * uiFields ) { UNSIGNED16 u16Fields; @@ -1893,7 +1893,7 @@ static HB_ERRCODE adsFieldCount( ADSAREAP pArea, USHORT * uiFields ) #define adsFieldDisplay NULL -static HB_ERRCODE adsFieldInfo( AREAP pArea, USHORT uiIndex, USHORT uiType, PHB_ITEM pItem ) +static HB_ERRCODE adsFieldInfo( AREAP pArea, HB_USHORT uiIndex, HB_USHORT uiType, PHB_ITEM pItem ) { LPFIELD pField; @@ -1993,7 +1993,7 @@ static HB_ERRCODE adsFieldInfo( AREAP pArea, USHORT uiIndex, USHORT uiType, PHB_ return HB_SUCCESS; } -static HB_ERRCODE adsFieldName( ADSAREAP pArea, USHORT uiIndex, void * szName ) +static HB_ERRCODE adsFieldName( ADSAREAP pArea, HB_USHORT uiIndex, void * szName ) { UNSIGNED16 u16Len = pArea->area.uiMaxFieldNameLength + 1; @@ -2054,7 +2054,7 @@ static HB_ERRCODE adsGetRec( ADSAREAP pArea, HB_BYTE ** pBuffer ) return u32Result == AE_SUCCESS ? HB_SUCCESS : HB_FAILURE; } -static HB_ERRCODE adsGetValue( ADSAREAP pArea, USHORT uiIndex, PHB_ITEM pItem ) +static HB_ERRCODE adsGetValue( ADSAREAP pArea, HB_USHORT uiIndex, PHB_ITEM pItem ) { LPFIELD pField; HB_BYTE * pBuffer = pArea->pRecord; @@ -2390,7 +2390,7 @@ static HB_ERRCODE adsGetValue( ADSAREAP pArea, USHORT uiIndex, PHB_ITEM pItem ) return HB_SUCCESS; } -static HB_ERRCODE adsGetVarLen( ADSAREAP pArea, USHORT uiIndex, ULONG * ulLen ) +static HB_ERRCODE adsGetVarLen( ADSAREAP pArea, HB_USHORT uiIndex, ULONG * ulLen ) { LPFIELD pField; @@ -2460,10 +2460,10 @@ static HB_ERRCODE adsPutRec( ADSAREAP pArea, const HB_BYTE * pBuffer ) } -static HB_ERRCODE adsPutValue( ADSAREAP pArea, USHORT uiIndex, PHB_ITEM pItem ) +static HB_ERRCODE adsPutValue( ADSAREAP pArea, HB_USHORT uiIndex, PHB_ITEM pItem ) { LPFIELD pField; - USHORT uiCount; + HB_USHORT uiCount; HB_BYTE * szText; HB_BOOL bTypeError = HB_TRUE; UNSIGNED32 u32RetVal = 0; @@ -2517,7 +2517,7 @@ static HB_ERRCODE adsPutValue( ADSAREAP pArea, USHORT uiIndex, PHB_ITEM pItem ) if( HB_IS_STRING( pItem ) ) { bTypeError = HB_FALSE; - uiCount = ( USHORT ) hb_itemGetCLen( pItem ); + uiCount = ( HB_USHORT ) hb_itemGetCLen( pItem ); if( uiCount > pField->uiLen ) uiCount = pField->uiLen; @@ -2688,7 +2688,7 @@ static HB_ERRCODE adsRecCount( ADSAREAP pArea, ULONG * pRecCount ) return u32Result == AE_SUCCESS ? HB_SUCCESS : HB_FAILURE; } -static HB_ERRCODE adsRecInfo( ADSAREAP pArea, PHB_ITEM pRecID, USHORT uiInfoType, PHB_ITEM pInfo ) +static HB_ERRCODE adsRecInfo( ADSAREAP pArea, PHB_ITEM pRecID, HB_USHORT uiInfoType, PHB_ITEM pInfo ) { ULONG ulRecNo = hb_itemGetNL( pRecID ); HB_ERRCODE uiRetVal = HB_SUCCESS; @@ -2799,7 +2799,7 @@ static HB_ERRCODE adsCreate( ADSAREAP pArea, LPDBOPENINFO pCreateInfo ) UNSIGNED32 uRetVal, u32Length, uiFldLen, uiLen; UNSIGNED8 *ucfieldDefs, *ucfieldPtr; UNSIGNED8 ucBuffer[ MAX_STR_LEN + 1 ]; - USHORT uiCount; + HB_USHORT uiCount; LPFIELD pField; const char * cType; @@ -3030,7 +3030,7 @@ static HB_ERRCODE adsCreate( ADSAREAP pArea, LPDBOPENINFO pCreateInfo ) return SELF_GOTOP( ( AREAP ) pArea ); } -static HB_ERRCODE adsInfo( ADSAREAP pArea, USHORT uiIndex, PHB_ITEM pItem ) +static HB_ERRCODE adsInfo( ADSAREAP pArea, HB_USHORT uiIndex, PHB_ITEM pItem ) { UNSIGNED32 uRetVal; @@ -3223,7 +3223,7 @@ static HB_ERRCODE adsOpen( ADSAREAP pArea, LPDBOPENINFO pOpenInfo ) { ADSHANDLE hTable = 0, hStatement = 0, hConnection; UNSIGNED32 u32RetVal, u32Length; - USHORT uiFields = 0, uiCount; + HB_USHORT uiFields = 0, uiCount; UNSIGNED8 szName[ ADS_MAX_FIELD_NAME + 1 ]; /* See adsGettValue() for why we don't use pArea->area.uiMaxFieldNameLength here */ UNSIGNED16 usBufLen, usType, usDecimals; @@ -3364,7 +3364,7 @@ static HB_ERRCODE adsOpen( ADSAREAP pArea, LPDBOPENINFO pOpenInfo ) dbFieldInfo.atomName = ( char * ) szName; AdsGetFieldType( pArea->hTable, szName, &usType ); AdsGetFieldLength( pArea->hTable, szName, &u32Length ); - dbFieldInfo.uiLen = ( USHORT ) u32Length; + dbFieldInfo.uiLen = ( HB_USHORT ) u32Length; dbFieldInfo.uiDec = 0; dbFieldInfo.uiFlags = 0; if( u32Length > pArea->maxFieldLen ) @@ -3391,26 +3391,26 @@ static HB_ERRCODE adsOpen( ADSAREAP pArea, LPDBOPENINFO pOpenInfo ) case ADS_NUMERIC: dbFieldInfo.uiType = HB_FT_LONG; AdsGetFieldDecimals( pArea->hTable, szName, &usDecimals ); - dbFieldInfo.uiDec = ( USHORT ) usDecimals; + dbFieldInfo.uiDec = ( HB_USHORT ) usDecimals; break; case ADS_DOUBLE: dbFieldInfo.uiType = HB_FT_DOUBLE; AdsGetFieldDecimals( pArea->hTable, szName, &usDecimals ); - dbFieldInfo.uiDec = ( USHORT ) usDecimals; + dbFieldInfo.uiDec = ( HB_USHORT ) usDecimals; break; case ADS_CURDOUBLE: dbFieldInfo.uiType = HB_FT_CURDOUBLE; AdsGetFieldDecimals( pArea->hTable, szName, &usDecimals ); - dbFieldInfo.uiDec = ( USHORT ) usDecimals; + dbFieldInfo.uiDec = ( HB_USHORT ) usDecimals; break; #ifdef ADS_MONEY /* Not defined below 7.00 */ case ADS_MONEY: dbFieldInfo.uiType = HB_FT_CURRENCY; AdsGetFieldDecimals( pArea->hTable, szName, &usDecimals ); - dbFieldInfo.uiDec = ( USHORT ) usDecimals; + dbFieldInfo.uiDec = ( HB_USHORT ) usDecimals; break; #endif @@ -3520,7 +3520,7 @@ static HB_ERRCODE adsOpen( ADSAREAP pArea, LPDBOPENINFO pOpenInfo ) #define adsRelease NULL -static HB_ERRCODE adsStructSize( ADSAREAP pArea, USHORT * StructSize ) +static HB_ERRCODE adsStructSize( ADSAREAP pArea, HB_USHORT * StructSize ) { HB_SYMBOL_UNUSED( pArea ); @@ -3693,7 +3693,7 @@ static HB_ERRCODE adsSetRel( ADSAREAP pArea, LPDBRELINFO lpdbRelations ) { UNSIGNED32 u32RetVal = ( UNSIGNED32 ) ~AE_SUCCESS; UNSIGNED8 *szExp; - USHORT rddID; + HB_USHORT rddID; HB_TRACE(HB_TR_DEBUG, ("adsSetRel(%p, %p)", pArea, lpdbRelations)); @@ -4038,7 +4038,7 @@ static HB_ERRCODE adsOrderDestroy( ADSAREAP pArea, LPDBORDERINFO pOrderInfo ) return HB_SUCCESS; } -static HB_ERRCODE adsOrderInfo( ADSAREAP pArea, USHORT uiIndex, LPDBORDERINFO pOrderInfo ) +static HB_ERRCODE adsOrderInfo( ADSAREAP pArea, HB_USHORT uiIndex, LPDBORDERINFO pOrderInfo ) { ADSHANDLE hIndex = 0; UNSIGNED8 aucBuffer[ MAX_STR_LEN + 1 ]; @@ -4619,7 +4619,7 @@ static HB_ERRCODE adsSetFilter( ADSAREAP pArea, LPDBFILTERINFO pFilterInfo ) #define adsError NULL #define adsEvalBlock NULL -static HB_ERRCODE adsRawLock( ADSAREAP pArea, USHORT uiAction, ULONG ulRecNo ) +static HB_ERRCODE adsRawLock( ADSAREAP pArea, HB_USHORT uiAction, ULONG ulRecNo ) { UNSIGNED32 u32RetVal; HB_TRACE(HB_TR_DEBUG, ("adsRawLock(%p, %hu, %lu)", pArea, uiAction, ulRecNo)); @@ -4687,8 +4687,8 @@ static HB_ERRCODE adsRawLock( ADSAREAP pArea, USHORT uiAction, ULONG ulRecNo ) static HB_ERRCODE adsLock( ADSAREAP pArea, LPDBLOCKINFO pLockInfo ) { - USHORT uiAction; - ULONG ulRecNo; + HB_USHORT uiAction; + ULONG ulRecNo; HB_TRACE(HB_TR_DEBUG, ("adsLock(%p, %p)", pArea, pLockInfo)); @@ -4744,7 +4744,7 @@ static HB_ERRCODE adsUnLock( ADSAREAP pArea, PHB_ITEM pRecNo ) #define adsCloseMemFile NULL #define adsCreateMemFile NULL -static HB_ERRCODE adsGetValueFile( ADSAREAP pArea, USHORT uiIndex, const char * szFile, USHORT uiMode ) +static HB_ERRCODE adsGetValueFile( ADSAREAP pArea, HB_USHORT uiIndex, const char * szFile, HB_USHORT uiMode ) { UNSIGNED32 u32RetVal; @@ -4774,7 +4774,7 @@ static HB_ERRCODE adsGetValueFile( ADSAREAP pArea, USHORT uiIndex, const char * #define adsOpenMemFile NULL -static HB_ERRCODE adsPutValueFile( ADSAREAP pArea, USHORT uiIndex, const char * szFile, USHORT uiMode ) +static HB_ERRCODE adsPutValueFile( ADSAREAP pArea, HB_USHORT uiIndex, const char * szFile, HB_USHORT uiMode ) { UNSIGNED32 u32RetVal; @@ -4980,7 +4980,7 @@ static HB_ERRCODE adsExit( LPRDDNODE pRDD ) } -static HB_ERRCODE adsRddInfo( LPRDDNODE pRDD, USHORT uiIndex, ULONG ulConnect, PHB_ITEM pItem ) +static HB_ERRCODE adsRddInfo( LPRDDNODE pRDD, HB_USHORT uiIndex, ULONG ulConnect, PHB_ITEM pItem ) { HB_TRACE(HB_TR_DEBUG, ("adsRddInfo(%p, %hu, %lu, %p)", pRDD, uiIndex, ulConnect, pItem)); @@ -5132,14 +5132,14 @@ static const RDDFUNCS adsTable = { ( DBENTRYP_BP ) adsBof, ( DBENTRYP_SVP ) adsWhoCares }; -static void adsRegisterRDD( USHORT * pusRddId ) +static void adsRegisterRDD( HB_USHORT * pusRddId ) { RDDFUNCS * pTable; - USHORT * uiCount, uiRddId; + HB_USHORT * uiCount, uiRddId; - uiCount = ( USHORT * ) hb_parptr( 1 ); + uiCount = ( HB_USHORT * ) hb_parptr( 1 ); pTable = ( RDDFUNCS * ) hb_parptr( 2 ); - uiRddId = ( USHORT ) hb_parni( 4 ); + uiRddId = ( HB_USHORT ) hb_parni( 4 ); if( pTable ) { @@ -5265,7 +5265,7 @@ ADSAREAP hb_adsGetWorkAreaPointer( void ) if( pArea ) { - USHORT rddID = pArea->area.rddID; + HB_USHORT rddID = pArea->area.rddID; if( rddID == s_uiRddIdADS || rddID == s_uiRddIdADSADT || diff --git a/harbour/contrib/rddads/adsx.c b/harbour/contrib/rddads/adsx.c index ae13a0f569..200335f5f2 100644 --- a/harbour/contrib/rddads/adsx.c +++ b/harbour/contrib/rddads/adsx.c @@ -95,7 +95,7 @@ typedef struct _MIXTAG PHB_ITEM pKeyItem; PHB_ITEM pForItem; HB_BYTE bType; - USHORT uiLen; + HB_USHORT uiLen; LPMIXKEY* pKeys; ULONG ulRecMax; @@ -119,10 +119,10 @@ typedef struct _ADSXAREA_ -static USHORT s_uiRddIdADSX = ( USHORT ) -1; -static USHORT s_uiRddIdADSNTXX = ( USHORT ) -1; -static USHORT s_uiRddIdADSCDXX = ( USHORT ) -1; -static USHORT s_uiRddIdADSADTX = ( USHORT ) -1; +static HB_USHORT s_uiRddIdADSX = ( HB_USHORT ) -1; +static HB_USHORT s_uiRddIdADSNTXX = ( HB_USHORT ) -1; +static HB_USHORT s_uiRddIdADSCDXX = ( HB_USHORT ) -1; +static HB_USHORT s_uiRddIdADSADTX = ( HB_USHORT ) -1; static RDDFUNCS adsxSuper; @@ -133,7 +133,7 @@ static RDDFUNCS adsxSuper; static HB_ERRCODE hb_mixErrorRT( ADSXAREAP pArea, HB_ERRCODE errGenCode, HB_ERRCODE errSubCode, char* filename, HB_ERRCODE errOsCode, - USHORT uiFlags ) + HB_USHORT uiFlags ) { PHB_ITEM pError; HB_ERRCODE iRet = HB_FAILURE; @@ -178,7 +178,7 @@ static HB_ERRCODE hb_adsUpdateAreaFlags( ADSXAREAP pArea ) * Memory Index *************************************************************************/ -static LPMIXKEY mixKeyNew( PHB_ITEM pItem, ULONG ulRecNo, HB_BYTE bType, USHORT uiLen ) +static LPMIXKEY mixKeyNew( PHB_ITEM pItem, ULONG ulRecNo, HB_BYTE bType, HB_USHORT uiLen ) { LPMIXKEY pKey; ULONG ul; @@ -277,7 +277,7 @@ static void mixKeyFree( LPMIXKEY pKey ) } -static int mixQSortCompare( LPMIXKEY p1, LPMIXKEY p2, USHORT uiLen, PHB_CODEPAGE pCodepage ) +static int mixQSortCompare( LPMIXKEY p1, LPMIXKEY p2, HB_USHORT uiLen, PHB_CODEPAGE pCodepage ) { int i; @@ -306,7 +306,7 @@ static int mixQSortCompare( LPMIXKEY p1, LPMIXKEY p2, USHORT uiLen, PHB_CODEPAGE } -static void mixQSort( LPMIXKEY* pKeys, ULONG left, ULONG right, USHORT uiLen, PHB_CODEPAGE pCodepage ) +static void mixQSort( LPMIXKEY* pKeys, ULONG left, ULONG right, HB_USHORT uiLen, PHB_CODEPAGE pCodepage ) { ULONG l, r; LPMIXKEY x, h; @@ -387,7 +387,7 @@ static int mixCompareKey( LPMIXTAG pTag, ULONG ulKeyPos, LPMIXKEY pKey ) static LPMIXTAG mixTagCreate( const char * szTagName, PHB_ITEM pKeyExpr, PHB_ITEM pKeyItem, PHB_ITEM pForItem, PHB_ITEM pWhileItem, HB_BYTE bType, - USHORT uiLen, ADSXAREAP pArea ) + HB_USHORT uiLen, ADSXAREAP pArea ) { LPMIXTAG pTag; LPMIXKEY pKey; @@ -832,7 +832,7 @@ static HB_ERRCODE adsxOpen( ADSXAREAP pArea, LPDBOPENINFO pOpenInfo ) } -static HB_ERRCODE adsxStructSize( ADSXAREAP pArea, USHORT* StructSize ) +static HB_ERRCODE adsxStructSize( ADSXAREAP pArea, HB_USHORT* StructSize ) { HB_SYMBOL_UNUSED( pArea ); @@ -872,7 +872,7 @@ static HB_ERRCODE adsxOrderCreate( ADSXAREAP pArea, LPDBORDERCREATEINFO pOrderIn LPMIXTAG pTagNew, pTag; PHB_ITEM pKeyItem, pForItem = NULL, pWhileItem = NULL, pResult; ULONG ulRecNo; - USHORT uiLen; + HB_USHORT uiLen; HB_BYTE bType; UNSIGNED16 bValidExpr; HB_BOOL bUseADS; @@ -946,7 +946,7 @@ static HB_ERRCODE adsxOrderCreate( ADSXAREAP pArea, LPDBORDERCREATEINFO pOrderIn case HB_IT_STRING: case HB_IT_STRING | HB_IT_MEMO: bType = 'C'; - uiLen = ( USHORT ) hb_itemGetCLen( pResult ); + uiLen = ( HB_USHORT ) hb_itemGetCLen( pResult ); if( uiLen > MIX_MAXKEYLEN ) uiLen = MIX_MAXKEYLEN; break; @@ -1114,7 +1114,7 @@ static HB_ERRCODE adsxOrderDestroy( ADSXAREAP pArea, LPDBORDERINFO pOrderInfo ) } -static HB_ERRCODE adsxOrderInfo( ADSXAREAP pArea, USHORT uiIndex, LPDBORDERINFO pOrderInfo ) +static HB_ERRCODE adsxOrderInfo( ADSXAREAP pArea, HB_USHORT uiIndex, LPDBORDERINFO pOrderInfo ) { LPMIXTAG pTag = pArea->pTagCurrent; @@ -1408,15 +1408,15 @@ static RDDFUNCS adsxTable = { NULL, NULL }; -static void adsxRegisterRDD( USHORT * pusRddId, const char * szRddName ) +static void adsxRegisterRDD( HB_USHORT * pusRddId, const char * szRddName ) { RDDFUNCS * pTable; - USHORT * uiCount, uiRddId; + HB_USHORT * uiCount, uiRddId; - uiCount = ( USHORT * ) hb_itemGetPtr( hb_param( 1, HB_IT_POINTER ) ); + uiCount = ( HB_USHORT * ) hb_itemGetPtr( hb_param( 1, HB_IT_POINTER ) ); * uiCount = RDDFUNCSCOUNT; pTable = ( RDDFUNCS * ) hb_itemGetPtr( hb_param( 2, HB_IT_POINTER ) ); - uiRddId = ( USHORT ) hb_parni( 4 ); + uiRddId = ( HB_USHORT ) hb_parni( 4 ); if( pTable ) { diff --git a/harbour/contrib/rddsql/hbrddsql.h b/harbour/contrib/rddsql/hbrddsql.h index 7357a80f48..7e2c458aba 100644 --- a/harbour/contrib/rddsql/hbrddsql.h +++ b/harbour/contrib/rddsql/hbrddsql.h @@ -220,8 +220,8 @@ typedef HB_ERRCODE (* SDDFUNC_EXECUTE )( SQLDDCONNECTION * pConnection, PHB_I typedef HB_ERRCODE (* SDDFUNC_OPEN )( SQLBASEAREAP pArea ); typedef HB_ERRCODE (* SDDFUNC_CLOSE )( SQLBASEAREAP pArea ); typedef HB_ERRCODE (* SDDFUNC_GOTO )( SQLBASEAREAP pArea, ULONG ulRecNo ); -typedef HB_ERRCODE (* SDDFUNC_GETVALUE )( SQLBASEAREAP pArea, USHORT uiIndex, PHB_ITEM pItem ); -typedef HB_ERRCODE (* SDDFUNC_GETVARLEN )( SQLBASEAREAP pArea, USHORT uiIndex, ULONG * pLength ); +typedef HB_ERRCODE (* SDDFUNC_GETVALUE )( SQLBASEAREAP pArea, HB_USHORT uiIndex, PHB_ITEM pItem ); +typedef HB_ERRCODE (* SDDFUNC_GETVARLEN )( SQLBASEAREAP pArea, HB_USHORT uiIndex, ULONG * pLength ); typedef struct _SDDNODE diff --git a/harbour/contrib/rddsql/sddfb/fbirddd.c b/harbour/contrib/rddsql/sddfb/fbirddd.c index 957d0b3b56..bb83eae6f0 100644 --- a/harbour/contrib/rddsql/sddfb/fbirddd.c +++ b/harbour/contrib/rddsql/sddfb/fbirddd.c @@ -125,9 +125,9 @@ HB_CALL_ON_STARTUP_END( _hb_firebirddd_init_ ) /* ===================================================================================== */ -static USHORT hb_errRT_FireBirdDD( HB_ERRCODE errGenCode, HB_ERRCODE errSubCode, const char * szDescription, const char * szOperation, HB_ERRCODE errOsCode ) +static HB_USHORT hb_errRT_FireBirdDD( HB_ERRCODE errGenCode, HB_ERRCODE errSubCode, const char * szDescription, const char * szOperation, HB_ERRCODE errOsCode ) { - USHORT uiAction; + HB_USHORT uiAction; PHB_ITEM pError; pError = hb_errRT_New( ES_ERROR, "SDDFB", errGenCode, errSubCode, szDescription, szOperation, errOsCode, EF_NONE ); @@ -202,7 +202,7 @@ static HB_ERRCODE fbOpen( SQLBASEAREAP pArea ) DBFIELDINFO pFieldInfo; HB_BOOL bError; char* pBuffer; - USHORT uiFields, uiCount; + HB_USHORT uiFields, uiCount; int iType; @@ -446,7 +446,7 @@ static HB_ERRCODE fbGoTo( SQLBASEAREAP pArea, ULONG ulRecNo ) ISC_STATUS status[ 5 ]; XSQLVAR* pVar; PHB_ITEM pItem, pArray; - USHORT ui; + HB_USHORT ui; ISC_STATUS lErr; short iType; diff --git a/harbour/contrib/rddsql/sddmy/mysqldd.c b/harbour/contrib/rddsql/sddmy/mysqldd.c index 5df7762992..8c37a26008 100644 --- a/harbour/contrib/rddsql/sddmy/mysqldd.c +++ b/harbour/contrib/rddsql/sddmy/mysqldd.c @@ -77,7 +77,7 @@ static HB_ERRCODE mysqlExecute( SQLDDCONNECTION * pConnection, PHB_ITEM pItem ); static HB_ERRCODE mysqlOpen( SQLBASEAREAP pArea ); static HB_ERRCODE mysqlClose( SQLBASEAREAP pArea ); static HB_ERRCODE mysqlGoTo( SQLBASEAREAP pArea, ULONG ulRecNo ); -static HB_ERRCODE mysqlGetValue( SQLBASEAREAP pArea, USHORT uiIndex, PHB_ITEM pItem ); +static HB_ERRCODE mysqlGetValue( SQLBASEAREAP pArea, HB_USHORT uiIndex, PHB_ITEM pItem ); static SDDNODE mysqldd = @@ -131,9 +131,9 @@ HB_CALL_ON_STARTUP_END( _hb_mysqldd_init_ ) /*=====================================================================================*/ -static USHORT hb_errRT_MySQLDD( HB_ERRCODE errGenCode, HB_ERRCODE errSubCode, const char * szDescription, const char * szOperation, HB_ERRCODE errOsCode ) +static HB_USHORT hb_errRT_MySQLDD( HB_ERRCODE errGenCode, HB_ERRCODE errSubCode, const char * szDescription, const char * szOperation, HB_ERRCODE errOsCode ) { - USHORT uiAction; + HB_USHORT uiAction; PHB_ITEM pError; pError = hb_errRT_New( ES_ERROR, "SDDMY", errGenCode, errSubCode, szDescription, szOperation, errOsCode, EF_NONE ); @@ -214,7 +214,7 @@ static HB_ERRCODE mysqlOpen( SQLBASEAREAP pArea ) { PHB_ITEM pItemEof, pItem; ULONG ulIndex; - USHORT uiFields, uiCount; + HB_USHORT uiFields, uiCount; HB_ERRCODE errCode = 0; HB_BOOL bError; char * pBuffer; @@ -236,7 +236,7 @@ static HB_ERRCODE mysqlOpen( SQLBASEAREAP pArea ) return HB_FAILURE; } - uiFields = ( USHORT ) mysql_num_fields( ( MYSQL_RES * ) pArea->pResult ); + uiFields = ( HB_USHORT ) mysql_num_fields( ( MYSQL_RES * ) pArea->pResult ); SELF_SETFIELDEXTENT( ( AREAP ) pArea, uiFields ); pItemEof = hb_itemArrayNew( uiFields ); @@ -253,7 +253,7 @@ static HB_ERRCODE mysqlOpen( SQLBASEAREAP pArea ) hb_strUpper( pBuffer, MAX_FIELD_NAME + 1 ); pFieldInfo.atomName = pBuffer; - pFieldInfo.uiLen = ( USHORT ) pMyField->length; + pFieldInfo.uiLen = ( HB_USHORT ) pMyField->length; pFieldInfo.uiDec = 0; switch( pMyField->type ) @@ -274,7 +274,7 @@ static HB_ERRCODE mysqlOpen( SQLBASEAREAP pArea ) case MYSQL_TYPE_FLOAT: case MYSQL_TYPE_DOUBLE: pFieldInfo.uiType = HB_FT_DOUBLE; - pFieldInfo.uiDec = ( USHORT ) pMyField->decimals; + pFieldInfo.uiDec = ( HB_USHORT ) pMyField->decimals; break; case MYSQL_TYPE_STRING: @@ -454,7 +454,7 @@ static HB_ERRCODE mysqlGoTo( SQLBASEAREAP pArea, ULONG ulRecNo ) } -static HB_ERRCODE mysqlGetValue( SQLBASEAREAP pArea, USHORT uiIndex, PHB_ITEM pItem ) +static HB_ERRCODE mysqlGetValue( SQLBASEAREAP pArea, HB_USHORT uiIndex, PHB_ITEM pItem ) { LPFIELD pField; char* pValue; diff --git a/harbour/contrib/rddsql/sddodbc/odbcdd.c b/harbour/contrib/rddsql/sddodbc/odbcdd.c index 9f7ec31376..445e5d1243 100644 --- a/harbour/contrib/rddsql/sddodbc/odbcdd.c +++ b/harbour/contrib/rddsql/sddodbc/odbcdd.c @@ -137,9 +137,9 @@ HB_CALL_ON_STARTUP_END( _hb_odbcdd_init_ ) /*=====================================================================================*/ -static USHORT hb_errRT_ODBCDD( HB_ERRCODE errGenCode, HB_ERRCODE errSubCode, const char * szDescription, const char * szOperation, HB_ERRCODE errOsCode ) +static HB_USHORT hb_errRT_ODBCDD( HB_ERRCODE errGenCode, HB_ERRCODE errSubCode, const char * szDescription, const char * szOperation, HB_ERRCODE errOsCode ) { - USHORT uiAction; + HB_USHORT uiAction; PHB_ITEM pError; pError = hb_errRT_New( ES_ERROR, "SDDODBC", errGenCode, errSubCode, szDescription, szOperation, errOsCode, EF_NONE ); @@ -296,7 +296,7 @@ static HB_ERRCODE odbcOpen( SQLBASEAREAP pArea ) PHB_ITEM pItemEof, pItem; DBFIELDINFO pFieldInfo; HB_BOOL bError; - USHORT uiFields, uiIndex; + HB_USHORT uiFields, uiIndex; HB_ERRCODE errCode; char * szError; @@ -331,7 +331,7 @@ static HB_ERRCODE odbcOpen( SQLBASEAREAP pArea ) return HB_FAILURE; } - uiFields = ( USHORT ) iNameLen; + uiFields = ( HB_USHORT ) iNameLen; SELF_SETFIELDEXTENT( ( AREAP ) pArea, uiFields ); pItemEof = hb_itemArrayNew( uiFields ); @@ -356,7 +356,7 @@ static HB_ERRCODE odbcOpen( SQLBASEAREAP pArea ) hb_strUpper( ( char * ) cName, MAX_FIELD_NAME + 1 ); pFieldInfo.atomName = ( char * ) cName; - pFieldInfo.uiLen = ( USHORT ) uiSize; + pFieldInfo.uiLen = ( HB_USHORT ) uiSize; pFieldInfo.uiDec = iDec; /* HB_TRACE( HB_TR_ALWAYS, ("field: name=%s type=%d len=%d dec=%d null=%d", pFieldInfo.atomName, iDataType, uiSize, iDec, iNull ) ); */ @@ -528,7 +528,7 @@ static HB_ERRCODE odbcGoTo( SQLBASEAREAP pArea, ULONG ulRecNo ) SQLLEN iLen; PHB_ITEM pArray, pItem; LPFIELD pField; - USHORT ui; + HB_USHORT ui; while ( ulRecNo > pArea->ulRecCount && ! pArea->fFetched ) { diff --git a/harbour/contrib/rddsql/sddpg/pgsqldd.c b/harbour/contrib/rddsql/sddpg/pgsqldd.c index e3cbd80a7b..9c0063bc9c 100644 --- a/harbour/contrib/rddsql/sddpg/pgsqldd.c +++ b/harbour/contrib/rddsql/sddpg/pgsqldd.c @@ -99,7 +99,7 @@ static HB_ERRCODE pgsqlDisconnect( SQLDDCONNECTION * pConnection ); static HB_ERRCODE pgsqlExecute( SQLDDCONNECTION * pConnection, PHB_ITEM pItem ); static HB_ERRCODE pgsqlOpen( SQLBASEAREAP pArea ); static HB_ERRCODE pgsqlClose( SQLBASEAREAP pArea ); -static HB_ERRCODE pgsqlGetValue( SQLBASEAREAP pArea, USHORT uiIndex, PHB_ITEM pItem ); +static HB_ERRCODE pgsqlGetValue( SQLBASEAREAP pArea, HB_USHORT uiIndex, PHB_ITEM pItem ); static SDDNODE pgsqldd = { @@ -150,9 +150,9 @@ HB_CALL_ON_STARTUP_END( _hb_sddpostgre_init_ ) /* ===================================================================================== */ -static USHORT hb_errRT_PostgreSQLDD( HB_ERRCODE errGenCode, HB_ERRCODE errSubCode, const char * szDescription, const char * szOperation, HB_ERRCODE errOsCode ) +static HB_USHORT hb_errRT_PostgreSQLDD( HB_ERRCODE errGenCode, HB_ERRCODE errSubCode, const char * szDescription, const char * szOperation, HB_ERRCODE errOsCode ) { - USHORT uiAction; + HB_USHORT uiAction; PHB_ITEM pError; pError = hb_errRT_New( ES_ERROR, "SDDPG", errGenCode, errSubCode, szDescription, szOperation, errOsCode, EF_NONE ); @@ -235,7 +235,7 @@ static HB_ERRCODE pgsqlOpen( SQLBASEAREAP pArea ) PGresult* pResult; ExecStatusType status; PHB_ITEM pItemEof, pItem; - USHORT uiFields, uiCount; + HB_USHORT uiFields, uiCount; HB_BOOL bError; char* pBuffer; DBFIELDINFO pFieldInfo; @@ -257,7 +257,7 @@ static HB_ERRCODE pgsqlOpen( SQLBASEAREAP pArea ) pArea->pResult = pResult; - uiFields = ( USHORT ) PQnfields( pResult ); + uiFields = ( HB_USHORT ) PQnfields( pResult ); SELF_SETFIELDEXTENT( ( AREAP ) pArea, uiFields ); pItemEof = hb_itemArrayNew( uiFields ); @@ -279,7 +279,7 @@ static HB_ERRCODE pgsqlOpen( SQLBASEAREAP pArea ) case BPCHAROID: case VARCHAROID: pFieldInfo.uiType = HB_FT_STRING; - pFieldInfo.uiLen = ( USHORT ) PQfsize( pResult, uiCount ) - 4; + pFieldInfo.uiLen = ( HB_USHORT ) PQfsize( pResult, uiCount ) - 4; break; case NUMERICOID: @@ -339,7 +339,7 @@ static HB_ERRCODE pgsqlOpen( SQLBASEAREAP pArea ) case BITOID: case VARBITOID: pFieldInfo.uiType = HB_FT_STRING; - pFieldInfo.uiLen = ( USHORT ) PQfsize( pResult, uiCount ); + pFieldInfo.uiLen = ( HB_USHORT ) PQfsize( pResult, uiCount ); break; case TIMEOID: @@ -469,7 +469,7 @@ static HB_ERRCODE pgsqlClose( SQLBASEAREAP pArea ) } -static HB_ERRCODE pgsqlGetValue( SQLBASEAREAP pArea, USHORT uiIndex, PHB_ITEM pItem ) +static HB_ERRCODE pgsqlGetValue( SQLBASEAREAP pArea, HB_USHORT uiIndex, PHB_ITEM pItem ) { LPFIELD pField; char* pValue; diff --git a/harbour/contrib/rddsql/sqlbase.c b/harbour/contrib/rddsql/sqlbase.c index 237ca87d42..d3285cde90 100644 --- a/harbour/contrib/rddsql/sqlbase.c +++ b/harbour/contrib/rddsql/sqlbase.c @@ -62,7 +62,7 @@ #define CONNECTION_LIST_EXPAND 4 -static USHORT s_rddidSQLBASE = 0; +static HB_USHORT s_rddidSQLBASE = 0; static SQLDDCONNECTION * s_pConnection = NULL; static ULONG s_ulConnectionCount = 0; static ULONG s_ulConnectionCurrent = 0; @@ -127,8 +127,8 @@ static HB_ERRCODE sddExecute( SQLDDCONNECTION * pConnection, PHB_ITEM pItem ); static HB_ERRCODE sddOpen( SQLBASEAREAP pArea ); static HB_ERRCODE sddClose( SQLBASEAREAP pArea ); static HB_ERRCODE sddGoTo( SQLBASEAREAP pArea, ULONG ulRecNo ); -static HB_ERRCODE sddGetValue( SQLBASEAREAP pArea, USHORT uiIndex, PHB_ITEM pItem ); -static HB_ERRCODE sddGetVarLen( SQLBASEAREAP pArea, USHORT uiIndex, ULONG * pLength ); +static HB_ERRCODE sddGetValue( SQLBASEAREAP pArea, HB_USHORT uiIndex, PHB_ITEM pItem ); +static HB_ERRCODE sddGetVarLen( SQLBASEAREAP pArea, HB_USHORT uiIndex, ULONG * pLength ); static SDDNODE sddNull = { @@ -206,7 +206,7 @@ static HB_ERRCODE sddGoTo( SQLBASEAREAP pArea, ULONG ulRecNo ) } -static HB_ERRCODE sddGetValue( SQLBASEAREAP pArea, USHORT uiIndex, PHB_ITEM pItem ) +static HB_ERRCODE sddGetValue( SQLBASEAREAP pArea, HB_USHORT uiIndex, PHB_ITEM pItem ) { HB_SYMBOL_UNUSED( pArea ); HB_SYMBOL_UNUSED( uiIndex ); @@ -216,7 +216,7 @@ static HB_ERRCODE sddGetValue( SQLBASEAREAP pArea, USHORT uiIndex, PHB_ITEM pIte } -static HB_ERRCODE sddGetVarLen( SQLBASEAREAP pArea, USHORT uiIndex, ULONG * pLength ) +static HB_ERRCODE sddGetVarLen( SQLBASEAREAP pArea, HB_USHORT uiIndex, ULONG * pLength ) { HB_SYMBOL_UNUSED( pArea ); HB_SYMBOL_UNUSED( uiIndex ); @@ -460,7 +460,7 @@ static HB_ERRCODE sqlbaseDeleted( SQLBASEAREAP pArea, HB_BOOL* pDeleted ) } -static HB_ERRCODE sqlbaseGetValue( SQLBASEAREAP pArea, USHORT uiIndex, PHB_ITEM pItem ) +static HB_ERRCODE sqlbaseGetValue( SQLBASEAREAP pArea, HB_USHORT uiIndex, PHB_ITEM pItem ) { if ( pArea->bRecordFlags & SQLDD_FLAG_CACHED ) { @@ -471,7 +471,7 @@ static HB_ERRCODE sqlbaseGetValue( SQLBASEAREAP pArea, USHORT uiIndex, PHB_ITEM } -static HB_ERRCODE sqlbaseGetVarLen( SQLBASEAREAP pArea, USHORT uiIndex, ULONG * pLength ) +static HB_ERRCODE sqlbaseGetVarLen( SQLBASEAREAP pArea, HB_USHORT uiIndex, ULONG * pLength ) { /* TODO: should we use this code? if ( pArea->area.lpFields[ uiIndex ].uiType == HB_IT_MEMO ) @@ -505,7 +505,7 @@ static HB_ERRCODE sqlbaseGoCold( SQLBASEAREAP pArea ) static HB_ERRCODE sqlbaseGoHot( SQLBASEAREAP pArea ) { PHB_ITEM pArray, pItem; - USHORT us; + HB_USHORT us; pArray = hb_itemArrayNew( pArea->area.uiFieldCount ); for ( us = 1; us <= pArea->area.uiFieldCount; us++ ) @@ -522,7 +522,7 @@ static HB_ERRCODE sqlbaseGoHot( SQLBASEAREAP pArea ) } -static HB_ERRCODE sqlbasePutValue( SQLBASEAREAP pArea, USHORT uiIndex, PHB_ITEM pItem ) +static HB_ERRCODE sqlbasePutValue( SQLBASEAREAP pArea, HB_USHORT uiIndex, PHB_ITEM pItem ) { LPFIELD pField; HB_ERRCODE errCode; @@ -643,7 +643,7 @@ static HB_ERRCODE sqlbaseClose( SQLBASEAREAP pArea ) static HB_ERRCODE sqlbaseCreate( SQLBASEAREAP pArea, LPDBOPENINFO pOpenInfo ) { PHB_ITEM pItemEof, pItem; - USHORT uiCount; + HB_USHORT uiCount; HB_BOOL bError; pArea->ulConnection = pOpenInfo->ulConnection ? pOpenInfo->ulConnection : s_ulConnectionCurrent; @@ -764,7 +764,7 @@ static HB_ERRCODE sqlbaseCreate( SQLBASEAREAP pArea, LPDBOPENINFO pOpenInfo ) } -static HB_ERRCODE sqlbaseInfo( SQLBASEAREAP pArea, USHORT uiIndex, PHB_ITEM pItem ) +static HB_ERRCODE sqlbaseInfo( SQLBASEAREAP pArea, HB_USHORT uiIndex, PHB_ITEM pItem ) { switch( uiIndex ) { @@ -820,7 +820,7 @@ static HB_ERRCODE sqlbaseOpen( SQLBASEAREAP pArea, LPDBOPENINFO pOpenInfo ) } -static HB_ERRCODE sqlbaseStructSize( SQLBASEAREAP pArea, USHORT * uiSize ) +static HB_ERRCODE sqlbaseStructSize( SQLBASEAREAP pArea, HB_USHORT * uiSize ) { HB_SYMBOL_UNUSED( pArea ); @@ -938,7 +938,7 @@ static HB_ERRCODE sqlbaseExit( LPRDDNODE pRDD ) } -static HB_ERRCODE sqlbaseRddInfo( LPRDDNODE pRDD, USHORT uiIndex, ULONG ulConnect, PHB_ITEM pItem ) +static HB_ERRCODE sqlbaseRddInfo( LPRDDNODE pRDD, HB_USHORT uiIndex, ULONG ulConnect, PHB_ITEM pItem ) { ULONG ulConn; SQLDDCONNECTION* pConn; @@ -1229,12 +1229,12 @@ HB_FUNC( SQLBASE ) {;} HB_FUNC( SQLBASE_GETFUNCTABLE ) { RDDFUNCS * pTable; - USHORT * uiCount, uiRddId; + HB_USHORT * uiCount, uiRddId; - uiCount = ( USHORT * ) hb_itemGetPtr( hb_param( 1, HB_IT_POINTER ) ); + uiCount = ( HB_USHORT * ) hb_itemGetPtr( hb_param( 1, HB_IT_POINTER ) ); * uiCount = RDDFUNCSCOUNT; pTable = ( RDDFUNCS * ) hb_itemGetPtr( hb_param( 2, HB_IT_POINTER ) ); - uiRddId = ( USHORT ) hb_parni( 4 ); + uiRddId = ( HB_USHORT ) hb_parni( 4 ); if ( pTable ) { diff --git a/harbour/contrib/rddsql/sqlmix.c b/harbour/contrib/rddsql/sqlmix.c index d73fd32756..58ab19a874 100644 --- a/harbour/contrib/rddsql/sqlmix.c +++ b/harbour/contrib/rddsql/sqlmix.c @@ -92,7 +92,7 @@ -static USHORT s_uiRddIdSQLMIX = ( USHORT ) -1; +static HB_USHORT s_uiRddIdSQLMIX = ( HB_USHORT ) -1; static RDDFUNCS sqlmixSuper; @@ -104,7 +104,7 @@ static RDDFUNCS sqlmixSuper; */ -static HB_ERRCODE sqlmixErrorRT( SQLMIXAREAP pArea, HB_ERRCODE errGenCode, HB_ERRCODE errSubCode, char * filename, HB_ERRCODE errOsCode, USHORT uiFlags ) +static HB_ERRCODE sqlmixErrorRT( SQLMIXAREAP pArea, HB_ERRCODE errGenCode, HB_ERRCODE errSubCode, char * filename, HB_ERRCODE errOsCode, HB_USHORT uiFlags ) { PHB_ITEM pError; HB_ERRCODE iRet = HB_FAILURE; @@ -1564,7 +1564,7 @@ static HB_ERRCODE sqlmixClose( SQLMIXAREAP pArea ) } -static HB_ERRCODE sqlmixStructSize( SQLMIXAREAP pArea, USHORT* StructSize ) +static HB_ERRCODE sqlmixStructSize( SQLMIXAREAP pArea, HB_USHORT* StructSize ) { HB_SYMBOL_UNUSED( pArea ); @@ -1608,7 +1608,7 @@ static HB_ERRCODE sqlmixOrderCreate( SQLMIXAREAP pArea, LPDBORDERCREATEINFO pOrd PMIXTAG pTagNew, pTag; PHB_ITEM pKeyItem, pForItem = NULL, pWhileItem = NULL, pResult; ULONG ulRecNo; - USHORT uiLen; + HB_USHORT uiLen; HB_BYTE bType; /* Obtain key codeblock */ @@ -1642,7 +1642,7 @@ static HB_ERRCODE sqlmixOrderCreate( SQLMIXAREAP pArea, LPDBORDERCREATEINFO pOrd case HB_IT_STRING: case HB_IT_STRING | HB_IT_MEMO: bType = 'C'; - uiLen = ( USHORT ) hb_itemGetCLen( pResult ); + uiLen = ( HB_USHORT ) hb_itemGetCLen( pResult ); if ( uiLen > MIX_MAXKEYLEN ) uiLen = MIX_MAXKEYLEN; break; @@ -1773,10 +1773,10 @@ static HB_ERRCODE sqlmixOrderCreate( SQLMIXAREAP pArea, LPDBORDERCREATEINFO pOrd } -static HB_ERRCODE sqlmixOrderInfo( SQLMIXAREAP pArea, USHORT uiIndex, LPDBORDERINFO pOrderInfo ) +static HB_ERRCODE sqlmixOrderInfo( SQLMIXAREAP pArea, HB_USHORT uiIndex, LPDBORDERINFO pOrderInfo ) { PMIXTAG pTag; - USHORT uiTag = 0; + HB_USHORT uiTag = 0; switch( uiIndex ) { @@ -2173,12 +2173,12 @@ static RDDFUNCS sqlmixTable = HB_FUNC( SQLMIX_GETFUNCTABLE ) { RDDFUNCS * pTable; - USHORT * uiCount, uiRddId; + HB_USHORT * uiCount, uiRddId; - uiCount = ( USHORT * ) hb_itemGetPtr( hb_param( 1, HB_IT_POINTER ) ); + uiCount = ( HB_USHORT * ) hb_itemGetPtr( hb_param( 1, HB_IT_POINTER ) ); * uiCount = RDDFUNCSCOUNT; pTable = ( RDDFUNCS * ) hb_itemGetPtr( hb_param( 2, HB_IT_POINTER ) ); - uiRddId = ( USHORT ) hb_parni( 4 ); + uiRddId = ( HB_USHORT ) hb_parni( 4 ); if ( pTable ) { diff --git a/harbour/contrib/xhb/bkgtsks.c b/harbour/contrib/xhb/bkgtsks.c index 29d5257f40..38d3f0f55e 100644 --- a/harbour/contrib/xhb/bkgtsks.c +++ b/harbour/contrib/xhb/bkgtsks.c @@ -116,10 +116,10 @@ static HB_BOOL s_bEnabled = HB_FALSE; static HB_BOOL s_bIamBackground = HB_FALSE; /* current task to be executed */ -static USHORT s_uiBackgroundTask = 0; +static HB_USHORT s_uiBackgroundTask = 0; /* number of tasks in the list */ -static USHORT s_uiBackgroundMaxTask = 0; +static HB_USHORT s_uiBackgroundMaxTask = 0; #else #define s_ulBackgroundID HB_VM_STACK.ulBackgroundID diff --git a/harbour/contrib/xhb/dbf2txt.c b/harbour/contrib/xhb/dbf2txt.c index 01beb8f0ff..ceb7ded50c 100644 --- a/harbour/contrib/xhb/dbf2txt.c +++ b/harbour/contrib/xhb/dbf2txt.c @@ -169,8 +169,8 @@ HB_FUNC( DBF2TEXT ) /* Export DBF content to text file */ int iSepLen; - USHORT uiFields = 0; - USHORT ui; + HB_USHORT uiFields = 0; + HB_USHORT ui; PHB_ITEM pTmp; HB_BOOL bWriteSep = HB_FALSE; @@ -239,8 +239,8 @@ HB_FUNC( DBF2TEXT ) /* Only requested fields are exported here */ else { - USHORT uiFieldCopy = ( USHORT ) hb_arrayLen( pFields ); - USHORT uiItter; + HB_USHORT uiFieldCopy = ( HB_USHORT ) hb_arrayLen( pFields ); + HB_USHORT uiItter; for( uiItter = 1; uiItter <= uiFieldCopy; uiItter++ ) { @@ -254,7 +254,7 @@ HB_FUNC( DBF2TEXT ) if( bWriteSep ) hb_fsWriteLarge( handle, cSep, iSepLen ); - SELF_GETVALUE( pArea, ( USHORT ) iPos, pTmp ); + SELF_GETVALUE( pArea, ( HB_USHORT ) iPos, pTmp ); bWriteSep = hb_ExportVar( handle, pTmp, cDelim, cdp ); hb_itemClear( pTmp ); } diff --git a/harbour/contrib/xhb/filestat.c b/harbour/contrib/xhb/filestat.c index d679d5e65e..fa7dbc646b 100644 --- a/harbour/contrib/xhb/filestat.c +++ b/harbour/contrib/xhb/filestat.c @@ -88,7 +88,7 @@ static HB_BOOL hb_fsFileStats( if( stat( pszFileName, &statbuf ) == 0 ) { // determine if we can read/write/execute the file - USHORT usAttr, ushbAttr = 0; + HB_FATTR usAttr, ushbAttr = 0; time_t ftime; #if _POSIX_C_SOURCE >= 199506L struct tm tms; diff --git a/harbour/contrib/xhb/hbcrypt.c b/harbour/contrib/xhb/hbcrypt.c index 12a4527345..4924e84493 100644 --- a/harbour/contrib/xhb/hbcrypt.c +++ b/harbour/contrib/xhb/hbcrypt.c @@ -169,7 +169,7 @@ void nxs_partial_scramble( HB_SIZE len, HB_SIZE keylen ) { HB_SIZE pos; - USHORT kpos; + HB_USHORT kpos; pos = 0l; kpos = 0; @@ -177,7 +177,7 @@ void nxs_partial_scramble( { cipher[ pos + scramble[ kpos ] ] = source[ pos + kpos ]; kpos++; - if ( kpos >= ( USHORT ) keylen ) + if ( kpos >= ( HB_USHORT ) keylen ) { kpos = 0; pos += keylen; @@ -222,7 +222,7 @@ void nxs_partial_unscramble( HB_SIZE len, HB_SIZE keylen ) { HB_SIZE pos; - USHORT kpos; + HB_USHORT kpos; unsigned char buf[ NXS_MAX_KEYLEN ]; pos = 0l; @@ -231,7 +231,7 @@ void nxs_partial_unscramble( { buf[ kpos ] = cipher[ pos + scramble[ kpos ] ]; kpos++; - if ( kpos >= ( USHORT ) keylen ) + if ( kpos >= ( HB_USHORT ) keylen ) { memcpy( cipher + pos, buf, keylen ); kpos = 0; @@ -247,7 +247,7 @@ void nxs_xorcode( const unsigned char *key, HB_SIZE keylen ) { HB_SIZE pos = 0l; - USHORT keypos = 0; + HB_USHORT keypos = 0; unsigned char c_bitrest; c_bitrest = cipher[ 0 ] >>5; @@ -256,7 +256,7 @@ void nxs_xorcode( { cipher[pos] <<= 3; - if (keypos == ( USHORT ) keylen-1 || pos == cipherlen -1 ) + if (keypos == ( HB_USHORT ) keylen-1 || pos == cipherlen -1 ) { cipher[pos] |= c_bitrest; } @@ -269,7 +269,7 @@ void nxs_xorcode( keypos ++; pos++; - if (keypos == ( USHORT ) keylen ) + if (keypos == ( HB_USHORT ) keylen ) { keypos = 0; c_bitrest = cipher[ pos ] >>5; @@ -282,13 +282,13 @@ void nxs_xordecode( const unsigned char *key, HB_SIZE keylen ) { HB_SIZE pos = 0l; - USHORT keypos = 0; + HB_USHORT keypos = 0; unsigned char c_bitrest, c_bitleft; /* A very short block? */ if ( keylen > cipherlen - pos ) { - keylen = ( USHORT ) ( cipherlen - pos); + keylen = ( HB_USHORT ) ( cipherlen - pos); } c_bitleft = ( cipher[ keylen -1 ] ^ key[ keylen -1 ])<< 5; @@ -304,13 +304,13 @@ void nxs_xordecode( keypos ++; pos ++; - if (keypos == ( USHORT ) keylen ) + if (keypos == ( HB_USHORT ) keylen ) { keypos = 0; /* last block */ if ( keylen > cipherlen - pos ) { - keylen = ( USHORT ) (cipherlen - pos); + keylen = ( HB_USHORT ) (cipherlen - pos); } c_bitleft = ( cipher[ pos + keylen -1 ] ^ key[ keylen -1 ])<< 5; diff --git a/harbour/contrib/xhb/xhbcopyf.c b/harbour/contrib/xhb/xhbcopyf.c index e1742556ed..fb3cfbf39d 100644 --- a/harbour/contrib/xhb/xhbcopyf.c +++ b/harbour/contrib/xhb/xhbcopyf.c @@ -72,7 +72,7 @@ static HB_BOOL hb_copyfile( const char * szSource, const char * szDest, PHB_ITEM while( ( fhndSource = hb_spOpen( szSource, FO_READ | FO_SHARED | FO_PRIVATE ) ) == FS_ERROR ) { - USHORT uiAction = hb_errRT_BASE_Ext1( EG_OPEN, 2012, NULL, szSource, hb_fsError(), EF_CANDEFAULT | EF_CANRETRY, 0 ); + HB_USHORT uiAction = hb_errRT_BASE_Ext1( EG_OPEN, 2012, NULL, szSource, hb_fsError(), EF_CANDEFAULT | EF_CANRETRY, 0 ); if( uiAction != E_RETRY ) break; @@ -84,7 +84,7 @@ static HB_BOOL hb_copyfile( const char * szSource, const char * szDest, PHB_ITEM while( ( fhndDest = hb_spCreate( szDest, FC_NORMAL ) ) == FS_ERROR ) { - USHORT uiAction = hb_errRT_BASE_Ext1( EG_CREATE, 2012, NULL, szDest, hb_fsError(), EF_CANDEFAULT | EF_CANRETRY, 0 ); + HB_USHORT uiAction = hb_errRT_BASE_Ext1( EG_CREATE, 2012, NULL, szDest, hb_fsError(), EF_CANDEFAULT | EF_CANRETRY, 0 ); if( uiAction != E_RETRY ) break; @@ -97,7 +97,7 @@ static HB_BOOL hb_copyfile( const char * szSource, const char * szDest, PHB_ITEM int iSuccess = fstat( fhndSource, &struFileInfo ); #endif HB_BYTE * buffer = ( HB_BYTE * ) hb_xgrab( BUFFER_SIZE ); - USHORT usRead; + HB_USHORT usRead; bRetVal = HB_TRUE; @@ -108,7 +108,7 @@ static HB_BOOL hb_copyfile( const char * szSource, const char * szDest, PHB_ITEM { while( hb_fsWrite( fhndDest, buffer, usRead ) != usRead ) { - USHORT uiAction = hb_errRT_BASE_Ext1( EG_WRITE, 2016, NULL, szDest, hb_fsError(), EF_CANDEFAULT | EF_CANRETRY, 0 ); + HB_USHORT uiAction = hb_errRT_BASE_Ext1( EG_WRITE, 2016, NULL, szDest, hb_fsError(), EF_CANDEFAULT | EF_CANRETRY, 0 ); if( uiAction != E_RETRY ) { diff --git a/harbour/contrib/xhb/xhbfunc.c b/harbour/contrib/xhb/xhbfunc.c index 6e73d996d3..c77da3790e 100644 --- a/harbour/contrib/xhb/xhbfunc.c +++ b/harbour/contrib/xhb/xhbfunc.c @@ -289,9 +289,9 @@ HB_FUNC( HB_EXEC ) else hb_vmPushNil(); if( fSend ) - hb_vmSend( ( USHORT ) iParams ); + hb_vmSend( ( HB_USHORT ) iParams ); else - hb_vmDo( ( USHORT ) iParams ); + hb_vmDo( ( HB_USHORT ) iParams ); } else hb_errRT_BASE_SubstR( EG_ARG, 1099, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); diff --git a/harbour/contrib/xhb/xhbsave.c b/harbour/contrib/xhb/xhbsave.c index 1e2a694c68..659b110ece 100644 --- a/harbour/contrib/xhb/xhbsave.c +++ b/harbour/contrib/xhb/xhbsave.c @@ -53,7 +53,7 @@ #include "hbapi.h" #include "hbapigt.h" -static void hb_getScreenRange( USHORT * pusMin, USHORT * pusMax, +static void hb_getScreenRange( int * pusMin, int * pusMax, HB_BOOL fNoCheck, HB_BOOL fVertical ) { int iFrom, iTo, iMax; @@ -83,19 +83,19 @@ static void hb_getScreenRange( USHORT * pusMin, USHORT * pusMax, if( iFrom > iTo ) { - *pusMin = ( USHORT ) iTo; - *pusMax = ( USHORT ) iFrom; + *pusMin = iTo; + *pusMax = iFrom; } else { - *pusMin = ( USHORT ) iFrom; - *pusMax = ( USHORT ) iTo; + *pusMin = iFrom; + *pusMax = iTo; } } HB_FUNC( XHB_SAVESCREEN ) { - USHORT uiTop, uiLeft, uiBottom, uiRight; + int uiTop, uiLeft, uiBottom, uiRight; HB_SIZE ulSize; void * pBuffer; HB_BOOL fNoCheck = hb_parl( 5 ); @@ -114,7 +114,7 @@ HB_FUNC( XHB_RESTSCREEN ) { if( HB_ISCHAR( 5 ) ) { - USHORT uiTop, uiLeft, uiBottom, uiRight; + int uiTop, uiLeft, uiBottom, uiRight; HB_BOOL fNoCheck = hb_parl( 6 ); hb_getScreenRange( &uiTop, &uiBottom, fNoCheck, HB_TRUE ); diff --git a/harbour/contrib/xpp/philesx.c b/harbour/contrib/xpp/philesx.c index 20a84826d3..d6e6d41620 100644 --- a/harbour/contrib/xpp/philesx.c +++ b/harbour/contrib/xpp/philesx.c @@ -77,9 +77,9 @@ HB_FUNC( CURDRIVE ) { while( hb_fsChDrv( iDrive ) != 0 ) { - USHORT uiAction = hb_errRT_BASE_Ext1( EG_OPEN, 6001, "Operating system error", - HB_ERR_FUNCNAME, 0, EF_CANDEFAULT | EF_CANRETRY, - HB_ERR_ARGS_BASEPARAMS ); + HB_USHORT uiAction = hb_errRT_BASE_Ext1( EG_OPEN, 6001, "Operating system error", + HB_ERR_FUNCNAME, 0, EF_CANDEFAULT | EF_CANRETRY, + HB_ERR_ARGS_BASEPARAMS ); if( uiAction != E_RETRY ) break; }