2000-06-02 19:56 UTC+0100 Victor Szakats <info@szelvesz.hu>

This commit is contained in:
Viktor Szakats
2000-06-02 17:53:00 +00:00
parent 09aa8486ae
commit 7b24fd3601
10 changed files with 59 additions and 45 deletions

View File

@@ -1,3 +1,18 @@
2000-06-02 19:56 UTC+0100 Victor Szakats <info@szelvesz.hu>
* utils/hbtest/hbtest.prg
* utils/hbtest/make_xpp.bat
* utils/hbtest/make_xpp.cmd
! HBTEST was broken for Xbase++. Fixed.
* source/rtl/minmax.c
* source/rtl/mlpos.c
* source/rtl/mod.c
* source/rtl/mouseapi.c
* source/rtl/strmatch.c
* source/rtl/strtran.c
* Minor typos, formattings, optimizations.
2000-06-02 15:39 UTC+0100 Victor Szakats <info@szelvesz.hu>
* doc/whatsnew.txt

View File

@@ -45,8 +45,8 @@ HB_FUNC( MAX )
if( HB_IS_NUMERIC( p1 ) && HB_IS_NUMERIC( p2 ) )
{
/* NOTE: The order of these if() branches is significant, */
/* please, don't change it. [vszakats] */
/* NOTE: The order of these if() branches is significant,
please, don't change it. [vszakats] */
if( HB_IS_DOUBLE( p1 ) || HB_IS_DOUBLE( p2 ) )
{
@@ -105,8 +105,8 @@ HB_FUNC( MIN )
if( HB_IS_NUMERIC( p1 ) && HB_IS_NUMERIC( p2 ) )
{
/* NOTE: The order of these if() branches is significant, */
/* please, don't change it. [vszakats] */
/* NOTE: The order of these if() branches is significant,
please, don't change it. [vszakats] */
if( HB_IS_DOUBLE( p1 ) || HB_IS_DOUBLE( p2 ) )
{

View File

@@ -106,4 +106,5 @@ HB_FUNC( MLPOS )
hb_retnl( ulPos - ulCurLength + 1);
else
hb_retnl( ulLen );
}
}

View File

@@ -37,11 +37,11 @@
#include "hbapiitm.h"
#include "hbapierr.h"
/* NOTE: In Clipper this is written in Clipper, see the source below,
/* NOTE: In CA-Cl*pper this is written in Clipper, see the source below,
and the error handling is NOT made here, but in the % operator.
[vszakats] */
/* NOTE: CA-Clipper is buggy since it relies on the fact that the errorhandler
/* NOTE: CA-Cl*pper is buggy since it relies on the fact that the errorhandler
will silently handle zero division errors. [vszakats] */
/* NOTE: This C version fully emulates the behaviour of the original
@@ -97,5 +97,5 @@ HB_FUNC( MOD )
FUNCTION MOD( cl_num, cl_base )
LOCAL cl_result := cl_num % cl_base
RETURN IF( cl_base = 0, cl_num, iif( cl_result * cl_base < 0, cl_result + cl_base, cl_result ) )
RETURN iif( cl_base = 0, cl_num, iif( cl_result * cl_base < 0, cl_result + cl_base, cl_result ) )
*/

View File

@@ -303,12 +303,10 @@ HB_FUNC( MRESTSTATE )
HB_FUNC( MSETBOUNDS )
{
int iTop = ISNUM( 1 ) ? hb_parni( 1 ) : 0;
int iLeft = ISNUM( 2 ) ? hb_parni( 2 ) : 0;
int iBottom = ISNUM( 3 ) ? hb_parni( 3 ) : hb_gtMaxRow();
int iRight = ISNUM( 4 ) ? hb_parni( 4 ) : hb_gtMaxCol();
hb_mouseSetBounds( iTop, iLeft, iBottom, iRight );
hb_mouseSetBounds( ISNUM( 1 ) ? hb_parni( 1 ) : 0,
ISNUM( 2 ) ? hb_parni( 2 ) : 0,
ISNUM( 3 ) ? hb_parni( 3 ) : hb_gtMaxRow(),
ISNUM( 4 ) ? hb_parni( 4 ) : hb_gtMaxCol() );
}
#endif

View File

@@ -41,45 +41,43 @@ static BOOL hb_strMatchDOS( const char * pszString, const char * pszMask )
{
HB_TRACE(HB_TR_DEBUG, ("hb_strMatchDOS(%s, %s)", pszString, pszMask));
while( *pszMask && *pszString )
while( *pszMask != '\0' && *pszString != '\0' )
{
if( *pszMask == '*' )
{
while( *pszMask == '*' )
pszMask++;
pszMask++;
if( ! ( *pszMask ) )
if( *pszMask == '\0' )
return TRUE;
else
if( *pszMask == '?' )
pszString++;
else
{
while( toupper( *pszString ) != toupper( *pszMask ) )
{
if( ! ( *( ++pszString ) ) )
return FALSE;
}
while( toupper( *pszString ) == toupper( *pszMask ) )
{
if( ! ( *( ++pszString ) ) )
break;
}
pszMask++;
}
}
else
if( toupper( *pszMask ) != toupper( *pszString ) && *pszMask != '?' )
return FALSE;
else if( *pszMask == '?' )
pszString++;
else
{
while( toupper( *pszString ) != toupper( *pszMask ) )
{
if( *( ++pszString ) == '\0' )
return FALSE;
}
while( toupper( *pszString ) == toupper( *pszMask ) )
{
if( *( ++pszString ) == '\0' )
break;
}
pszMask++;
pszString++;
}
}
else if( toupper( *pszMask ) != toupper( *pszString ) && *pszMask != '?' )
return FALSE;
else
{
pszMask++;
pszString++;
}
}
return ! ( ( ! ( *pszString ) && *pszMask && *pszMask != '*') ||
( ! ( *pszMask ) && *pszString ) );
return ! ( ( *pszMask != '\0' && *pszString == '\0' && *pszMask != '*') ||
( *pszMask == '\0' && *pszString != '\0' ) );
}
/* TODO: Replace it with a code that supports real regular expressions

View File

@@ -162,8 +162,8 @@ HB_FUNC( STRTRAN )
}
else
hb_retclen( szText, ulText );
}
else
}
else
hb_retclen( szText, ulText );
}
else

View File

@@ -525,6 +525,7 @@ FUNCTION HB_SToD( cDate )
#ifndef HAVE_HBCLIP
#ifndef __HARBOUR__
#ifndef __XPP__
FUNCTION HB_SToD( cDate )
LOCAL cOldDateFormat
@@ -546,6 +547,7 @@ FUNCTION HB_SToD( cDate )
#endif
#endif
#endif
/* Don't change the position of this #include. */
#include "rt_init.ch"

View File

@@ -15,6 +15,6 @@ xpp rt_str.prg /w /n
xpp rt_stra.prg /w /n
xpp rt_trans.prg /w /n
alink hbtest rt_array rt_date rt_file rt_hvm rt_math rt_misc rt_str rt_stra rt_trans
alink hbtest rt_array rt_date rt_file rt_hvm rt_hvma rt_math rt_misc rt_str rt_stra rt_trans
del *.obj

View File

@@ -15,6 +15,6 @@ xpp rt_str.prg /w /n
xpp rt_stra.prg /w /n
xpp rt_trans.prg /w /n
alink hbtest rt_array rt_date rt_file rt_hvm rt_math rt_misc rt_str rt_stra rt_trans
alink hbtest rt_array rt_date rt_file rt_hvm rt_hvma rt_math rt_misc rt_str rt_stra rt_trans
del *.obj