diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 2ce86b9723..be0f12c118 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,22 @@ The license applies to all entries newer than 2009-04-28. */ +2010-06-19 19:07 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) + * contrib/hbodbc/odbc.c + * Type cleanup. + + * contrib/xhb/cstructc.c + * contrib/hbxpp/xppopc.c + * contrib/hbfship/strpeek.c + * contrib/hbtip/utils.c + + Using size API. + + * contrib/hbtip/utils.c + % Minor fix: HB_SIZE -> HB_ULONG + + * bin/postinst.sh + * Indentation (minor) + 2010-06-19 17:14 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * src/vm/hashfunc.c * src/vm/asort.c @@ -254,7 +270,7 @@ ! Applied fixed from Przemek to hb_fsReadAt()/hb_fsWriteAt() code to be MT safe plus fix other problems. ; QUESTION: Shouls the same applied to hb_fsWriteLarge()/hb_fsReadLarge() - loops? (BTW inactive in 32-bit Harbour builds) + loops? (BTW inactive in 32-bit Harbour builds) [YES] * contrib/hbct/screen2.c ! Type cleanup. @@ -302,7 +318,7 @@ ; NOTE: These should be used in place of hb_parnl(), hb_retnl(), hb_stornl() when passing HB_SIZE types. ; TODO: Use them all accross Harbour if they are correct and - after being finalized. + after being finalized. [DONE] * src/vm/itemapi.c + Added hb_itemGetNSize(), hb_itemPutNSize() functions. @@ -340,7 +356,7 @@ * include/hbdefs.h + Added HB_PFS macro which holds the printf() format string for HB_SIZE value. - ; TODO: Use it all accross Harbour. + ; TODO: Use it all accross Harbour. [DONE] * contrib/hbmysql/mysql.c * contrib/sddmy/sddmy.c @@ -582,7 +598,7 @@ sizes for strings and arrays. ; TODO: Test and fix and places where this may cause a problem. Delete all now unnecessary casting from size_t to HB_SIZE. - (f.e. '( HB_SIZE ) strlen(') + (f.e. '( HB_SIZE ) strlen(') [DONE] 2010-06-18 10:50 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * include/hbdefs.h diff --git a/harbour/bin/postinst.sh b/harbour/bin/postinst.sh index 9c560aaa26..afabebf1e3 100755 --- a/harbour/bin/postinst.sh +++ b/harbour/bin/postinst.sh @@ -75,7 +75,7 @@ mk_hbgetlibs() libs="" if [ "$HB_PLATFORM" != "wce" ] then - libs="$libs gtwin" + libs="$libs gtwin" fi echo "hbextern hbvm hbpp hbrtl hbrdd rddfpt rddcdx rddnsx rddntx hbhsx hbsix hbusrrdd hbmacro hbcommon hblang hbcpage gtcrs gtsln gtxvt gtxwc gtcgi gtstd gtpca gttrm $libs gtwvt gtgui gtdos gtos2 hbdebug profiler hbcplr hbpcre hbzlib" else diff --git a/harbour/contrib/hbfship/strpeek.c b/harbour/contrib/hbfship/strpeek.c index d727cb3615..150cd3170d 100644 --- a/harbour/contrib/hbfship/strpeek.c +++ b/harbour/contrib/hbfship/strpeek.c @@ -60,7 +60,7 @@ HB_FUNC( STRPEEK ) if( pText && HB_ISNUM( 2 ) ) { - HB_SIZE ulPos = hb_parnl( 2 ); + HB_SIZE ulPos = hb_parns( 2 ); if( ulPos > 0 && ulPos <= hb_itemGetCLen( pText ) ) hb_retni( ( unsigned char ) hb_itemGetCPtr( pText )[ ulPos - 1 ] ); @@ -78,7 +78,7 @@ HB_FUNC( STRPOKE ) if( pText && HB_ISNUM( 2 ) && HB_ISNUM( 3 ) ) { - HB_SIZE ulPos = hb_parnl( 2 ), ulLen; + HB_SIZE ulPos = hb_parns( 2 ), ulLen; char * pszText; if( ulPos > 0 && hb_itemGetWriteCL( pText, &pszText, &ulLen ) && diff --git a/harbour/contrib/hbodbc/odbc.c b/harbour/contrib/hbodbc/odbc.c index 8bc233624d..590400565c 100644 --- a/harbour/contrib/hbodbc/odbc.c +++ b/harbour/contrib/hbodbc/odbc.c @@ -353,7 +353,7 @@ HB_FUNC( SQLDESCRIBECOL ) /* hStmt, nCol, @cName, nLen, @nBufferLen, @nDataType, HB_FUNC( SQLCOLATTRIBUTE ) /* hStmt, nCol, nField, @cName, nLen, @nBufferLen, @nAttribute --> nRetCode */ { - void * bBuffer = hb_xgrab( hb_parnl( 5 ) ); + void * bBuffer = hb_xgrab( ( SQLUSMALLINT ) hb_parni( 5 ) ); SQLSMALLINT wBufLen = ( SQLUSMALLINT ) hb_parni( 6 ); SQLRETURN result; #if ODBCVER >= 0x0300 @@ -419,7 +419,7 @@ HB_FUNC( SQLFETCHSCROLL ) { #if ODBCVER >= 0x0300 hb_retni( SQLFetchScroll( ( SQLHSTMT ) hb_parptr( 1 ), - ( SQLSMALLINT ) hb_parnl( 2 ), + ( SQLSMALLINT ) hb_parni( 2 ), ( SQLLEN ) hb_parnint( 3 ) ) ); #else hb_retni( SQL_ERROR ); @@ -463,7 +463,7 @@ HB_FUNC( SQLGETINFO ) /* hDbc, nType, @cResult */ char bBuffer[ 512 ]; SQLSMALLINT wLen; SQLRETURN result = SQLGetInfo( ( SQLHDBC ) hb_parptr( 1 ), - ( SQLUSMALLINT ) hb_parnl( 2 ), + ( SQLUSMALLINT ) hb_parni( 2 ), ( SQLPOINTER ) bBuffer, ( SQLSMALLINT ) sizeof( bBuffer ), ( SQLSMALLINT * ) &wLen ); @@ -481,7 +481,7 @@ HB_FUNC( SQLSETCONNECTATTR ) /* hDbc, nOption, uOption */ HB_ISCHAR( 3 ) ? ( SQLINTEGER ) hb_parclen( 3 ) : ( SQLINTEGER ) SQL_IS_INTEGER ) ); #else hb_retni( SQLSetConnectOption( ( SQLHDBC ) hb_parptr( 1 ), - ( SQLUSMALLINT ) hb_parnl( 2 ), + ( SQLUSMALLINT ) hb_parni( 2 ), ( SQLULEN ) HB_ISCHAR( 3 ) ? ( SQLULEN ) hb_parc( 3 ) : hb_parnl( 3 ) ) ); #endif } @@ -495,7 +495,7 @@ HB_FUNC( SQLSETSTMTATTR ) /* hStmt, nOption, uOption --> nRetCode */ HB_ISCHAR( 3 ) ? ( SQLINTEGER ) hb_parclen( 3 ) : ( SQLINTEGER ) SQL_IS_INTEGER ) ); #else hb_retni( SQLSetStmtOption( ( SQLHSTMT ) hb_parptr( 1 ), - ( SQLUSMALLINT ) hb_parnl( 2 ), + ( SQLUSMALLINT ) hb_parni( 2 ), ( SQLULEN ) HB_ISCHAR( 3 ) ? ( SQLULEN ) hb_parc( 3 ) : hb_parnl( 3 ) ) ); #endif } diff --git a/harbour/contrib/hbtip/utils.c b/harbour/contrib/hbtip/utils.c index f0e70b85e9..9aa5643524 100644 --- a/harbour/contrib/hbtip/utils.c +++ b/harbour/contrib/hbtip/utils.c @@ -95,7 +95,7 @@ HB_FUNC( TIP_TIMESTAMP ) /* For compatibility */ if( HB_ISNUM( 2 ) ) { - HB_SIZE ulHour = hb_parnl( 2 ); + HB_ULONG ulHour = hb_parnl( 2 ); iHour = ( int ) ( ulHour / 3600 ); iMinute = ( int ) ( ( ulHour % 3600 ) / 60 ); @@ -569,7 +569,7 @@ HB_FUNC( PSTRCOMPI ) const char * pcBase = hb_itemGetCPtr( pString ); const char * pcSub = hb_itemGetCPtr( pSubstr ); HB_SIZE uSublen = hb_itemGetCLen( pSubstr ); - HB_SIZE uStart = hb_itemGetNL( pStart ); + HB_SIZE uStart = hb_itemGetNS( pStart ); hb_retl( hb_strnicmp( pcBase + uStart - 1, pcSub, uSublen ) == 0 ); } diff --git a/harbour/contrib/hbxpp/xppopc.c b/harbour/contrib/hbxpp/xppopc.c index ad667b3da7..199000a177 100644 --- a/harbour/contrib/hbxpp/xppopc.c +++ b/harbour/contrib/hbxpp/xppopc.c @@ -73,7 +73,7 @@ HB_FUNC( XPP_INDEX ) PHB_ITEM pValue = hb_param( 2, HB_IT_ANY ); if( HB_IS_NUMERIC( pIndex ) ) { - HB_SIZE ulIndex = hb_itemGetNL( pIndex ); + HB_SIZE ulIndex = hb_itemGetNS( pIndex ); if( HB_IS_ARRAY( pSelf ) ) { HB_SIZE ulLen = hb_arrayLen( pSelf ); @@ -114,7 +114,7 @@ HB_FUNC( XPP_INDEX ) { /* ACCESS */ if( HB_IS_NUMERIC( pIndex ) ) { - HB_SIZE ulIndex = hb_itemGetNL( pIndex ); + HB_SIZE ulIndex = hb_itemGetNS( pIndex ); if( HB_IS_ARRAY( pSelf ) ) { HB_SIZE ulLen = hb_arrayLen( pSelf ); diff --git a/harbour/contrib/xhb/cstructc.c b/harbour/contrib/xhb/cstructc.c index 06751fcf84..f4e6b67b52 100644 --- a/harbour/contrib/xhb/cstructc.c +++ b/harbour/contrib/xhb/cstructc.c @@ -1411,15 +1411,15 @@ HB_FUNC( HB_POINTER2STRING ) if( HB_IS_POINTER( pPointer ) && pLen ) { - hb_retclen( ( char * ) hb_itemGetPtr( pPointer ), ( HB_SIZE ) hb_itemGetNL( pLen ) ); + hb_retclen( ( char * ) hb_itemGetPtr( pPointer ), hb_itemGetNS( pLen ) ); } else if( HB_IS_INTEGER( pPointer ) && pLen ) { - hb_retclen( ( char * ) ( HB_PTRDIFF ) hb_itemGetNI( pPointer ), ( HB_SIZE ) hb_itemGetNL( pLen ) ); + hb_retclen( ( char * ) ( HB_PTRDIFF ) hb_itemGetNI( pPointer ), hb_itemGetNS( pLen ) ); } else if( HB_IS_LONG( pPointer ) && pLen ) { - hb_retclen( ( char * ) ( HB_PTRDIFF ) hb_itemGetNL( pPointer ), ( HB_SIZE ) hb_itemGetNL( pLen ) ); + hb_retclen( ( char * ) ( HB_PTRDIFF ) hb_itemGetNL( pPointer ), hb_itemGetNS( pLen ) ); } else hb_errRT_BASE_SubstR( EG_ARG, 1099, NULL, HB_ERR_FUNCNAME, 2, hb_paramError( 1 ), hb_paramError( 2 ) );