20000306-04:43 GMT+1 Victor Szakats <info@szelvesz.hu>

This commit is contained in:
Viktor Szakats
2000-03-06 03:43:05 +00:00
parent 856ea2013e
commit eafad66714
12 changed files with 97 additions and 59 deletions

View File

@@ -1,3 +1,28 @@
20000306-04:43 GMT+1 Victor Szakats <info@szelvesz.hu>
* source/rtl/cmdcheck.c
! -gc0 switch got removed. Added again.
* config/rules.cf
makefile.bc
makefile.vc
% -gc0 switch added to speed up make process.
The size of the obj/b32 dir after a make was 8.9MB before,
and 7.7MB after.
* source/vm/debug.c
doc/en/hvm.txt
! One $DOC$ left in the source moved to the docs dir.
* source/vm/hvm.c
! One variable name standardized and made static.
* source/rdd/dbf1.c
! Unused variable warning fixed.
* source/rtl/transfrm.c
! Borland warning fixed.
! TRANSFORM(<logical>,"@") case fixed. Three more tests pass in RT_MAIN.
* source/vm/memvars.c
! hb_memvarValueNew() Borland warning fixed. Comment added.
* source\tools\hb_f.c
! Borland warning fixed.
% IT_NUMBER changed to the standard IT_NUMERIC
20000305-13:47 GMT+1 Victor Szakats <info@szelvesz.hu>
* source/rtl/empty.c
source/rtl/valtype.c

View File

@@ -20,7 +20,7 @@ HB := $(HB_BIN_COMPILE)/
endif
HB := $(HB)harbour$(EXE_EXT)
HB_FLAGS = -n -q0 -w -es2 -I$(TOP) -I$(HB_INC_COMPILE)
HB_FLAGS = -n -q0 -w -es2 -gc0 -I$(TOP) -I$(HB_INC_COMPILE)
# The rule to link an executable.
ifeq ($(LD_RULE),)

View File

@@ -356,3 +356,29 @@
*
* $END$
*/
/* $DOC$
* $FUNCNAME$
* __VMVARLGET()
* $CATEGORY$
* Variable management
* $ONELINER$
* $SYNTAX$
* __VMVARLGET( <nProcLevel>, <nLocal> )
* $ARGUMENTS$
* <nProcLevel> Is the procedure level, same as used in ProcName()
* and ProcLine(), from which a local variable containts is going to
* be retrieved.
* <nLocal> Is the index of the local variable to retrieve.
* $RETURNS$
* The containts of a specific local variable
* $DESCRIPTION$
* This function is used from the debugger
* $STATUS$
*
* $COMPLIANCE$
*
* $SEEALSO$
*
* $END$
*/

View File

@@ -7,7 +7,7 @@
# Merge duplicate strings
BCC_OPT = $(BCC_OPT) -d
HARBOUR_OPT = $(HARBOUR_OPT) -q0 -w -es2
HARBOUR_OPT = $(HARBOUR_OPT) -q0 -w -es2 -gc0
!if $d(B16)

View File

@@ -69,7 +69,7 @@ RUNNER_DLL=$(BIN_DIR)\runjava.dll
MACRO_LIB=$(LIB_DIR)\macro.lib
REGRESS_EXE=$(BIN_DIR)\rt_main.exe
HBDOC_EXE=$(BIN_DIR)\hbdoc.exe
HARBOURFLAGS=-iinclude -n -q0 -w -es2
HARBOURFLAGS=-iinclude -n -q0 -w -es2 -gc0
LIBS=$(HARBOUR_LIB) $(MACRO_LIB) $(TERMINAL_LIB) $(TOOLS_LIB) $(DEBUG_LIB) $(PP_LIB) $(DBFNTX_LIB) $(DBFCDX_LIB) $(RUNNER_LIB) $(MACRO_LIB)

View File

@@ -281,6 +281,21 @@ void hb_compChkEnvironVar( char * szSwitch )
case 'c':
case 'C':
hb_comp_iLanguage = LANG_C;
switch( *( s + 2 ) )
{
case '\0':
case '1':
hb_comp_bGenCVerbose = TRUE;
break;
case '0':
hb_comp_bGenCVerbose = FALSE;
break;
default:
hb_compGenError( hb_comp_szErrors, 'F', ERR_BADOPTION, s, NULL );
}
break;
#ifdef HARBOUR_OBJ_GENERATION

View File

@@ -1009,6 +1009,7 @@ static ERRCODE dbfGetValueFile( AREAP pArea, USHORT uiIndex, void * pFile )
LPFIELD pField;
HB_TRACE(HB_TR_DEBUG, ("dbfGetValueFile(%p, %hu, %p)", pArea, uiIndex, pFile));
HB_SYMBOL_UNUSED( pFile );
if( uiIndex > pArea->uiFieldCount )
@@ -1614,6 +1615,8 @@ static ERRCODE dbfPutValueFile( AREAP pArea, USHORT uiIndex, void * pFile )
HB_TRACE(HB_TR_DEBUG, ("dbfPutValueFile(%p, %hu, %p)", pArea, uiIndex, pFile));
HB_SYMBOL_UNUSED( pFile );
if( uiIndex > pArea->uiFieldCount )
return FAILURE;

