See ChangeLog entry 2001-06-20 14:50 UTC-0400 David G. Holm <dholm@jsd-llc.com>
This commit is contained in:
@@ -1,3 +1,15 @@
|
||||
2001-06-20 14:50 UTC-0400 David G. Holm <dholm@jsd-llc.com>
|
||||
|
||||
* include/hbvm.h
|
||||
* source/debug/debugger.prg
|
||||
* source/rtl/inkey.c
|
||||
* source/rtl/set.c
|
||||
* source/vm/hvm.c
|
||||
* tests/inkeytst.prg
|
||||
* Integrate the ALTD() function with SET( _SET_DEBUG ).
|
||||
Start at integrating the debugger with the Alt+D key.
|
||||
Cleanup for dealing with the Alt+C key.
|
||||
|
||||
2001-06-20 12:30 UTC-0400 David G. Holm <dholm@jsd-llc.com>
|
||||
|
||||
* doc\license.txt
|
||||
|
||||
@@ -69,11 +69,12 @@ extern void hb_vmProcessSymbols( PHB_SYMB pSymbols, USHORT uiSymbols ); /* st
|
||||
extern void hb_vmSymbolInit_RT( void ); /* initialization of runtime support symbols */
|
||||
|
||||
/* Harbour virtual machine escaping API */
|
||||
extern void hb_vmRequestQuit( void );
|
||||
extern void hb_vmRequestEndProc( void );
|
||||
extern void hb_vmRequestCancel( void );
|
||||
extern void hb_vmRequestBreak( PHB_ITEM pItem );
|
||||
extern void hb_vmRequestCancel( void );
|
||||
extern void hb_vmRequestDebug( void );
|
||||
extern void hb_vmRequestEndProc( void );
|
||||
extern USHORT hb_vmRequestQuery( void );
|
||||
extern void hb_vmRequestQuit( void );
|
||||
|
||||
/* Return values of hb_vmRequestQuery() */
|
||||
#define HB_QUIT_REQUESTED 1 /* immediately quit the application */
|
||||
|
||||
@@ -75,20 +75,18 @@ static s_lExit := .F.
|
||||
memvar __DbgStatics
|
||||
|
||||
procedure AltD( nAction )
|
||||
static s_lEnabled := .t.
|
||||
|
||||
do case
|
||||
case nAction == nil
|
||||
if s_lEnabled
|
||||
if SET( _SET_DEBUG )
|
||||
s_lExit := .f.
|
||||
__dbgEntry( ProcLine( 2 ) )
|
||||
endif
|
||||
|
||||
case nAction == ALTD_DISABLE
|
||||
s_lEnabled := .f.
|
||||
SET( _SET_DEBUG, .F. )
|
||||
|
||||
case nAction == ALTD_ENABLE
|
||||
s_lEnabled := .t.
|
||||
SET( _SET_DEBUG, .T. )
|
||||
endcase
|
||||
|
||||
return
|
||||
|
||||
@@ -208,11 +208,22 @@ void hb_inkeyPoll( void ) /* Poll the console keyboard to stuff the Harbour
|
||||
switch( ch )
|
||||
{
|
||||
case HB_BREAK_FLAG: /* Check for Ctrl+Break */
|
||||
if( ! hb_set.HB_SET_CANCEL ) /* If cancel is disabled, */
|
||||
ch = 0; /* then ignore the keystroke */
|
||||
/* In either case, handle like Alt+C */
|
||||
case K_ALT_C: /* Alt+C was pressed */
|
||||
hb_vmRequestCancel();
|
||||
if( !hb_set.HB_SET_CANCEL ) ch = 0; /* Ignore if cancel disabled */
|
||||
case HB_K_ALT_C: /* Check for extended Alt+C */
|
||||
case K_ALT_C: /* Check for normal Alt+C */
|
||||
if( hb_set.HB_SET_CANCEL )
|
||||
{
|
||||
ch = 3; /* Pretend it's a Ctrl+C */
|
||||
hb_vmRequestCancel();/* Request cancellation */
|
||||
}
|
||||
break;
|
||||
case HB_K_ALT_D: /* Check for extended Alt+D */
|
||||
case K_ALT_D: /* Check for normal Alt+D */
|
||||
if( hb_set.HB_SET_DEBUG )
|
||||
{
|
||||
ch = 0; /* Make the keystroke disappear */
|
||||
hb_vmRequestDebug(); /* Request the debugger */
|
||||
}
|
||||
}
|
||||
|
||||
hb_inkeyPut( ch );
|
||||
|
||||
@@ -663,7 +663,7 @@ void hb_setInitialize( void )
|
||||
hb_set.HB_SET_CONSOLE = TRUE;
|
||||
hb_set.HB_SET_DATEFORMAT = ( char * ) hb_xgrab( 9 );
|
||||
memcpy( hb_set.HB_SET_DATEFORMAT, "mm/dd/yy", 9 );
|
||||
hb_set.HB_SET_DEBUG = FALSE;
|
||||
hb_set.HB_SET_DEBUG = TRUE;
|
||||
hb_set.HB_SET_DECIMALS = 2;
|
||||
hb_set.HB_SET_DEFAULT = ( char * ) hb_xgrab( 1 );
|
||||
hb_set.HB_SET_DEFAULT[ 0 ] = '\0';
|
||||
|
||||
@@ -4321,6 +4321,12 @@ void hb_vmRequestCancel( void )
|
||||
}
|
||||
}
|
||||
|
||||
void hb_vmRequestDebug( void )
|
||||
{
|
||||
HB_TRACE(HB_TR_DEBUG, ("hb_vmRequestCancel()"));
|
||||
/* TODO: Cause the debugger to be invoked */
|
||||
}
|
||||
|
||||
/* $Doc$
|
||||
* $FuncName$ <aStat> __vmVarSList()
|
||||
* $Description$ Return the statics array. Please aClone before assignments
|
||||
|
||||
@@ -15,6 +15,8 @@
|
||||
|
||||
PROCEDURE main( cSkip, cRaw )
|
||||
|
||||
ALTD(0)
|
||||
|
||||
IF EMPTY( cSkip )
|
||||
|
||||
TEST1()
|
||||
@@ -213,9 +215,13 @@ LOCAL nKey, nMask, cText
|
||||
|
||||
IF ! EMPTY( cSkip )
|
||||
IF UPPER( cSkip ) == "BREAK"
|
||||
SETCANCEL( .T. )
|
||||
SETCANCEL(.T.)
|
||||
ALTD(1)
|
||||
tone( 440, 6 )
|
||||
ELSE
|
||||
SETCANCEL( .F. )
|
||||
SETCANCEL(.F.)
|
||||
ALTD(0)
|
||||
tone( 660, 6 )
|
||||
END IF
|
||||
END IF
|
||||
|
||||
|
||||
Reference in New Issue
Block a user