From: kbongers Date: Tue, 20 May 2003 20:43:38 +0000 (+0000) Subject: Martins commands patch X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=324c546ec931717cb4a2aa705ae1c943b4b89604;p=fw%2Fsdcc Martins commands patch git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2635 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- diff --git a/debugger/mcs51/cmd.c b/debugger/mcs51/cmd.c index 0c584c20..86c17d2c 100644 --- a/debugger/mcs51/cmd.c +++ b/debugger/mcs51/cmd.c @@ -699,7 +699,7 @@ void simGo (unsigned int gaddr) unsigned int addr ; context *ctxt; int rv; - + stopCommandList(); top: if ( userinterrupt ) { diff --git a/debugger/mcs51/sdcdb.c b/debugger/mcs51/sdcdb.c index d5c7a44b..328de243 100644 --- a/debugger/mcs51/sdcdb.c +++ b/debugger/mcs51/sdcdb.c @@ -836,7 +836,7 @@ int interpretCmd (char *s) static FILE *actualcmdfile=NULL ; static char *actualcmds=NULL; - +static int stopcmdlist; /*-----------------------------------------------------------------*/ /* getNextCmdLine get additional lines used by special commands */ /*-----------------------------------------------------------------*/ @@ -854,6 +854,11 @@ void setCmdLine( char *cmds ) actualcmds = cmds; } +void stopCommandList() +{ + stopcmdlist = 1; +} + /*-----------------------------------------------------------------*/ /* commandLoop - the main command loop or loop over command file */ /*-----------------------------------------------------------------*/ @@ -882,6 +887,7 @@ static void commandLoop(FILE *cmdfile) { strcpy(cmdbuff,actualcmds); actualcmds = NULL; + stopcmdlist= 0; for ( line = cmdbuff; *line ; line = s ) { if ( (s=strchr(line ,'\n'))) @@ -900,6 +906,8 @@ static void commandLoop(FILE *cmdfile) break; } *s = save_ch; + if ( stopcmdlist ) + break; } } } diff --git a/debugger/mcs51/sdcdb.h b/debugger/mcs51/sdcdb.h index 3cf43b8c..f73335a0 100644 --- a/debugger/mcs51/sdcdb.h +++ b/debugger/mcs51/sdcdb.h @@ -269,4 +269,5 @@ extern char contsim; char *searchDirsFname (char *); char *getNextCmdLine(void ); void setCmdLine( char * ); +void stopCommandList( void ); #endif