2001-11-04 18:34 UTC+0100 Viktor Szakats <viktor.szakats@syenar.hu>
This commit is contained in:
@@ -1,3 +1,16 @@
|
||||
2001-11-04 18:34 UTC+0100 Viktor Szakats <viktor.szakats@syenar.hu>
|
||||
|
||||
* source/compiler/cmdcheck.c
|
||||
* source/compiler/gencobj.c
|
||||
* source/compiler/hbpcode.c
|
||||
* source/rtl/filesys.c
|
||||
* source/rtl/idle.c
|
||||
* source/vm/classes.c
|
||||
* source/vm/hvm.c
|
||||
! Non-ansi comments fixed.
|
||||
Note that RDD files has lots of // comments, if you're the author
|
||||
of some those files and seeing this, please check your code. Thx.
|
||||
|
||||
2001-11-04 18:14 UTC+0100 Viktor Szakats <viktor.szakats@syenar.hu>
|
||||
|
||||
* include/hbexpra.c
|
||||
|
||||
@@ -847,8 +847,8 @@ static void hb_compChkDefineSwitch( char * pszSwitch )
|
||||
{
|
||||
szDefText[ pAssign - szDefText ] = '\0';
|
||||
|
||||
//hb_pp_AddDefine( szDefText, pAssign + 1 );
|
||||
sDefLine = (char*) hb_xgrab( strlen( szDefText ) + 1 + strlen( pAssign + 1 ) + 1 );
|
||||
/* hb_pp_AddDefine( szDefText, pAssign + 1 ); */
|
||||
sDefLine = ( char* ) hb_xgrab( strlen( szDefText ) + 1 + strlen( pAssign + 1 ) + 1 );
|
||||
sprintf( sDefLine, "%s %s", szDefText, pAssign + 1 );
|
||||
hb_pp_ParseDefine( sDefLine );
|
||||
hb_xfree( sDefLine );
|
||||
|
||||
@@ -36,7 +36,8 @@ static char * hb_searchpath( const char *, char *, char * );
|
||||
|
||||
/* QUESTION: Allocate buffer dynamically ? */
|
||||
#define HB_CFG_LINE_LEN 100
|
||||
//--------------------------------------------------------------------------//
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
/* Builds platform dependant object module from Harbour C output */
|
||||
void hb_compGenCObj( PHB_FNAME pFileName )
|
||||
@@ -201,7 +202,6 @@ void hb_compGenCObj( PHB_FNAME pFileName )
|
||||
sprintf( szCommandLine, "%s %s %s %s > /dev/null", szCompiler, szOptions, szOutPath, szFileName );
|
||||
#endif
|
||||
}
|
||||
//printf( "\n\nLine:[%s]\n", szCommandLine );
|
||||
|
||||
/* Compile it! */
|
||||
iSuccess = ( system( szCommandLine ) != -1 );
|
||||
|
||||
@@ -1457,66 +1457,60 @@ void hb_compStrongType( int iSize )
|
||||
pFunc->iStackIndex--;
|
||||
|
||||
if( ( pFunc->pStack[ pFunc->iStackIndex - 1 ] == '-' + VT_OFFSET_VARIANT ) || pFunc->pStack[ pFunc->iStackIndex - 1 ] >= ( 'A' + VT_OFFSET_VARIANT ) )
|
||||
{
|
||||
{
|
||||
cSubType1 = ( pFunc->pStack[ pFunc->iStackIndex - 1 ] -= VT_OFFSET_VARIANT );
|
||||
//printf( "\n Op1 = Variant: %c\n", cSubType1 );
|
||||
}
|
||||
|
||||
}
|
||||
if( cSubType1 && cSubType1 == '-' )
|
||||
{
|
||||
{
|
||||
sprintf( ( char * ) szType1, "AnyType.SubType[NIL]" );
|
||||
}
|
||||
}
|
||||
else if( cSubType1 )
|
||||
{
|
||||
{
|
||||
sprintf( ( char * ) szType1, "AnyType.SubType[%c]", cSubType1 );
|
||||
}
|
||||
}
|
||||
else if( pFunc->pStack[ pFunc->iStackIndex - 1 ] == '-' )
|
||||
{
|
||||
{
|
||||
strcpy( ( char * ) szType1, "NIL");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
sprintf( ( char * ) szType1, "%c", pFunc->pStack[ pFunc->iStackIndex - 1 ] );
|
||||
}
|
||||
}
|
||||
|
||||
/*---*/
|
||||
/*---*/
|
||||
|
||||
if( ( pFunc->pStack[ pFunc->iStackIndex ] == '-' + VT_OFFSET_VARIANT ) || pFunc->pStack[ pFunc->iStackIndex ] >= ( 'A' + VT_OFFSET_VARIANT ) )
|
||||
{
|
||||
{
|
||||
cSubType2 = ( pFunc->pStack[ pFunc->iStackIndex ] -= VT_OFFSET_VARIANT );
|
||||
//printf( "\n Op2 = Variant: %c\n", cSubType1 );
|
||||
}
|
||||
|
||||
}
|
||||
if( cSubType2 && cSubType2 == '-' )
|
||||
{
|
||||
{
|
||||
strcpy( ( char * ) szType2, "AnyType.SubType[NIL]" );
|
||||
}
|
||||
}
|
||||
else if( cSubType2 )
|
||||
{
|
||||
{
|
||||
sprintf( ( char * ) szType2, "AnyType.SubType[%c]", cSubType2 );
|
||||
}
|
||||
}
|
||||
else if( pFunc->pStack[ pFunc->iStackIndex ] == '-' )
|
||||
{
|
||||
{
|
||||
strcpy( ( char * ) szType2, "NIL" );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
sprintf( ( char * ) szType2, "%c", pFunc->pStack[ pFunc->iStackIndex ] );
|
||||
}
|
||||
}
|
||||
|
||||
/*---*/
|
||||
/*---*/
|
||||
|
||||
if( ! cSubType1 )
|
||||
{
|
||||
if( ! cSubType1 )
|
||||
{
|
||||
cSubType1 = pFunc->pStack[ pFunc->iStackIndex - 1 ];
|
||||
//printf( "\n Op1 = %c (%i)\n", cSubType1, cSubType1 );
|
||||
}
|
||||
}
|
||||
|
||||
if( ! cSubType2 )
|
||||
{
|
||||
if( ! cSubType2 )
|
||||
{
|
||||
cSubType2 = pFunc->pStack[ pFunc->iStackIndex ];
|
||||
//printf( "\n Op2 = %c (%i)\n", cSubType2, cSubType2 );
|
||||
}
|
||||
}
|
||||
|
||||
if( cSubType1 == '-' || cSubType2 == '-' )
|
||||
{
|
||||
|
||||
@@ -369,14 +369,14 @@ FHANDLE hb_fsOpen( BYTE * pFilename, USHORT uiFlags )
|
||||
DWORD dwShare = FILE_SHARE_READ | FILE_SHARE_WRITE;
|
||||
HANDLE hFile;
|
||||
|
||||
// read & write flags
|
||||
/* read & write flags */
|
||||
if( uiFlags & FO_WRITE )
|
||||
dwFlags |= GENERIC_WRITE;
|
||||
|
||||
if( uiFlags & FO_READWRITE )
|
||||
dwFlags |= GENERIC_READ;
|
||||
|
||||
// shared flags
|
||||
/* shared flags */
|
||||
if( ( uiFlags & FO_DENYREAD ) == FO_DENYREAD )
|
||||
dwShare = FILE_SHARE_WRITE;
|
||||
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
#include "hbvm.h"
|
||||
#include "error.ch"
|
||||
#if defined(HB_OS_UNIX)
|
||||
#include <time.h>
|
||||
#include <time.h>
|
||||
#endif
|
||||
|
||||
/* list of background tasks
|
||||
@@ -140,6 +140,9 @@ static void hb_releaseCPU( void )
|
||||
nanosleep( &nanosecs, NULL );
|
||||
}
|
||||
#else
|
||||
|
||||
/* Do nothing */
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -269,8 +272,10 @@ HB_FUNC( HB_IDLEDEL )
|
||||
if( s_uiIdleMaxTask )
|
||||
{
|
||||
if( iTask != s_uiIdleMaxTask )
|
||||
{
|
||||
memcpy( &s_pIdleTasks[ iTask ], &s_pIdleTasks[ iTask + 1 ],
|
||||
sizeof( HB_ITEM_PTR ) * (s_uiIdleMaxTask - iTask) );
|
||||
sizeof( HB_ITEM_PTR ) * ( s_uiIdleMaxTask - iTask ) );
|
||||
}
|
||||
s_pIdleTasks = ( HB_ITEM_PTR * ) hb_xrealloc( s_pIdleTasks, sizeof( HB_ITEM_PTR ) * s_uiIdleMaxTask );
|
||||
}
|
||||
else
|
||||
|
||||
@@ -631,7 +631,7 @@ char * hb_objGetRealClsName( PHB_ITEM pObject, char * szName )
|
||||
szClassName = "ARRAY";
|
||||
else
|
||||
{
|
||||
PHB_DYNS pMsg = hb_dynsymFindName( szName );
|
||||
PHB_DYNS pMsg = hb_dynsymFindName( szName );
|
||||
USHORT uiClass;
|
||||
USHORT uiCurCls;
|
||||
USHORT uiClsTree;
|
||||
@@ -847,11 +847,6 @@ PMETHOD hb_objGetpMethod( PHB_ITEM pObject, PHB_SYMB pMessage )
|
||||
if( pClass->pMethods[ uiAt ].pMessage == pMsg )
|
||||
return (pClass->pMethods + uiAt) ;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
uiAt++;
|
||||
if( uiAt == uiMask )
|
||||
uiAt = 0;
|
||||
@@ -879,7 +874,7 @@ ULONG hb_objHasMsg( PHB_ITEM pObject, char *szString )
|
||||
return ( ULONG ) hb_objGetMthd( pObject, pDynSym->pSymbol, FALSE );
|
||||
else
|
||||
return 0;
|
||||
} /* Get funcptr of message */
|
||||
}
|
||||
|
||||
|
||||
/* ================================================ */
|
||||
@@ -1439,10 +1434,10 @@ static PHB_ITEM hb_clsInst( USHORT uiClass )
|
||||
|
||||
pSelf->item.asArray.value->puiClsTree = NULL;
|
||||
|
||||
//pSelf->item.asArray.value->puiClsTree = ( USHORT * ) hb_xgrab( sizeof( USHORT ) );
|
||||
//pSelf->item.asArray.value->puiClsTree[0]=0;
|
||||
/* pSelf->item.asArray.value->puiClsTree = ( USHORT * ) hb_xgrab( sizeof( USHORT ) ); */
|
||||
/* pSelf->item.asArray.value->puiClsTree[0]=0; */
|
||||
|
||||
/* Initialise value if initialisation was requested */
|
||||
/* Initialise value if initialisation was requested */
|
||||
pMeth = pClass->pMethods;
|
||||
for( uiAt = 0; uiAt < uiLimit; uiAt++, pMeth++ )
|
||||
{
|
||||
@@ -1643,8 +1638,8 @@ HB_FUNC( __OBJCLONE )
|
||||
pDstObject= hb_arrayClone( pSrcObject, NULL ) ;
|
||||
|
||||
pDstObject->item.asArray.value->puiClsTree = NULL;
|
||||
//pDstObject->item.asArray.value->puiClsTree = ( USHORT * ) hb_xgrab( sizeof( USHORT ) );
|
||||
//pDstObject->item.asArray.value->puiClsTree[0]=0;
|
||||
/* pDstObject->item.asArray.value->puiClsTree = ( USHORT * ) hb_xgrab( sizeof( USHORT ) ); */
|
||||
/* pDstObject->item.asArray.value->puiClsTree[0]=0; */
|
||||
|
||||
hb_itemRelease( hb_itemReturn( pDstObject ) );
|
||||
}
|
||||
@@ -1663,7 +1658,7 @@ HB_FUNC( __OBJSENDMSG )
|
||||
PHB_ITEM pObject = hb_param( 1, HB_IT_OBJECT );
|
||||
USHORT uiPCount = hb_pcount();
|
||||
|
||||
if( uiPCount>=2 && pObject ) /* Object & message passed */
|
||||
if( uiPCount>=2 && pObject ) /* Object & message passed */
|
||||
{
|
||||
/*hb_dynsymFindName( hb_parc(2) );*/
|
||||
PHB_DYNS pMsg = hb_dynsymGet( hb_parc(2) );
|
||||
@@ -1672,14 +1667,14 @@ HB_FUNC( __OBJSENDMSG )
|
||||
{
|
||||
USHORT uiParam;
|
||||
|
||||
hb_vmPush( pObject ); /* Push object */
|
||||
hb_vmPush( pObject ); /* Push object */
|
||||
|
||||
hb_vmMessage( pMsg->pSymbol ); /* Push char symbol as message */
|
||||
|
||||
for( uiParam = 3; uiParam <= uiPCount; uiParam++ ) /* Push arguments on stack */
|
||||
for( uiParam = 3; uiParam <= uiPCount; uiParam++ ) /* Push arguments on stack */
|
||||
hb_vmPush( hb_param( uiParam, HB_IT_ANY ) );
|
||||
|
||||
hb_vmDo( ( USHORT ) ( uiPCount - 2 ) ); /* Execute message */
|
||||
hb_vmDo( ( USHORT ) ( uiPCount - 2 ) ); /* Execute message */
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -2411,4 +2406,5 @@ HB_FUNC( __CLSGETPROPERTIES )
|
||||
}
|
||||
|
||||
hb_itemRelease( hb_itemReturn( pReturn ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1335,7 +1335,7 @@ void hb_vmExecute( const BYTE * pCode, PHB_SYMB pSymbols )
|
||||
|
||||
hb_xfree( aExtraItems );
|
||||
|
||||
w++; // To force skip the HB_P_ARRAYPUSH (was already processed above).
|
||||
w++; /* To force skip the HB_P_ARRAYPUSH (was already processed above). */
|
||||
}
|
||||
|
||||
w++;
|
||||
|
||||
Reference in New Issue
Block a user