2004-02-13 23:36 UTC+0100 Viktor Szakats <viktor.szakats@syenar.hu>
* source/vm/hvm.c
! hb_vmPopAliasedVar() - Fixed to be case-insensitive.
% hb_vmPushAliasedVar() - Case-insensitive handling speed up.
* unsigned long -> ULONG
* source/rtl/idle.c
* include/hbapi.h
+ Made hb_releaseCPU() public.
* source/rtl/filesys.c
* include/hbapifs.h
+ Added return value to hb_fsSetDevMode(), this way it's
fully compatible with the CA-Clipper _tdevraw() call.
* source/rtl/philes53.c
! FSETDEVMOD() now returns a numeric instead of NIL. The
returned value is always 0 now. Note added about this
incompatibility with C53.
* source/common/hbver.c
! Mistyped defines related to compatibilty fixed.
* source/rtl/strcase.c
! Incorrect assigment warnings fixed.
This commit is contained in:
@@ -8,6 +8,33 @@
|
||||
2002-12-01 23:12 UTC+0100 Foo Bar <foo.bar@foobar.org>
|
||||
*/
|
||||
|
||||
2004-02-13 23:36 UTC+0100 Viktor Szakats <viktor.szakats@syenar.hu>
|
||||
|
||||
* source/vm/hvm.c
|
||||
! hb_vmPopAliasedVar() - Fixed to be case-insensitive.
|
||||
% hb_vmPushAliasedVar() - Case-insensitive handling speed up.
|
||||
* unsigned long -> ULONG
|
||||
|
||||
* source/rtl/idle.c
|
||||
* include/hbapi.h
|
||||
+ Made hb_releaseCPU() public.
|
||||
|
||||
* source/rtl/filesys.c
|
||||
* include/hbapifs.h
|
||||
+ Added return value to hb_fsSetDevMode(), this way it's
|
||||
fully compatible with the CA-Clipper _tdevraw() call.
|
||||
|
||||
* source/rtl/philes53.c
|
||||
! FSETDEVMOD() now returns a numeric instead of NIL. The
|
||||
returned value is always 0 now. Note added about this
|
||||
incompatibility with C53.
|
||||
|
||||
* source/common/hbver.c
|
||||
! Mistyped defines related to compatibilty fixed.
|
||||
|
||||
* source/rtl/strcase.c
|
||||
! Incorrect assigment warnings fixed.
|
||||
|
||||
2004-02-13 21:56 UTC+0100 Viktor Szakats <viktor.szakats@syenar.hu>
|
||||
|
||||
* souce/rtl/gtapi.c
|
||||
|
||||
@@ -590,6 +590,7 @@ extern HB_GARBAGE_FUNC( hb_codeblockDeleteGarbage ); /* clear a codeblock before
|
||||
extern HB_GARBAGE_FUNC( hb_arrayReleaseGarbage ); /* clear an array before releasing by the GC */
|
||||
|
||||
/* idle states */
|
||||
extern void hb_releaseCPU( void );
|
||||
extern void hb_idleState( void ); /* services a single idle state */
|
||||
extern void hb_idleReset( void ); /* services a single idle state */
|
||||
extern void hb_idleShutDown( void ); /* closes all background tasks */
|
||||
|
||||
@@ -135,7 +135,7 @@ extern BOOL hb_fsRmDir ( BYTE * pszDirName ); /* remove a directory */
|
||||
extern BOOL hb_fsRename ( BYTE * pszOldName, BYTE * pszNewName ); /* rename a file */
|
||||
extern ULONG hb_fsSeek ( FHANDLE hFileHandle, LONG lOffset, USHORT uiMode ); /* reposition an open file */
|
||||
extern ULONG hb_fsTell ( FHANDLE hFileHandle ); /* retrieve the current position of a file */
|
||||
extern void hb_fsSetDevMode ( FHANDLE hFileHandle, USHORT uiDevMode ); /* change the device mode of a file (text/binary) */
|
||||
extern BOOL hb_fsSetDevMode ( FHANDLE hFileHandle, USHORT uiDevMode ); /* change the device mode of a file (text/binary) */
|
||||
extern void hb_fsSetError ( USHORT uiError ); /* set the file system error number */
|
||||
extern USHORT hb_fsWrite ( FHANDLE hFileHandle, BYTE * pBuff, USHORT ulCount ); /* write to an open file from a buffer (<=64K) */
|
||||
extern ULONG hb_fsWriteLarge ( FHANDLE hFileHandle, BYTE * pBuff, ULONG ulCount ); /* write to an open file from a buffer (>64K) */
|
||||
|
||||
@@ -556,7 +556,7 @@ void hb_verBuildInfo( void )
|
||||
hb_conOutErr( hb_conNewLine(), 0 );
|
||||
|
||||
hb_conOutErr( "Multisoft Flagship compatible extensions: ", 0 );
|
||||
#if defined( HB_FLAGSHIP_VO )
|
||||
#if defined( HB_COMPAT_FLAGSHIP )
|
||||
hb_conOutErr( "Yes", 0 );
|
||||
#else
|
||||
hb_conOutErr( "No", 0 );
|
||||
@@ -564,7 +564,7 @@ void hb_verBuildInfo( void )
|
||||
hb_conOutErr( hb_conNewLine(), 0 );
|
||||
|
||||
hb_conOutErr( "Microsoft FoxPro compatible extensions: ", 0 );
|
||||
#if defined( HB_FOXPRO_VO )
|
||||
#if defined( HB_COMPAT_FOXPRO )
|
||||
hb_conOutErr( "Yes", 0 );
|
||||
#else
|
||||
hb_conOutErr( "No", 0 );
|
||||
@@ -572,7 +572,7 @@ void hb_verBuildInfo( void )
|
||||
hb_conOutErr( hb_conNewLine(), 0 );
|
||||
|
||||
hb_conOutErr( "dBase compatible extensions: ", 0 );
|
||||
#if defined( HB_DBASE_VO )
|
||||
#if defined( HB_COMPAT_DBASE )
|
||||
hb_conOutErr( "Yes", 0 );
|
||||
#else
|
||||
hb_conOutErr( "No", 0 );
|
||||
|
||||
@@ -784,8 +784,10 @@ void hb_fsClose( FHANDLE hFileHandle )
|
||||
s_uiErrorLast = 6;
|
||||
}
|
||||
|
||||
void hb_fsSetDevMode( FHANDLE hFileHandle, USHORT uiDevMode )
|
||||
BOOL hb_fsSetDevMode( FHANDLE hFileHandle, USHORT uiDevMode )
|
||||
{
|
||||
BOOL bResult;
|
||||
|
||||
HB_TRACE(HB_TR_DEBUG, ("hb_fsSetDevMode(%p, %hu)", hFileHandle, uiDevMode));
|
||||
|
||||
#if defined(__BORLANDC__) || defined(__IBMCPP__) || defined(__DJGPP__) || defined(__CYGWIN__) || defined(__WATCOMC__)
|
||||
@@ -794,12 +796,15 @@ void hb_fsSetDevMode( FHANDLE hFileHandle, USHORT uiDevMode )
|
||||
switch( uiDevMode )
|
||||
{
|
||||
case FD_BINARY:
|
||||
setmode( hFileHandle, O_BINARY );
|
||||
bResult = ( setmode( hFileHandle, O_BINARY ) != -1 );
|
||||
break;
|
||||
|
||||
case FD_TEXT:
|
||||
setmode( hFileHandle, O_TEXT );
|
||||
bResult = ( setmode( hFileHandle, O_TEXT ) != -1 );
|
||||
break;
|
||||
|
||||
default:
|
||||
bResult = FALSE;
|
||||
}
|
||||
s_uiErrorLast = errno;
|
||||
|
||||
@@ -809,21 +814,26 @@ void hb_fsSetDevMode( FHANDLE hFileHandle, USHORT uiDevMode )
|
||||
switch( uiDevMode )
|
||||
{
|
||||
case FD_BINARY:
|
||||
_setmode( hFileHandle, _O_BINARY );
|
||||
bResult = ( _setmode( hFileHandle, _O_BINARY ) != -1 );
|
||||
break;
|
||||
|
||||
case FD_TEXT:
|
||||
_setmode( hFileHandle, _O_TEXT );
|
||||
bResult = ( _setmode( hFileHandle, _O_TEXT ) != -1 );
|
||||
break;
|
||||
|
||||
default:
|
||||
bResult = FALSE;
|
||||
}
|
||||
s_uiErrorLast = errno;
|
||||
|
||||
#else
|
||||
|
||||
bResult = FALSE;
|
||||
s_uiErrorLast = FS_ERROR;
|
||||
|
||||
#endif
|
||||
|
||||
return bResult;
|
||||
}
|
||||
|
||||
USHORT hb_fsRead( FHANDLE hFileHandle, BYTE * pBuff, USHORT uiCount )
|
||||
|
||||
@@ -92,9 +92,9 @@ static USHORT s_uiIdleMaxTask = 0;
|
||||
/* flag to indicate GarbageCollection should be done in idle state. */
|
||||
BOOL hb_vm_bCollectGarbage = TRUE;
|
||||
|
||||
static void hb_releaseCPU( void )
|
||||
void hb_releaseCPU( void )
|
||||
{
|
||||
HB_TRACE(HB_TR_DEBUG, ("releaseCPU()"));
|
||||
HB_TRACE(HB_TR_DEBUG, ("hb_releaseCPU()"));
|
||||
|
||||
/* TODO: Add code to release time slices on all platforms */
|
||||
|
||||
|
||||
@@ -61,6 +61,12 @@ HB_FUNC( FSETDEVMOD )
|
||||
{
|
||||
if( ISNUM( 1 ) && ISNUM( 2 ) )
|
||||
hb_fsSetDevMode( hb_parni( 1 ), hb_parni( 2 ) );
|
||||
|
||||
/* NOTE: INCOMPATIBILITY! C53 will return the device flags
|
||||
before applying the new setting, Harbour will
|
||||
always return 0. [vszakats] */
|
||||
|
||||
hb_retni( 0 );
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -105,7 +105,7 @@ char * hb_strncpyUpper( char * pDest, const char * pSource, ULONG ulLen )
|
||||
|
||||
/* some compilers implements toupper as a macro, and this has side effects! */
|
||||
/* *pDest++ = toupper( *pSource++ ); */
|
||||
while( ulLen && (*pDest++ = toupper( *pSource )))
|
||||
while( ulLen && (*pDest++ = toupper( *pSource )) != '\0' )
|
||||
{
|
||||
ulLen--;
|
||||
pSource++;
|
||||
@@ -138,7 +138,7 @@ char * hb_strncpyUpperTrim( char * pDest, const char * pSource, ULONG ulLen )
|
||||
|
||||
/* some compilers implements toupper as a macro, and this has side effects! */
|
||||
/* *pDest++ = toupper( *pSource++ ); */
|
||||
while( ulLen && ulSLen && (*pDest++ = toupper( *pSource )))
|
||||
while( ulLen && ulSLen && (*pDest++ = toupper( *pSource ) ) != '\0' )
|
||||
{
|
||||
ulSLen--;
|
||||
ulLen--;
|
||||
|
||||
@@ -4298,30 +4298,26 @@ static void hb_vmPushAliasedVar( PHB_SYMB pSym )
|
||||
|
||||
if( HB_IS_STRING( pAlias ) )
|
||||
{
|
||||
/* We make a copy of the string as it may be a pcode string! */
|
||||
char * szAlias = ( char * ) hb_xgrab( pAlias->item.asString.length + 1 );
|
||||
char * szAlias = pAlias->item.asString.value;
|
||||
|
||||
hb_xmemcpy( szAlias, pAlias->item.asString.value, pAlias->item.asString.length + 1 );
|
||||
hb_strUpper( szAlias, pAlias->item.asString.length );
|
||||
|
||||
if( szAlias[ 0 ] == 'M' && szAlias[ 1 ] == '\0' )
|
||||
if( ( szAlias[ 0 ] == 'M' || szAlias[ 0 ] == 'm' ) && szAlias[ 1 ] == '\0' )
|
||||
{ /* M->variable */
|
||||
hb_memvarGetValue( pAlias, pSym );
|
||||
}
|
||||
else
|
||||
{
|
||||
int iCmp = strncmp( szAlias, "MEMVAR", 4 );
|
||||
int iCmp = hb_strnicmp( szAlias, "MEMVAR", 4 );
|
||||
if( iCmp == 0 )
|
||||
iCmp = strncmp( szAlias, "MEMVAR", pAlias->item.asString.length );
|
||||
iCmp = hb_strnicmp( szAlias, "MEMVAR", pAlias->item.asString.length );
|
||||
if( iCmp == 0 )
|
||||
{ /* MEMVAR-> or MEMVA-> or MEMV-> */
|
||||
hb_memvarGetValue( pAlias, pSym );
|
||||
}
|
||||
else
|
||||
{ /* field variable */
|
||||
iCmp = strncmp( szAlias, "FIELD", 4 );
|
||||
iCmp = hb_strnicmp( szAlias, "FIELD", 4 );
|
||||
if( iCmp == 0 )
|
||||
iCmp = strncmp( szAlias, "FIELD", pAlias->item.asString.length );
|
||||
iCmp = hb_strnicmp( szAlias, "FIELD", pAlias->item.asString.length );
|
||||
if( iCmp == 0 )
|
||||
{ /* FIELD-> */
|
||||
hb_rddGetFieldValue( pAlias, pSym );
|
||||
@@ -4332,7 +4328,6 @@ static void hb_vmPushAliasedVar( PHB_SYMB pSym )
|
||||
}
|
||||
}
|
||||
}
|
||||
hb_xfree( ( void * ) szAlias );
|
||||
}
|
||||
else
|
||||
hb_vmPushAliasedField( pSym );
|
||||
@@ -4629,7 +4624,7 @@ static void hb_vmPopAliasedVar( PHB_SYMB pSym )
|
||||
{
|
||||
char * szAlias = pAlias->item.asString.value;
|
||||
|
||||
if( szAlias[ 0 ] == 'M' && szAlias[ 1 ] == '\0' )
|
||||
if( ( szAlias[ 0 ] == 'M' || szAlias[ 0 ] == 'm' ) && szAlias[ 1 ] == '\0' )
|
||||
{ /* M->variable */
|
||||
hb_memvarSetValue( pSym, hb_stackItemFromTop( -2 ) );
|
||||
hb_stackPop(); /* alias */
|
||||
@@ -4637,9 +4632,9 @@ static void hb_vmPopAliasedVar( PHB_SYMB pSym )
|
||||
}
|
||||
else
|
||||
{
|
||||
int iCmp = strncmp( szAlias, "MEMVAR", 4 );
|
||||
int iCmp = hb_strnicmp( szAlias, "MEMVAR", 4 );
|
||||
if( iCmp == 0 )
|
||||
iCmp = strncmp( szAlias, "MEMVAR", pAlias->item.asString.length );
|
||||
iCmp = hb_strnicmp( szAlias, "MEMVAR", pAlias->item.asString.length );
|
||||
if( iCmp == 0 )
|
||||
{ /* MEMVAR-> or MEMVA-> or MEMV-> */
|
||||
hb_memvarSetValue( pSym, hb_stackItemFromTop( -2 ) );
|
||||
@@ -4648,9 +4643,9 @@ static void hb_vmPopAliasedVar( PHB_SYMB pSym )
|
||||
}
|
||||
else
|
||||
{ /* field variable */
|
||||
iCmp = strncmp( szAlias, "FIELD", 4 );
|
||||
iCmp = hb_strnicmp( szAlias, "FIELD", 4 );
|
||||
if( iCmp == 0 )
|
||||
iCmp = strncmp( szAlias, "FIELD", pAlias->item.asString.length );
|
||||
iCmp = hb_strnicmp( szAlias, "FIELD", pAlias->item.asString.length );
|
||||
if( iCmp == 0 )
|
||||
{ /* FIELD-> */
|
||||
hb_rddPutFieldValue( hb_stackItemFromTop( -2 ), pSym );
|
||||
@@ -4976,7 +4971,7 @@ void hb_vmRequestCancel( void )
|
||||
{
|
||||
char buffer[ HB_SYMBOL_NAME_LEN + HB_SYMBOL_NAME_LEN + 2 ];
|
||||
int i = 1, i2;
|
||||
unsigned long ulLine;
|
||||
ULONG ulLine;
|
||||
PHB_ITEM * pBase;
|
||||
|
||||
hb_conOutErr( hb_conNewLine(), 0 );
|
||||
|
||||
Reference in New Issue
Block a user