X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=debugger%2Fmcs51%2Fsdcdb.c;fp=debugger%2Fmcs51%2Fsdcdb.c;h=328de243b79b1cecae6e603e74c77c1f07c57d2d;hb=324c546ec931717cb4a2aa705ae1c943b4b89604;hp=d5c7a44becc444fd2b7f0f6ce7ff4849d7a64af8;hpb=d0606a36c9fe073c14d3b41d8e4977058714412c;p=fw%2Fsdcc 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; } } }