From 62f22b41453b759b8b014f894225eb9eaed3b484 Mon Sep 17 00:00:00 2001 From: h_vogt Date: Fri, 31 Dec 2010 09:08:54 +0000 Subject: [PATCH] update stop command --- ChangeLog | 5 ++++- src/frontend/breakp.c | 11 +++++++---- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 78d1357dc..f1115db6f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,7 @@ -2010-12-30 Holger Vogt +10-12-31 Holger Vogt + * breakp.c: allow multiple conditionals with '=' in stop command + +10-12-30 Holger Vogt * aspice.c, inpcom.c, numparam/general.h, 1-f-code.h, equality.c randnumb.c, spdefs.h, cktsens.c: remove compiler warnings breakp.c: allow 'time = nnn' in stop command diff --git a/src/frontend/breakp.c b/src/frontend/breakp.c index 44f2ddc9d..3be0bf762 100644 --- a/src/frontend/breakp.c +++ b/src/frontend/breakp.c @@ -72,7 +72,9 @@ com_stop(wordlist *wl) } else if (eq(wl->wl_word, "when") && wl->wl_next) { /* cp_lexer(string) will not discriminate '=', so we have to do it here */ - if (strstr(wl->wl_next->wl_word,"=") && !(wl->wl_next->wl_next)) { + if (strstr(wl->wl_next->wl_word,"=") && (!(wl->wl_next->wl_next) || + strstr(wl->wl_next->wl_next->wl_word,"when") || + strstr(wl->wl_next->wl_next->wl_word,"after"))) { /* we have vec=val in a single word */ wordlist * wln; char** charr = TMALLOC(char*, 4) ; @@ -85,9 +87,10 @@ com_stop(wordlist *wl) charr[2] = tokafter; charr[3] = NULL; wln = wl_build(charr); - wl_free(wl->wl_next); - wl->wl_next = NULL; - wl = wl_append(wl, wln); + wl_splice(wl->wl_next, wln); +// wl_free(wl->wl_next); +// wl->wl_next = NULL; +// wl = wl_append(wl, wln); } if (wl->wl_next->wl_next &&