2010-06-19 12:52 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* src/vm/itemapi.c
* src/vm/arrays.c
* include/hbapi.h
* Renamed hb_arrayGetNSize(), hb_arraySetNSize(),
hb_itemGetNSize(), hb_itemPutNSize() functions to
hb_arrayGetNS(), hb_arraySetNS(),
hb_itemGetNS(), hb_itemPutNS().
* src/rtl/at.c
* src/rtl/ati.c
* contrib/xhb/xhbat.c
* Started to use hb_*ns() instead of hb_*nl() for size values.
This commit is contained in:
@@ -16,6 +16,20 @@
|
||||
The license applies to all entries newer than 2009-04-28.
|
||||
*/
|
||||
|
||||
2010-06-19 12:52 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
|
||||
* src/vm/itemapi.c
|
||||
* src/vm/arrays.c
|
||||
* include/hbapi.h
|
||||
* Renamed hb_arrayGetNSize(), hb_arraySetNSize(),
|
||||
hb_itemGetNSize(), hb_itemPutNSize() functions to
|
||||
hb_arrayGetNS(), hb_arraySetNS(),
|
||||
hb_itemGetNS(), hb_itemPutNS().
|
||||
|
||||
* src/rtl/at.c
|
||||
* src/rtl/ati.c
|
||||
* contrib/xhb/xhbat.c
|
||||
* Started to use hb_*ns() instead of hb_*nl() for size values.
|
||||
|
||||
2010-06-19 12:46 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
|
||||
* src/vm/extend.c
|
||||
* include/hbapi.h
|
||||
|
||||
@@ -142,7 +142,7 @@ HB_FUNC( ATSKIPSTRINGS ) /* cFind, cWhere, nStart */
|
||||
|
||||
if( pFind && pWhere )
|
||||
{
|
||||
HB_SIZE ulStart = ( HB_SIZE ) hb_parnl(3);
|
||||
HB_SIZE ulStart = ( HB_SIZE ) hb_parns( 3 );
|
||||
|
||||
if( ulStart > 0 )
|
||||
ulStart--;
|
||||
@@ -156,13 +156,13 @@ HB_FUNC( ATSKIPSTRINGS ) /* cFind, cWhere, nStart */
|
||||
|
||||
if( ulRet )
|
||||
{
|
||||
hb_retnl( ulRet + ulStart );
|
||||
hb_retns( ulRet + ulStart );
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
hb_retnl( 0 );
|
||||
hb_retns( 0 );
|
||||
}
|
||||
|
||||
/* Case insensitive hb_strAt() function */
|
||||
@@ -229,12 +229,12 @@ HB_FUNC( ATI )
|
||||
|
||||
/* Stop searching if starting past beyond end. */
|
||||
if( lStart >= lEnd )
|
||||
hb_retnl( 0 );
|
||||
hb_retns( 0 );
|
||||
else
|
||||
{
|
||||
ulPos = hb_strAtI( hb_itemGetCPtr( pSub ), hb_itemGetCLen( pSub ),
|
||||
hb_itemGetCPtr( pText ) + lStart, lEnd - lStart );
|
||||
hb_retnl( ulPos ? ulPos + lStart : 0 );
|
||||
hb_retns( ulPos ? ulPos + lStart : 0 );
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@@ -731,7 +731,7 @@ extern HB_EXPORT void hb_retnlllen( HB_LONGLONG lNumber, int iWidth ); /* retu
|
||||
#define hb_retnllen( lNumber, iWidth ) hb_itemPutNLLen( hb_stackReturnItem(), lNumber, iWidth )
|
||||
#define hb_retnlllen( lNumber, iWidth ) hb_itemPutNLLLen( hb_stackReturnItem(), lNumber, iWidth )
|
||||
#define hb_retnint( iNumber ) hb_itemPutNInt( hb_stackReturnItem(), iNumber )
|
||||
#define hb_retns( nNumber ) hb_itemPutNSize( hb_stackReturnItem(), nNumber )
|
||||
#define hb_retns( nNumber ) hb_itemPutNS( hb_stackReturnItem(), nNumber )
|
||||
#define hb_retnintlen( lNumber, iWidth ) hb_itemPutNIntLen( hb_stackReturnItem(), lNumber, iWidth )
|
||||
#define hb_retptr( pointer ) hb_itemPutPtr( hb_stackReturnItem(), pointer )
|
||||
#define hb_retptrGC( pointer ) hb_itemPutPtrGC( hb_stackReturnItem(), pointer )
|
||||
@@ -803,7 +803,7 @@ extern HB_EXPORT HB_BOOL hb_arrayGetL( PHB_ITEM pArray, HB_SIZE ulIndex );
|
||||
extern HB_EXPORT int hb_arrayGetNI( PHB_ITEM pArray, HB_SIZE ulIndex ); /* retrieves the int value contained on an array element */
|
||||
extern HB_EXPORT long hb_arrayGetNL( PHB_ITEM pArray, HB_SIZE ulIndex ); /* retrieves the long numeric value contained on an array element */
|
||||
extern HB_EXPORT HB_MAXINT hb_arrayGetNInt( PHB_ITEM pArray, HB_SIZE ulIndex ); /* retrieves the HB_MAXINT value contained on an array element */
|
||||
extern HB_EXPORT HB_SIZE hb_arrayGetNSize( PHB_ITEM pArray, HB_SIZE ulIndex ); /* retrieves the HB_SIZE value contained on an array element */
|
||||
extern HB_EXPORT HB_SIZE hb_arrayGetNS( PHB_ITEM pArray, HB_SIZE ulIndex ); /* retrieves the HB_SIZE value contained on an array element */
|
||||
extern HB_EXPORT double hb_arrayGetND( PHB_ITEM pArray, HB_SIZE ulIndex ); /* retrieves the double value contained on an array element */
|
||||
extern HB_EXPORT char * hb_arrayGetDS( PHB_ITEM pArray, HB_SIZE ulIndex, char * szDate ); /* retrieves the date value contained in an array element */
|
||||
extern HB_EXPORT long hb_arrayGetDL( PHB_ITEM pArray, HB_SIZE ulIndex ); /* retrieves the date value contained in an array element, as a long integer */
|
||||
@@ -823,7 +823,7 @@ extern HB_EXPORT HB_BOOL hb_arraySetNL( PHB_ITEM pArray, HB_SIZE ulIndex, l
|
||||
extern HB_EXPORT HB_BOOL hb_arraySetNLL( PHB_ITEM pArray, HB_SIZE ulIndex, HB_LONGLONG llNumber );
|
||||
#endif
|
||||
extern HB_EXPORT HB_BOOL hb_arraySetNInt( PHB_ITEM pArray, HB_SIZE ulIndex, HB_MAXINT lNumber );
|
||||
extern HB_EXPORT HB_BOOL hb_arraySetNSize( PHB_ITEM pArray, HB_SIZE ulIndex, HB_SIZE nNumber );
|
||||
extern HB_EXPORT HB_BOOL hb_arraySetNS( PHB_ITEM pArray, HB_SIZE ulIndex, HB_SIZE nNumber );
|
||||
extern HB_EXPORT HB_BOOL hb_arraySetND( PHB_ITEM pArray, HB_SIZE ulIndex, double dNumber );
|
||||
extern HB_EXPORT HB_BOOL hb_arraySetC( PHB_ITEM pArray, HB_SIZE ulIndex, const char * szText );
|
||||
extern HB_EXPORT HB_BOOL hb_arraySetCL( PHB_ITEM pArray, HB_SIZE ulIndex, const char * szText, HB_SIZE ulLen );
|
||||
|
||||
@@ -64,8 +64,8 @@ HB_FUNC( HB_AT )
|
||||
if( pText && pSub )
|
||||
{
|
||||
HB_SIZE nTextLength = hb_itemGetCLen( pText );
|
||||
HB_SIZE nStart = hb_parnldef( 3, 1 );
|
||||
HB_SIZE nEnd = ( HB_SIZE ) hb_parnldef( 4, nTextLength );
|
||||
HB_SIZE nStart = hb_parnsdef( 3, 1 );
|
||||
HB_SIZE nEnd = ( HB_SIZE ) hb_parnsdef( 4, nTextLength );
|
||||
HB_SIZE nPos;
|
||||
|
||||
if( nStart > nTextLength || nEnd < nStart )
|
||||
@@ -81,7 +81,7 @@ HB_FUNC( HB_AT )
|
||||
if( nPos > 0 )
|
||||
nPos += ( nStart - 1 );
|
||||
|
||||
hb_retnl( nPos );
|
||||
hb_retns( nPos );
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -95,7 +95,7 @@ HB_FUNC( AT )
|
||||
|
||||
if( pText && pSub )
|
||||
{
|
||||
hb_retnl( hb_strAt( hb_itemGetCPtr( pSub ), hb_itemGetCLen( pSub ),
|
||||
hb_retns( hb_strAt( hb_itemGetCPtr( pSub ), hb_itemGetCLen( pSub ),
|
||||
hb_itemGetCPtr( pText ), hb_itemGetCLen( pText ) ) );
|
||||
}
|
||||
else
|
||||
|
||||
@@ -96,12 +96,12 @@ HB_FUNC( HB_ATI )
|
||||
if( pText && pSub )
|
||||
{
|
||||
HB_SIZE ulTextLength = hb_itemGetCLen( pText );
|
||||
HB_SIZE ulStart = hb_parnldef( 3, 1 );
|
||||
HB_SIZE ulEnd = ( HB_SIZE ) hb_parnldef( 4, ulTextLength );
|
||||
HB_SIZE ulStart = hb_parnsdef( 3, 1 );
|
||||
HB_SIZE ulEnd = ( HB_SIZE ) hb_parnsdef( 4, ulTextLength );
|
||||
HB_SIZE nPos;
|
||||
|
||||
if( ulStart > ulTextLength || ulEnd < ulStart )
|
||||
hb_retnl( 0 );
|
||||
hb_retns( 0 );
|
||||
else
|
||||
{
|
||||
if( ulEnd > ulTextLength )
|
||||
@@ -113,7 +113,7 @@ HB_FUNC( HB_ATI )
|
||||
if( nPos > 0 )
|
||||
nPos += ( ulStart - 1 );
|
||||
|
||||
hb_retnl( nPos );
|
||||
hb_retns( nPos );
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@@ -606,12 +606,12 @@ HB_MAXINT hb_arrayGetNInt( PHB_ITEM pArray, HB_SIZE ulIndex )
|
||||
return 0;
|
||||
}
|
||||
|
||||
HB_SIZE hb_arrayGetNSize( PHB_ITEM pArray, HB_SIZE ulIndex )
|
||||
HB_SIZE hb_arrayGetNS( PHB_ITEM pArray, HB_SIZE ulIndex )
|
||||
{
|
||||
HB_TRACE(HB_TR_DEBUG, ("hb_arrayGetNSize(%p, %lu)", pArray, ulIndex));
|
||||
HB_TRACE(HB_TR_DEBUG, ("hb_arrayGetNS(%p, %lu)", pArray, ulIndex));
|
||||
|
||||
if( HB_IS_ARRAY( pArray ) && ulIndex > 0 && ulIndex <= pArray->item.asArray.value->ulLen )
|
||||
return hb_itemGetNSize( pArray->item.asArray.value->pItems + ulIndex - 1 );
|
||||
return hb_itemGetNS( pArray->item.asArray.value->pItems + ulIndex - 1 );
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
@@ -826,13 +826,13 @@ HB_BOOL hb_arraySetNInt( PHB_ITEM pArray, HB_SIZE ulIndex, HB_MAXINT lNumber )
|
||||
return HB_FALSE;
|
||||
}
|
||||
|
||||
HB_BOOL hb_arraySetNSize( PHB_ITEM pArray, HB_SIZE ulIndex, HB_SIZE nNumber )
|
||||
HB_BOOL hb_arraySetNS( PHB_ITEM pArray, HB_SIZE ulIndex, HB_SIZE nNumber )
|
||||
{
|
||||
HB_TRACE(HB_TR_DEBUG, ("hb_arraySetNSize(%p, %lu, %" HB_PFS "d)", pArray, ulIndex, nNumber));
|
||||
HB_TRACE(HB_TR_DEBUG, ("hb_arraySetNS(%p, %lu, %" HB_PFS "d)", pArray, ulIndex, nNumber));
|
||||
|
||||
if( HB_IS_ARRAY( pArray ) && ulIndex > 0 && ulIndex <= pArray->item.asArray.value->ulLen )
|
||||
{
|
||||
hb_itemPutNSize( pArray->item.asArray.value->pItems + ulIndex - 1, nNumber );
|
||||
hb_itemPutNS( pArray->item.asArray.value->pItems + ulIndex - 1, nNumber );
|
||||
return HB_TRUE;
|
||||
}
|
||||
else
|
||||
|
||||
@@ -670,9 +670,9 @@ HB_MAXINT hb_itemGetNInt( PHB_ITEM pItem )
|
||||
return 0;
|
||||
}
|
||||
|
||||
HB_SIZE hb_itemGetNSize( PHB_ITEM pItem )
|
||||
HB_SIZE hb_itemGetNS( PHB_ITEM pItem )
|
||||
{
|
||||
HB_TRACE(HB_TR_DEBUG, ("hb_itemGetNSize(%p)", pItem));
|
||||
HB_TRACE(HB_TR_DEBUG, ("hb_itemGetNS(%p)", pItem));
|
||||
|
||||
if( pItem )
|
||||
{
|
||||
@@ -1052,9 +1052,9 @@ PHB_ITEM hb_itemPutNIntLen( PHB_ITEM pItem, HB_MAXINT lNumber, int iWidth )
|
||||
}
|
||||
}
|
||||
|
||||
PHB_ITEM hb_itemPutNSize( PHB_ITEM pItem, HB_SIZE nNumber )
|
||||
PHB_ITEM hb_itemPutNS( PHB_ITEM pItem, HB_SIZE nNumber )
|
||||
{
|
||||
HB_TRACE(HB_TR_DEBUG, ("hb_itemPutNSize(%p, %" HB_PFS "d)", pItem, nNumber));
|
||||
HB_TRACE(HB_TR_DEBUG, ("hb_itemPutNS(%p, %" HB_PFS "d)", pItem, nNumber));
|
||||
|
||||
if( pItem )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user