View File

@@ -241,7 +241,7 @@ static char * NumPicture( char * szPic, ULONG ulPicLen, USHORT * puiPicFlags, do
/* Pad with Zero's */
if( uiPicFlags & PF_ZERO )
{
for( i = 0; szStr[ i ] == ' ' && i < iWidth; i++ )
for( i = 0; szStr[ i ] == ' ' && i < ( ULONG ) iWidth; i++ )
szStr[ i ] = '0';
}
@@ -295,7 +295,7 @@ static char * NumPicture( char * szPic, ULONG ulPicLen, USHORT * puiPicFlags, do
{
if( isdigit( *szResult ) ) /* Overflow */
{
for( iCount = 1; iCount < i; iCount++ )
for( iCount = 1; ( ULONG ) iCount < i; iCount++ )
{
if( isdigit( szResult[ iCount ] ) )
szResult[ iCount ] = '*';
@@ -517,6 +517,8 @@ HARBOUR HB_TRANSFORM( void )
}
}
}
else
*szResult = hb_itemGetL( pExp ) ? 'T' : 'F';
/* Any chars left */
if( ( uiPicFlags & PF_REMAIN ) && ulPicLen )

View File

@@ -39,7 +39,6 @@
#define b_size 1024
#define c_size 4096
#define IT_NUMBER (IT_INTEGER|IT_LONG|IT_DOUBLE)
static long hb_hbfskip( int recs );
@@ -59,7 +58,7 @@ HARBOUR HB_HB_FUSE( void )
{
PHB_ITEM arg1_it = hb_param(1,IT_STRING);
PHB_ITEM arg2_it = hb_param(2,IT_NUMBER);
PHB_ITEM arg2_it = hb_param(2,IT_NUMERIC);
int open_flags;
if ( arg1_it ) {
@@ -104,7 +103,7 @@ HARBOUR HB_HB_FSKIP( void )
{
PHB_ITEM arg1_it = hb_param(1,IT_NUMBER);
PHB_ITEM arg1_it = hb_param(1,IT_NUMERIC);
int nskip;
if( arg1_it )
@@ -117,11 +116,9 @@ HARBOUR HB_HB_FSKIP( void )
}
static long hb_hbfskip( int recs )
{
long read_pos;
size_t read_len;
long read_len;
long x, y;

View File

@@ -62,7 +62,6 @@ static void AddToArray( PHB_ITEM pItem, PHB_ITEM pReturn, ULONG ulPos )
hb_itemArrayPut( pReturn, ulPos, pItem );
}
/* $Doc$
* $FuncName$ <nVars> __vmStkGCount()
* $Description$ Returns the length of the global stack
@@ -84,7 +83,6 @@ HARBOUR HB___VMSTKGCOUNT( void )
hb_retni( hb_stackLenGlobal() );
}
/* $Doc$
* $FuncName$ <aStack> __vmStkGList()
* $Description$ Returns the global stack
@@ -106,7 +104,6 @@ HARBOUR HB___VMSTKGLIST( void )
hb_itemRelease( pReturn );
}
/* $Doc$
* $FuncName$ <nVars> __vmStkLCount()
* $Description$ Returns the length of the stack of the calling function
@@ -129,7 +126,6 @@ HARBOUR HB___VMSTKLCOUNT( void )
hb_retni( StackLen() );
}
/* $Doc$
* $FuncName$ <aStack> __vmStkLList()
* $Description$ Returns the stack of the calling function
@@ -157,7 +153,6 @@ HARBOUR HB___VMSTKLLIST( void )
hb_itemRelease( pReturn );
}
/* $Doc$
* $FuncName$ <aParam> __vmParLGet()
* $Description$ Returns the passed parameters of the calling function
@@ -183,33 +178,6 @@ HARBOUR HB___VMPARLLIST( void )
hb_itemRelease( pReturn );
}
/* -------------------------------------------------------------------------- */
/* $DOC$
* $FUNCNAME$
* __VMVARLGET()
* $CATEGORY$
* Variable management
* $ONELINER$
* $SYNTAX$
* __VMVARLGET( <nProcLevel>, <nLocal> )
* $ARGUMENTS$
* <nProcLevel> Is the procedure level, same as used in ProcName()
* and ProcLine(), from which a local variable containts is going to
* be retrieved.
* <nLocal> Is the index of the local variable to retrieve.
* $RETURNS$
* The containts of a specific local variable
* $DESCRIPTION$
* This function is used from the debugger
* $STATUS$
*
* $COMPLIANCE$
*
* $SEEALSO$
*
* $END$
*/
HARBOUR HB___VMVARLGET( void )
{
int iLevel = hb_parni( 1 ) + 1;

View File

@@ -199,17 +199,17 @@ extern POBJSYMBOLS HB_FIRSTSYMBOL, HB_LASTSYMBOL;
/* virtual machine state */
HB_STACK hb_stack;
HB_SYMB hb_symEval = { "__EVAL", FS_PUBLIC, hb_vmDoBlock, 0 }; /* symbol to evaluate codeblocks */
BOOL hb_DebuggerIsWorking = FALSE; /* to know when __DBGENTRY is beeing invoked */
HB_SYMB hb_symEval = { "__EVAL", FS_PUBLIC, hb_vmDoBlock, NULL }; /* symbol to evaluate codeblocks */
static HB_ITEM s_aStatics; /* Harbour array to hold all application statics variables */
static BOOL s_bDebugging = FALSE;
static BOOL s_bDebugShowLines = FALSE; /* update source code line on the debugger display */
static PHB_SYMB s_pSymStart = NULL; /* start symbol of the application. MAIN() is not required */
static PSYMBOLS s_pSymbols = NULL; /* to hold a linked list of all different modules symbol tables */
static BYTE s_byErrorLevel = 0; /* application exit errorlevel */
static BOOL s_bDebugging = FALSE;
static BOOL s_bDebugShowLines = FALSE; /* update source code line on the debugger display */
static BOOL s_bDebuggerIsWorking = FALSE; /* to know when __DBGENTRY is beeing invoked */
/* Stores the position on the stack of current SEQUENCE envelope or 0 if no
* SEQUENCE is active
*/
@@ -257,7 +257,7 @@ void hb_vmInit( BOOL bStartMainProc )
hb_vmDoInitFunctions(); /* process defined INIT functions */
/* This is undocumented CA-Clipper, if there's a function called _APPMAIN
it will be executed first. */
it will be executed first. [vszakats] */
{
PHB_DYNS pDynSym = hb_dynsymFind( "_APPMAIN" );
@@ -2649,9 +2649,9 @@ static void hb_vmModuleName( char * szModuleName ) /* PRG and function name info
hb_vmPushSymbol( hb_dynsymFind( "__DBGENTRY" )->pSymbol );
hb_vmPushNil();
hb_vmPushString( szModuleName, strlen( szModuleName ) );
hb_DebuggerIsWorking = TRUE;
s_bDebuggerIsWorking = TRUE;
hb_vmDo( 1 );
hb_DebuggerIsWorking = FALSE;
s_bDebuggerIsWorking = FALSE;
s_bDebugShowLines = TRUE;
}
@@ -2724,9 +2724,9 @@ static void hb_vmDebuggerEndProc( void )
s_bDebugShowLines = FALSE;
hb_vmPushSymbol( hb_dynsymFind( "__DBGENTRY" )->pSymbol );
hb_vmPushNil();
hb_DebuggerIsWorking = TRUE;
s_bDebuggerIsWorking = TRUE;
hb_vmDo( 0 );
hb_DebuggerIsWorking = FALSE;
s_bDebuggerIsWorking = FALSE;
s_bDebugShowLines = TRUE;
hb_itemCopy( &hb_stack.Return, &item ); /* restores the previous returned value */
@@ -2741,9 +2741,9 @@ static void hb_vmDebuggerShowLine( USHORT uiLine ) /* makes the debugger shows a
hb_vmPushSymbol( hb_dynsymFind( "__DBGENTRY" )->pSymbol );
hb_vmPushNil();
hb_vmPushInteger( uiLine );
hb_DebuggerIsWorking = TRUE;
s_bDebuggerIsWorking = TRUE;
hb_vmDo( 1 );
hb_DebuggerIsWorking = FALSE;
s_bDebuggerIsWorking = FALSE;
s_bDebugShowLines = TRUE;
}
@@ -3737,8 +3737,9 @@ static void hb_vmDoInitFunctions( void )
} while( pLastSymbols );
}
/* NOTE: We should make sure that these get linked. */
/* Don't make this function static, because it's not called from this file. */
/* NOTE: We should make sure that these get linked.
Don't make this function static, because it's not called from
this file. */
void hb_vmForceLink( void )
{
HB_TRACE(HB_TR_DEBUG, ("hb_vmForceLink()"));
@@ -3753,7 +3754,7 @@ HARBOUR HB_ERRORLEVEL( void )
hb_retni( s_byErrorLevel );
/* NOTE: This should be ISNUM( 1 ), but it's sort of a Clipper bug that it
accepts other types also and consider them zero. [vszakats] */
accepts other types also and considers them zero. [vszakats] */
if( hb_pcount() >= 1 )
/* Only replace the error level if a parameter was passed */

View File

@@ -156,7 +156,8 @@ HB_VALUE_PTR *hb_memvarValueBaseAddress( void )
HB_HANDLE hb_memvarValueNew( HB_ITEM_PTR pSource, BOOL bTrueMemvar )
{
HB_VALUE_PTR pValue;
HB_HANDLE hValue = 1; /* handle 0 is reserved */
HB_HANDLE hValue; /* handle 0 is reserved */
/* = 1 removed, since it's initialized in all branches. Caused a warning with Borland C++ */
HB_TRACE(HB_TR_DEBUG, ("hb_memvarValueNew(%p, %d)", pSource, (int) bTrueMemvar));