2002-02-04 13:50 UTC+0100 Ignacio Ortiz <ignacio@fivetech.com>
This commit is contained in:
@@ -44,7 +44,11 @@ static HB_FUNCINFO hb_StdFunc[] =
|
||||
{ "AADD" , 2, 2 },
|
||||
{ "ABS" , 1, 1 },
|
||||
{ "ASC" , 1, 1 },
|
||||
#if defined( HB_C52_STRICT )
|
||||
{ "AT" , 2, 2 },
|
||||
#else
|
||||
{ "AT" , 2, 4 },
|
||||
#endif
|
||||
{ "BOF" , 0, 0 },
|
||||
{ "BREAK" , 0, 1 },
|
||||
{ "CDOW" , 1, 1 },
|
||||
@@ -157,4 +161,3 @@ void hb_compFunCallCheck( char * szFuncCall, int iArgs )
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -63,10 +63,24 @@ HB_FUNC( AT )
|
||||
|
||||
if( pText && pSub )
|
||||
{
|
||||
hb_retnl( hb_strAt( hb_itemGetCPtr( pSub ), hb_itemGetCLen( pSub ),
|
||||
hb_itemGetCPtr( pText ), hb_itemGetCLen( pText ) ) );
|
||||
ULONG ulTextLength = hb_itemGetCLen( pText );
|
||||
ULONG ulStart = ISNUM( 3 ) ? hb_parnl( 3 ) : 1;
|
||||
ULONG ulEnd = ISNUM( 4 ) ? hb_parnl( 4 ) : ulTextLength;
|
||||
ULONG ulPos;
|
||||
|
||||
if ( ulStart > ulTextLength || ulEnd < ulStart ) hb_retnl( 0 );
|
||||
else
|
||||
{
|
||||
if ( ulEnd > ulTextLength ) ulEnd = ulTextLength;
|
||||
|
||||
ulPos = hb_strAt( hb_itemGetCPtr( pSub ), hb_itemGetCLen( pSub ),
|
||||
hb_itemGetCPtr( pText ) + ulStart - 1, ulEnd - ulStart + 1 );
|
||||
|
||||
if ( ulPos > 0) ulPos += ( ulStart - 1 );
|
||||
|
||||
hb_retnl( ulPos );
|
||||
}
|
||||
}
|
||||
else
|
||||
hb_errRT_BASE_SubstR( EG_ARG, 1108, NULL, "AT", 2, hb_paramError( 1 ), hb_paramError( 2 ) );
|
||||
}
|
||||
|
||||
}
|
||||
@@ -68,9 +68,14 @@ HB_FUNC( MEMOLINE )
|
||||
ULONG ulLineBegin;
|
||||
ULONG ulLineEnd;
|
||||
|
||||
if( ulLineLength < 4 || ulLineLength > 254 )
|
||||
if( ulLineLength < 4 )
|
||||
ulLineLength = 79;
|
||||
|
||||
#if defined( HB_C52_STRICT )
|
||||
if( ulLineLength > 254 )
|
||||
ulLineLength = 79;
|
||||
#endif
|
||||
|
||||
if( ulTabLength > ulLineLength )
|
||||
ulTabLength = ulLineLength - 1;
|
||||
|
||||
|
||||
@@ -64,9 +64,14 @@ HB_FUNC( MLCOUNT )
|
||||
ULONG ulLines = 0;
|
||||
ULONG ulPos;
|
||||
|
||||
if( ulLineLength < 4 || ulLineLength > 254 )
|
||||
if( ulLineLength < 4 )
|
||||
ulLineLength = 79;
|
||||
|
||||
#if defined( HB_C52_STRICT )
|
||||
if( ulLineLength > 254 )
|
||||
ulLineLength = 79;
|
||||
#endif
|
||||
|
||||
if( ulTabLength > ulLineLength )
|
||||
ulTabLength = ulLineLength - 1;
|
||||
|
||||
|
||||
@@ -124,7 +124,7 @@ CLASS Get
|
||||
METHOD UpdateBuffer() INLINE ::buffer := ::PutMask(), ::Assign(), Self
|
||||
|
||||
METHOD VarGet()
|
||||
METHOD VarPut()
|
||||
METHOD VarPut(xValue, lReFormat)
|
||||
|
||||
METHOD End()
|
||||
#ifdef HB_COMPAT_XPP
|
||||
@@ -299,7 +299,7 @@ return ::cPicFunc + ' ' + ::cPicMask
|
||||
|
||||
METHOD Assign() CLASS Get
|
||||
|
||||
::VarPut( ::unTransform() )
|
||||
::VarPut( ::unTransform(), .f. )
|
||||
|
||||
return Self
|
||||
|
||||
@@ -381,7 +381,7 @@ METHOD Undo() CLASS Get
|
||||
if ::hasfocus
|
||||
::buffer := ::PutMask( ::original )
|
||||
::pos := 1
|
||||
::VarPut( ::Original )
|
||||
::VarPut( ::Original, .f. )
|
||||
endif
|
||||
|
||||
return Self
|
||||
@@ -435,13 +435,18 @@ return Self
|
||||
|
||||
//---------------------------------------------------------------------------//
|
||||
|
||||
METHOD VarPut( xValue ) CLASS Get
|
||||
METHOD VarPut( xValue, lReFormat ) CLASS Get
|
||||
|
||||
DEFAULT lReFormat TO .t.
|
||||
|
||||
if ::block != nil
|
||||
Eval( ::block, xValue )
|
||||
::Type := ValType( xValue )
|
||||
::nDispLen := NIL
|
||||
::Picture( ::cPicture )
|
||||
if lReFormat
|
||||
::Type := ValType( xValue )
|
||||
::nDispLen := NIL
|
||||
::Picture( ::cPicture )
|
||||
::BufferUpdate()
|
||||
endif
|
||||
endif
|
||||
|
||||
return xValue
|
||||
|
||||
Reference in New Issue
Block a user