diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 9c33c297fe..2ce86b9723 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,43 @@ The license applies to all entries newer than 2009-04-28. */ +2010-06-19 17:14 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) + * src/vm/hashfunc.c + * src/vm/asort.c + * src/vm/arrayshb.c + * src/rtl/substr.c + * src/rtl/hbzlibgz.c + * src/rtl/at.c + * src/rtl/strtran.c + * src/rtl/stuff.c + * src/rtl/cdpapihb.c + * contrib/hbct/charsprd.c + * contrib/hbct/atadjust.c + * contrib/hbct/charsort.c + * contrib/hbct/ascpos.c + * contrib/hbct/addascii.c + * contrib/hbct/tab.c + * contrib/hbct/numline.c + * contrib/hbct/asciisum.c + * contrib/hbct/ctpad.c + * contrib/xhb/fparse.c + * contrib/xhb/xhbhasha.c + * contrib/xhb/xhbmsgs.c + * contrib/xhb/freadlin.c + * contrib/xhb/xhbfunc.c + * contrib/hbmzip/hbmzip.c + + Using size API. + * Other type and minor code cleanups. + + * contrib/hbct/screen2.c + % Using hb_parnldef(). + + * src/rtl/hbzlib.c + ! Fixed mingw warning after prev. + + * contrib/rddads/adsx.c + * Formatting. + 2010-06-19 16:24 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * include/hbdefs.h + Adjusted HB_SIZE_MAX value for Win64 after recent changes. diff --git a/harbour/contrib/hbct/addascii.c b/harbour/contrib/hbct/addascii.c index 56559d60b8..ec90f194f1 100644 --- a/harbour/contrib/hbct/addascii.c +++ b/harbour/contrib/hbct/addascii.c @@ -137,7 +137,7 @@ HB_FUNC( ADDASCII ) int iCarryOver; if( HB_ISNUM( 3 ) ) - sPos = hb_parnl( 3 ); + sPos = hb_parns( 3 ); else sPos = sLen; @@ -174,7 +174,7 @@ HB_FUNC( ADDASCII ) for( sCurrent = sPos; sCurrent > 0 && lValue != 0; sCurrent-- ) { - lResult = ( HB_LONG ) pcSource[sCurrent - 1] + ( lValue % 256 ); + lResult = ( HB_LONG ) pcSource[ sCurrent - 1 ] + ( lValue % 256 ); lValue /= 256; if( lResult > 255 ) @@ -182,12 +182,12 @@ HB_FUNC( ADDASCII ) else if( lResult < 0 ) lValue--; - pcResult[sCurrent - 1] = ( char ) ( lResult % 256 ); + pcResult[ sCurrent - 1 ] = ( char ) ( lResult % 256 ); } } else { - pcResult[sPos - 1] = ( char ) ( ( ( HB_LONG ) pcResult[sPos - 1] + lValue ) % 256 ); + pcResult[ sPos - 1 ] = ( char ) ( ( ( HB_LONG ) pcResult[ sPos - 1 ] + lValue ) % 256 ); } if( HB_ISBYREF( 1 ) ) diff --git a/harbour/contrib/hbct/asciisum.c b/harbour/contrib/hbct/asciisum.c index 17784a936d..b2f323be16 100644 --- a/harbour/contrib/hbct/asciisum.c +++ b/harbour/contrib/hbct/asciisum.c @@ -101,12 +101,12 @@ HB_FUNC( ASCIISUM ) const char * pcString = hb_parc( 1 ); HB_SIZE sStrSize = hb_parclen( 1 ); HB_SIZE sPos; - HB_ULONG ulResult = 0; + HB_MAXUINT ulResult = 0; for( sPos = 0; sPos < sStrSize; sPos++ ) - ulResult += ( HB_ULONG ) pcString[ sPos ]; + ulResult += ( HB_MAXUINT ) pcString[ sPos ]; - hb_retnl( ulResult ); + hb_retnint( ulResult ); } else { @@ -123,6 +123,6 @@ HB_FUNC( ASCIISUM ) if( pSubst != NULL ) hb_itemReturnRelease( pSubst ); else - hb_retni( 0 ); + hb_retnint( 0 ); } } diff --git a/harbour/contrib/hbct/ascpos.c b/harbour/contrib/hbct/ascpos.c index 791179795a..9810693b8d 100644 --- a/harbour/contrib/hbct/ascpos.c +++ b/harbour/contrib/hbct/ascpos.c @@ -72,7 +72,7 @@ static void do_ascpos( int iSwitch ) HB_SIZE sPos; if( HB_ISNUM( 2 ) ) - sPos = hb_parnl( 2 ); + sPos = hb_parns( 2 ); else sPos = sStrSize; @@ -85,13 +85,13 @@ static void do_ascpos( int iSwitch ) if( iSwitch == DO_ASCPOS_VALPOS ) { if( HB_ISDIGIT( ( HB_UCHAR ) pcString[ sPos - 1 ] ) ) - hb_retnl( pcString[ sPos - 1 ] - 48 ); + hb_retni( pcString[ sPos - 1 ] - '0' ); else hb_retni( 0 ); } else /* iSwitch == DO_ASCPOS_ASCPOS */ { - hb_retnl( pcString[sPos - 1] ); + hb_retni( pcString[ sPos - 1 ] ); } } } diff --git a/harbour/contrib/hbct/atadjust.c b/harbour/contrib/hbct/atadjust.c index 25521b18f6..f83485eb7f 100644 --- a/harbour/contrib/hbct/atadjust.c +++ b/harbour/contrib/hbct/atadjust.c @@ -106,7 +106,7 @@ HB_FUNC( ATADJUST ) HB_SIZE sStrToMatchLen = hb_parclen( 1 ); const char *pcString = hb_parc( 2 ); HB_SIZE sStrLen = hb_parclen( 2 ); - HB_SIZE sAdjustPosition = hb_parnl( 3 ); + HB_SIZE sAdjustPosition = hb_parns( 3 ); int iMultiPass = ct_getatmupa(); int iAtLike = ct_getatlike(); @@ -122,7 +122,7 @@ HB_FUNC( ATADJUST ) /* eventually ignore some characters */ if( HB_ISNUM( 5 ) ) - sIgnore = ( HB_SIZE ) hb_parnl( 5 ); + sIgnore = hb_parns( 5 ); else sIgnore = 0; @@ -161,7 +161,7 @@ HB_FUNC( ATADJUST ) sAdjustPosition--; /* makes live easier since C indices start at zero ! */ /* nth match or last match ? */ - if( HB_ISNUM( 4 ) && ( ulCounter = hb_parnl( 4 ) ) != 0 ) + if( HB_ISNUM( 4 ) && ( ulCounter = hb_parns( 4 ) ) != 0 ) { /* find the th match */ const char *pcSubStr; @@ -205,7 +205,7 @@ HB_FUNC( ATADJUST ) sSubStrLen = sStrLen - ( pcSubStr - pcString ); } } - else /* ( HB_ISNUM( 4 ) && ( (ulCounter = hb_parnl( 4 ) ) != 0 ) */ + else /* ( HB_ISNUM( 4 ) && ( (ulCounter = hb_parns( 4 ) ) != 0 ) */ { /* we have to find the last match */ switch ( iAtLike ) diff --git a/harbour/contrib/hbct/charsort.c b/harbour/contrib/hbct/charsort.c index 2d78ac4967..622f8b8e5f 100644 --- a/harbour/contrib/hbct/charsort.c +++ b/harbour/contrib/hbct/charsort.c @@ -191,27 +191,27 @@ HB_FUNC( CHARSORT ) int iDescend; if( HB_ISNUM( 2 ) ) - sElementLen = hb_parnl( 2 ); + sElementLen = hb_parns( 2 ); else sElementLen = 1; if( HB_ISNUM( 3 ) ) - s_sCompareLen = hb_parnl( 3 ); + s_sCompareLen = hb_parns( 3 ); else s_sCompareLen = sElementLen; if( HB_ISNUM( 4 ) ) - sIgnore = hb_parnl( 4 ); + sIgnore = hb_parns( 4 ); else sIgnore = 0; if( HB_ISNUM( 5 ) ) - s_sElementPos = hb_parnl( 5 ); + s_sElementPos = hb_parns( 5 ); else s_sElementPos = 0; if( HB_ISNUM( 6 ) ) - sSortLen = hb_parnl( 6 ); + sSortLen = hb_parns( 6 ); else sSortLen = sStrLen - sIgnore; diff --git a/harbour/contrib/hbct/charsprd.c b/harbour/contrib/hbct/charsprd.c index a7f029c051..6869ea3eea 100644 --- a/harbour/contrib/hbct/charsprd.c +++ b/harbour/contrib/hbct/charsprd.c @@ -62,7 +62,7 @@ HB_FUNC( CHARSPREAD ) hb_retc_null(); else { - HB_ISIZ lSize = hb_parnl( 2 ); + HB_ISIZ lSize = hb_parns( 2 ); if( lSize < 0 || ( HB_SIZE ) lSize <= ulLen ) hb_itemReturn( hb_param( 1, HB_IT_ANY ) ); diff --git a/harbour/contrib/hbct/ctpad.c b/harbour/contrib/hbct/ctpad.c index 71ad04d317..3ce3b4d766 100644 --- a/harbour/contrib/hbct/ctpad.c +++ b/harbour/contrib/hbct/ctpad.c @@ -70,7 +70,7 @@ static void do_pad( int iSwitch ) HB_SIZE sRetLen; char cFill; - lRetLen = hb_parnl( 2 ); + lRetLen = hb_parns( 2 ); if( lRetLen <= 0 ) { int iArgErrorMode = ct_getargerrormode(); diff --git a/harbour/contrib/hbct/numline.c b/harbour/contrib/hbct/numline.c index 4da83159eb..0b153aced3 100644 --- a/harbour/contrib/hbct/numline.c +++ b/harbour/contrib/hbct/numline.c @@ -55,14 +55,14 @@ HB_FUNC( NUMLINE ) { - HB_LONG lLines = 0; + HB_ISIZ lLines = 0; if( HB_ISCHAR( 1 ) ) { const char * pcString = hb_parc( 1 ); const char * pBuffer; HB_ISIZ lStrLen = hb_parclen( 1 ); - HB_ISIZ lLength = HB_ISNUM( 2 ) ? hb_parnl( 2 ) : 80; + HB_ISIZ lLength = hb_parnsdef( 2, 80 ); while( lStrLen > 0 ) { @@ -84,5 +84,5 @@ HB_FUNC( NUMLINE ) } } - hb_retnl( lLines ); + hb_retns( lLines ); } diff --git a/harbour/contrib/hbct/screen2.c b/harbour/contrib/hbct/screen2.c index 4ec51c7444..c5156ccd5d 100644 --- a/harbour/contrib/hbct/screen2.c +++ b/harbour/contrib/hbct/screen2.c @@ -66,7 +66,7 @@ HB_FUNC( SAYDOWN ) int iRow, iCol, iMaxRow, iMaxCol; long lDelay; - lDelay = HB_ISNUM( 2 ) ? hb_parnl( 2 ) : 4; + lDelay = hb_parnldef( 2, 4 ); hb_gtGetPos( &iRow, &iCol ); if( HB_ISNUM( 3 ) ) @@ -112,7 +112,7 @@ HB_FUNC( SAYSPREAD ) int iRow, iCol, iMaxRow, iMaxCol; long lDelay; - lDelay = HB_ISNUM( 2 ) ? hb_parnl( 2 ) : 4; + lDelay = hb_parnldef( 2, 4 ); iMaxRow = hb_gtMaxRow(); iMaxCol = hb_gtMaxCol(); @@ -169,7 +169,7 @@ HB_FUNC( SAYMOVEIN ) long lDelay; HB_BOOL fBack; - lDelay = HB_ISNUM( 2 ) ? hb_parnl( 2 ) : 4; + lDelay = hb_parnldef( 2, 4 ); fBack = hb_parl( 5 ); iMaxRow = hb_gtMaxRow(); diff --git a/harbour/contrib/hbct/tab.c b/harbour/contrib/hbct/tab.c index 94368b458d..cfc0d6973f 100644 --- a/harbour/contrib/hbct/tab.c +++ b/harbour/contrib/hbct/tab.c @@ -123,14 +123,14 @@ HB_FUNC( TABEXPAND ) HB_SIZE sTabCnt = 0; if( HB_ISNUM( 2 ) ) - sTabWidth = hb_parnl( 2 ); - if( ( signed ) sTabWidth <= 0 ) + sTabWidth = hb_parns( 2 ); + if( ( HB_ISIZ ) sTabWidth <= 0 ) sTabWidth = 8; if( HB_ISNUM( 3 ) ) cFill = ( char ) ( hb_parnl( 3 ) % 256 ); else if( hb_parclen( 3 ) > 0 ) - cFill = hb_parc( 3 )[0]; + cFill = hb_parc( 3 )[ 0 ]; else cFill = 0x20; @@ -154,7 +154,7 @@ HB_FUNC( TABEXPAND ) if( HB_ISNUM( 5 ) ) cTab = ( char ) ( hb_parnl( 5 ) % 256 ); else if( hb_parclen( 5 ) > 0 ) - cTab = hb_parc( 5 )[0]; + cTab = hb_parc( 5 )[ 0 ]; else cTab = 0x09; @@ -323,14 +323,14 @@ HB_FUNC( TABPACK ) HB_SIZE sIndex, sTabIndex, sFillCount; if( HB_ISNUM( 2 ) ) - sTabWidth = hb_parnl( 2 ); - if( ( signed ) sTabWidth <= 0 ) + sTabWidth = hb_parns( 2 ); + if( ( HB_ISIZ ) sTabWidth <= 0 ) sTabWidth = 8; if( HB_ISNUM( 3 ) ) cFill = ( char ) ( hb_parnl( 3 ) % 256 ); else if( hb_parclen( 3 ) > 0 ) - cFill = hb_parc( 3 )[0]; + cFill = hb_parc( 3 )[ 0 ]; else cFill = 0x20; @@ -350,7 +350,7 @@ HB_FUNC( TABPACK ) if( HB_ISNUM( 5 ) ) cTab = ( char ) ( hb_parnl( 5 ) % 256 ); else if( hb_parclen( 5 ) > 0 ) - cTab = hb_parc( 5 )[0]; + cTab = hb_parc( 5 )[ 0 ]; else cTab = 0x09; diff --git a/harbour/contrib/hbmzip/hbmzip.c b/harbour/contrib/hbmzip/hbmzip.c index f38c4bd743..eaf6af8bca 100644 --- a/harbour/contrib/hbmzip/hbmzip.c +++ b/harbour/contrib/hbmzip/hbmzip.c @@ -256,8 +256,8 @@ HB_FUNC( HB_ZIPFILEWRITE ) zipFile hZip = hb_zipfileParam( 1 ); HB_SIZE ulLen = hb_parclen( 2 ); - if( HB_ISNUM( 3 ) && ( HB_SIZE ) hb_parnl( 3 ) < ulLen ) - ulLen = ( HB_SIZE ) hb_parnl( 3 ); + if( HB_ISNUM( 3 ) && hb_parns( 3 ) < ulLen ) + ulLen = hb_parns( 3 ); if( hZip ) hb_retni( zipWriteInFileInZip( hZip, (void*) pData, ( unsigned ) ulLen ) ); @@ -441,8 +441,8 @@ HB_FUNC( HB_UNZIPFILEINFO ) hb_stornl( ufi.internal_fa, 5 ); hb_stornl( ufi.external_fa, 6 ); hb_stornl( ufi.compression_method, 7 ); - hb_stornl( ufi.uncompressed_size, 8 ); - hb_stornl( ufi.compressed_size, 9 ); + hb_storns( ufi.uncompressed_size, 8 ); + hb_storns( ufi.compressed_size, 9 ); hb_storl( ( ufi.flag & 1 ) != 0, 10 ); hb_stornint( ufi.crc, 12 ); @@ -470,8 +470,8 @@ HB_FUNC( HB_UNZIPFILEINFO ) hb_stornl( 0, 5 ); hb_stornl( 0, 6 ); hb_stornl( 0, 7 ); - hb_stornl( 0, 8 ); - hb_stornl( 0, 9 ); + hb_storns( 0, 8 ); + hb_storns( 0, 9 ); hb_storl( HB_FALSE, 10 ); hb_storc( NULL, 11 ); } @@ -507,7 +507,7 @@ HB_FUNC( HB_UNZIPFILEREAD ) if( HB_ISNUM( 3 ) ) { - HB_SIZE ulRead = ( HB_SIZE ) hb_parnl( 3 ); + HB_SIZE ulRead = hb_parns( 3 ); if( ulRead < ulSize ) ulSize = ulRead; } diff --git a/harbour/contrib/rddads/adsx.c b/harbour/contrib/rddads/adsx.c index c1af86ac24..b481c52b57 100644 --- a/harbour/contrib/rddads/adsx.c +++ b/harbour/contrib/rddads/adsx.c @@ -1169,7 +1169,7 @@ static HB_ERRCODE adsxOrderInfo( ADSXAREAP pArea, HB_USHORT uiIndex, LPDBORDERIN { HB_ULONG ulPos; - ulPos = hb_itemGetNL( pOrderInfo->itmNewVal ) ; + ulPos = hb_itemGetNL( pOrderInfo->itmNewVal ); if( ulPos > 0 && ulPos <= pTag->ulRecCount ) SELF_GOTO( ( AREAP ) pArea, pTag->pKeys[ ulPos - 1 ]->rec ); diff --git a/harbour/contrib/xhb/fparse.c b/harbour/contrib/xhb/fparse.c index 7cff0ed94f..74a8d80b52 100644 --- a/harbour/contrib/xhb/fparse.c +++ b/harbour/contrib/xhb/fparse.c @@ -412,9 +412,7 @@ HB_FUNC( FPARSE ) /* add parsed text to array */ for( iToken = 0; tokens[ iToken ]; iToken++ ) - { hb_arraySetC( pItem, iToken + 1, tokens[ iToken ] ); - } /* add array containing parsed text to main array */ hb_arrayAddForward( pArray, pItem ); @@ -437,7 +435,7 @@ HB_FUNC( FPARSE ) /*----------------------------------------------------------------------------*/ HB_FUNC( FPARSEEX ) { - FILE *inFile ; + FILE *inFile; PHB_ITEM pSrc = hb_param( 1, HB_IT_STRING ); PHB_ITEM pDelim = hb_param( 2, HB_IT_STRING ); PHB_ITEM pArray; @@ -510,18 +508,18 @@ HB_FUNC( FWORDCOUNT ) char **tokens; int iCharCount = 0; HB_BYTE nByte = ' '; - HB_ULONG ulWordCount = 0; + HB_SIZE ulWordCount = 0; /* file parameter correctly passed */ if( !pSrc ) { - hb_retni( 0 ); + hb_retns( 0 ); return; } if( hb_itemGetCLen( pSrc ) == 0 ) { - hb_retni( 0 ); + hb_retns( 0 ); return; } @@ -531,7 +529,7 @@ HB_FUNC( FWORDCOUNT ) /* return 0 on failure */ if( !inFile ) { - hb_retni( 0 ); + hb_retns( 0 ); return; } @@ -554,7 +552,7 @@ HB_FUNC( FWORDCOUNT ) } /* return number of words */ - hb_retnl( ulWordCount ); + hb_retns( ulWordCount ); /* clean up */ hb_xfree( string ); @@ -566,19 +564,19 @@ HB_FUNC( FLINECOUNT ) { FILE *inFile ; PHB_ITEM pSrc = hb_param( 1, HB_IT_STRING ); - HB_ULONG ulLineCount = 0; + HB_SIZE ulLineCount = 0; int ch; /* file parameter correctly passed */ if( !pSrc ) { - hb_retni( 0 ); + hb_retns( 0 ); return; } if( hb_itemGetCLen( pSrc ) == 0 ) { - hb_retni( 0 ); + hb_retns( 0 ); return; } @@ -588,7 +586,7 @@ HB_FUNC( FLINECOUNT ) /* return 0 on failure */ if( !inFile ) { - hb_retni( 0 ); + hb_retns( 0 ); return; } @@ -602,7 +600,7 @@ HB_FUNC( FLINECOUNT ) } /* return number of lines */ - hb_retnl( ulLineCount ); + hb_retns( ulLineCount ); /* clean up */ fclose( inFile ); @@ -613,19 +611,19 @@ HB_FUNC( FCHARCOUNT ) { FILE *inFile ; PHB_ITEM pSrc = hb_param( 1, HB_IT_STRING ); - HB_ULONG ulResult = 0; + HB_SIZE ulResult = 0; int ch; /* file parameter correctly passed */ if( !pSrc ) { - hb_retni( 0 ); + hb_retns( 0 ); return; } if( hb_itemGetCLen( pSrc ) == 0 ) { - hb_retni( 0 ); + hb_retns( 0 ); return; } @@ -635,7 +633,7 @@ HB_FUNC( FCHARCOUNT ) /* return 0 on failure */ if( !inFile ) { - hb_retni( 0 ); + hb_retns( 0 ); return; } @@ -655,7 +653,7 @@ HB_FUNC( FCHARCOUNT ) } /* return number of characters */ - hb_retnl( ulResult ); + hb_retns( ulResult ); /* clean up */ fclose( inFile ); @@ -665,7 +663,7 @@ HB_FUNC( FCHARCOUNT ) HB_FUNC( FPARSELINE ) { PHB_ITEM pArray; - int iWords = 0; + HB_ISIZ nWords = 0; const char * szText; pArray = hb_itemArrayNew( 0 ); @@ -674,9 +672,11 @@ HB_FUNC( FPARSELINE ) if( szText ) { const char * szDelim = hb_parc( 2 ); + int iWords; hb_ParseLine( pArray, szText, szDelim ? ( unsigned char ) *szDelim : ',', &iWords ); + nWords = iWords; } hb_itemReturnRelease( pArray ); - hb_stornl( iWords, 3 ); + hb_storns( nWords, 3 ); } diff --git a/harbour/contrib/xhb/freadlin.c b/harbour/contrib/xhb/freadlin.c index bb3caed682..c177a3fa78 100644 --- a/harbour/contrib/xhb/freadlin.c +++ b/harbour/contrib/xhb/freadlin.c @@ -169,7 +169,7 @@ HB_FUNC( HB_FREADLINE ) const char ** Term; char * pBuffer; HB_ISIZ * iTermSizes; - HB_ISIZ lSize = hb_parnl( 4 ); + HB_ISIZ lSize = hb_parns( 4 ); HB_ISIZ i, iTerms; HB_BOOL bFound, bEOF; @@ -235,7 +235,7 @@ HB_FUNC( HB_FREADLINE ) if( ! hb_storclen_buffer( pBuffer, lSize, 2 ) ) hb_xfree( pBuffer ); - hb_retnl( bEOF ? -1 : 0 ); + hb_retns( bEOF ? -1 : 0 ); hb_xfree( ( void * ) Term ); hb_xfree( iTermSizes ); } diff --git a/harbour/contrib/xhb/xhbfunc.c b/harbour/contrib/xhb/xhbfunc.c index 8f5314a0a2..2d3d7e91c5 100644 --- a/harbour/contrib/xhb/xhbfunc.c +++ b/harbour/contrib/xhb/xhbfunc.c @@ -81,11 +81,11 @@ HB_FUNC( HB_POINTER2STRING ) PHB_ITEM pLen = hb_param( 2, HB_IT_NUMERIC ); if( HB_IS_POINTER( pPointer ) && pLen ) - hb_retclen_const( ( char * ) hb_itemGetPtr( pPointer ), ( HB_SIZE ) hb_itemGetNL( pLen ) ); + hb_retclen_const( ( char * ) hb_itemGetPtr( pPointer ), hb_itemGetNS( pLen ) ); else if( HB_IS_INTEGER( pPointer ) && pLen ) - hb_retclen_const( ( char * ) hb_itemGetNI( pPointer ), ( HB_SIZE ) hb_itemGetNL( pLen ) ); + hb_retclen_const( ( char * ) hb_itemGetNI( pPointer ), hb_itemGetNS( pLen ) ); else if( HB_IS_LONG( pPointer ) && pLen ) - hb_retclen_const( ( char * ) hb_itemGetNL( pPointer ), ( HB_SIZE ) hb_itemGetNL( pLen ) ); + hb_retclen_const( ( char * ) 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 ) ); } diff --git a/harbour/contrib/xhb/xhbhasha.c b/harbour/contrib/xhb/xhbhasha.c index 7598d47306..92536b91af 100644 --- a/harbour/contrib/xhb/xhbhasha.c +++ b/harbour/contrib/xhb/xhbhasha.c @@ -174,7 +174,7 @@ HB_FUNC( HAAGETPOS ) { HB_SIZE ulPos; hb_hashScan( pHash, pKey, &ulPos ); - hb_retnint( ulPos ); + hb_retns( ulPos ); } } diff --git a/harbour/contrib/xhb/xhbmsgs.c b/harbour/contrib/xhb/xhbmsgs.c index bdc3159727..928e0efa7d 100644 --- a/harbour/contrib/xhb/xhbmsgs.c +++ b/harbour/contrib/xhb/xhbmsgs.c @@ -321,7 +321,7 @@ HB_FUNC( XHB_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 ); @@ -362,7 +362,7 @@ HB_FUNC( XHB_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/src/rtl/at.c b/harbour/src/rtl/at.c index a72089fbcf..1bb1ab5d9d 100644 --- a/harbour/src/rtl/at.c +++ b/harbour/src/rtl/at.c @@ -69,7 +69,7 @@ HB_FUNC( HB_AT ) HB_SIZE nPos; if( nStart > nTextLength || nEnd < nStart ) - hb_retnl( 0 ); + hb_retns( 0 ); else { if( nEnd > nTextLength ) diff --git a/harbour/src/rtl/cdpapihb.c b/harbour/src/rtl/cdpapihb.c index 11fb37e729..48e6bff65c 100644 --- a/harbour/src/rtl/cdpapihb.c +++ b/harbour/src/rtl/cdpapihb.c @@ -252,8 +252,8 @@ HB_FUNC( HB_UTF8SUBSTR ) { char * szDest = NULL; HB_SIZE nLen = hb_parclen( 1 ), nDest = 0; - HB_ISIZ lFrom = hb_parnl( 2 ); - HB_ISIZ lCount = iPCount < 3 ? ( HB_ISIZ ) nLen : hb_parnl( 3 ); + HB_ISIZ lFrom = hb_parns( 2 ); + HB_ISIZ lCount = iPCount < 3 ? ( HB_ISIZ ) nLen : hb_parns( 3 ); if( lFrom < 0 ) { @@ -282,7 +282,7 @@ HB_FUNC( HB_UTF8LEFT ) if( szString && HB_ISNUM( 2 ) ) { - HB_ISIZ lLenReq = hb_parnl( 2 ); + HB_ISIZ lLenReq = hb_parns( 2 ); HB_SIZE nDest = 0; char * szDest = NULL; @@ -305,7 +305,7 @@ HB_FUNC( HB_UTF8RIGHT ) if( szString && HB_ISNUM( 2 ) ) { - HB_ISIZ lLenReq = hb_parnl( 2 ), lFrom; + HB_ISIZ lLenReq = hb_parns( 2 ), lFrom; HB_SIZE nLen = hb_parclen( 1 ), nDest = 0; char * szDest = NULL; @@ -333,7 +333,7 @@ HB_FUNC( HB_UTF8PEEK ) if( szString && HB_ISNUM( 2 ) ) { - HB_SIZE nPos = hb_parnl( 2 ); + HB_SIZE nPos = hb_parns( 2 ); HB_SIZE nLen = hb_parclen( 1 ); if( nPos > 0 && nPos <= nLen ) @@ -354,7 +354,7 @@ HB_FUNC( HB_UTF8POKE ) const char * szString = hb_itemGetCPtr( pText ); HB_SIZE nLen = hb_parclen( 1 ), nPos; - nPos = utf8pos( szString, nLen, hb_parnl( 2 ) ); + nPos = utf8pos( szString, nLen, hb_parns( 2 ) ); if( nPos ) { HB_WCHAR uc, uc2; @@ -402,8 +402,8 @@ HB_FUNC( HB_UTF8STUFF ) if( szString && HB_ISNUM( 2 ) && HB_ISNUM( 3 ) && HB_ISCHAR( 4 ) ) { HB_SIZE nLen = hb_parclen( 1 ); - HB_SIZE nPos = hb_parnl( 2 ); - HB_SIZE nDel = hb_parnl( 3 ); + HB_SIZE nPos = hb_parns( 2 ); + HB_SIZE nDel = hb_parns( 3 ); HB_SIZE nIns = hb_parclen( 4 ); HB_SIZE nTot; diff --git a/harbour/src/rtl/hbzlib.c b/harbour/src/rtl/hbzlib.c index 6408f34907..298fb20d75 100644 --- a/harbour/src/rtl/hbzlib.c +++ b/harbour/src/rtl/hbzlib.c @@ -262,8 +262,8 @@ HB_FUNC( HB_ZUNCOMPRESS ) } else { - ulDstLen = ( uLong ) ( HB_ISNUM( 2 ) ? hb_parns( 2 ) : - hb_zlibUncompressedSize( szData, ulLen, &iResult ) ); + ulDstLen = HB_ISNUM( 2 ) ? ( uLong ) hb_parns( 2 ) : + ( uLong ) hb_zlibUncompressedSize( szData, ulLen, &iResult ); if( iResult == Z_OK ) { pDest = ( char * ) hb_xalloc( ulDstLen + 1 ); diff --git a/harbour/src/rtl/hbzlibgz.c b/harbour/src/rtl/hbzlibgz.c index cf000cb0d8..19e7d688e9 100644 --- a/harbour/src/rtl/hbzlibgz.c +++ b/harbour/src/rtl/hbzlibgz.c @@ -174,7 +174,7 @@ HB_FUNC( HB_GZREAD ) { if( HB_ISNUM( 3 ) ) { - HB_SIZE ulLim = ( HB_SIZE ) hb_parnl( 3 ); + HB_SIZE ulLim = hb_parns( 3 ); if( ulLim < ulLen ) ulLen = ulLim; } @@ -196,7 +196,7 @@ HB_FUNC( HB_GZWRITE ) gzFile gz = hb_gzParam( 1 ); if( gz ) hb_retni( gzwrite( gz, szData, - ( unsigned ) ( HB_ISNUM( 3 ) ? hb_parns( 3 ) : hb_parclen( 2 ) ) ) ); + HB_ISNUM( 3 ) ? ( unsigned ) hb_parns( 3 ) : ( unsigned ) hb_parclen( 2 ) ) ); } else hb_errRT_BASE_SubstR( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); diff --git a/harbour/src/rtl/strtran.c b/harbour/src/rtl/strtran.c index 00ca670352..ba98b67354 100644 --- a/harbour/src/rtl/strtran.c +++ b/harbour/src/rtl/strtran.c @@ -104,7 +104,7 @@ HB_FUNC( STRTRAN ) if( HB_ISNUM( 5 ) ) { - nCount = hb_parnl( 5 ); + nCount = hb_parns( 5 ); bAll = HB_FALSE; } else diff --git a/harbour/src/rtl/stuff.c b/harbour/src/rtl/stuff.c index fcd2885bf6..b3c1741a3b 100644 --- a/harbour/src/rtl/stuff.c +++ b/harbour/src/rtl/stuff.c @@ -59,8 +59,8 @@ HB_FUNC( STUFF ) { const char * szText = hb_parc( 1 ); HB_SIZE ulText = hb_parclen( 1 ); - HB_SIZE ulPos = hb_parnl( 2 ); - HB_SIZE ulDel = hb_parnl( 3 ); + HB_SIZE ulPos = hb_parns( 2 ); + HB_SIZE ulDel = hb_parns( 3 ); HB_SIZE ulInsert = hb_parclen( 4 ); HB_SIZE ulTotalLen; diff --git a/harbour/src/rtl/substr.c b/harbour/src/rtl/substr.c index 7b9ec7a66c..c755854015 100644 --- a/harbour/src/rtl/substr.c +++ b/harbour/src/rtl/substr.c @@ -62,8 +62,8 @@ HB_FUNC( SUBSTR ) if( pText && HB_ISNUM( 2 ) ) { - HB_ISIZ lPos = hb_parnl( 2 ); - HB_ISIZ lSize = ( HB_ISIZ ) hb_itemGetCLen( pText ); + HB_ISIZ lPos = hb_parns( 2 ); + HB_ISIZ lSize = hb_itemGetCLen( pText ); if( lPos < 0 ) { @@ -84,7 +84,7 @@ HB_FUNC( SUBSTR ) { if( HB_ISNUM( 3 ) ) { - lLen = hb_parnl( 3 ); + lLen = hb_parns( 3 ); if( lLen > lSize - lPos ) lLen = lSize - lPos; diff --git a/harbour/src/vm/arrayshb.c b/harbour/src/vm/arrayshb.c index a1acbf2f6a..45a6dd192e 100644 --- a/harbour/src/vm/arrayshb.c +++ b/harbour/src/vm/arrayshb.c @@ -65,7 +65,7 @@ static void hb_arrayNewRagged( PHB_ITEM pArray, int iDimension ) HB_TRACE(HB_TR_DEBUG, ("hb_arrayNewRagged(%p, %d)", pArray, iDimension)); - ulElements = ( HB_SIZE ) hb_parnl( iDimension ); + ulElements = hb_parns( iDimension ); /* create an array */ hb_arrayNew( pArray, ulElements ); @@ -96,7 +96,7 @@ HB_FUNC( ARRAY ) break; } - if( hb_parnl( iParam ) < 0 ) /* || hb_parnl( iParam ) <= 4096 */ + if( hb_parns( iParam ) < 0 ) /* || hb_parns( iParam ) <= 4096 */ { #ifdef HB_CLP_STRICT hb_errRT_BASE( EG_BOUND, 1131, NULL, hb_langDGetErrorDesc( EG_ARRDIMENSION ), 0 ); @@ -259,10 +259,10 @@ HB_FUNC( ASCAN ) HB_SIZE ulStart = hb_parns( 3 ); HB_SIZE ulCount = hb_parns( 4 ); - hb_retnint( hb_arrayScan( pArray, pValue, - HB_ISNUM( 3 ) ? &ulStart : NULL, - HB_ISNUM( 4 ) ? &ulCount : NULL, - HB_FALSE ) ); + hb_retns( hb_arrayScan( pArray, pValue, + HB_ISNUM( 3 ) ? &ulStart : NULL, + HB_ISNUM( 4 ) ? &ulCount : NULL, + HB_FALSE ) ); } else hb_retni( 0 ); @@ -279,10 +279,10 @@ HB_FUNC( HB_ASCAN ) HB_SIZE ulStart = hb_parns( 3 ); HB_SIZE ulCount = hb_parns( 4 ); - hb_retnint( hb_arrayScan( pArray, pValue, - HB_ISNUM( 3 ) ? &ulStart : NULL, - HB_ISNUM( 4 ) ? &ulCount : NULL, - hb_parl( 5 ) ) ); + hb_retns( hb_arrayScan( pArray, pValue, + HB_ISNUM( 3 ) ? &ulStart : NULL, + HB_ISNUM( 4 ) ? &ulCount : NULL, + hb_parl( 5 ) ) ); } else hb_retni( 0 ); @@ -298,10 +298,10 @@ HB_FUNC( HB_RASCAN ) HB_SIZE ulStart = hb_parns( 3 ); HB_SIZE ulCount = hb_parns( 4 ); - hb_retnint( hb_arrayRevScan( pArray, pValue, - HB_ISNUM( 3 ) ? &ulStart : NULL, - HB_ISNUM( 4 ) ? &ulCount : NULL, - hb_parl( 5 ) ) ); + hb_retns( hb_arrayRevScan( pArray, pValue, + HB_ISNUM( 3 ) ? &ulStart : NULL, + HB_ISNUM( 4 ) ? &ulCount : NULL, + hb_parl( 5 ) ) ); } else hb_retni( 0 ); diff --git a/harbour/src/vm/asort.c b/harbour/src/vm/asort.c index 0943bfc788..84c7f8135c 100644 --- a/harbour/src/vm/asort.c +++ b/harbour/src/vm/asort.c @@ -256,8 +256,8 @@ HB_FUNC( ASORT ) if( pArray && ! hb_arrayIsObject( pArray ) ) { - HB_SIZE ulStart = hb_parnl( 2 ); - HB_SIZE ulCount = hb_parnl( 3 ); + HB_SIZE ulStart = hb_parns( 2 ); + HB_SIZE ulCount = hb_parns( 3 ); hb_arraySort( pArray, HB_ISNUM( 2 ) ? &ulStart : NULL, diff --git a/harbour/src/vm/hashfunc.c b/harbour/src/vm/hashfunc.c index 07acb5c398..4445ecd02d 100644 --- a/harbour/src/vm/hashfunc.c +++ b/harbour/src/vm/hashfunc.c @@ -103,7 +103,7 @@ HB_FUNC( HB_HPOS ) { HB_SIZE ulPos; hb_hashScan( pHash, pKey, &ulPos ); - hb_retnint( ulPos ); + hb_retns( ulPos ); } else hb_errRT_BASE( EG_ARG, 1123, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); @@ -624,7 +624,7 @@ HB_FUNC( HB_HSCAN ) } } - hb_retnint( fFound ? ulStart : 0 ); + hb_retns( fFound ? ulStart : 0 ); } else hb_errRT_BASE( EG_ARG, 1123, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );