commit cc1697192640f1e68b33593af0f1c350de5b7a04
parent 8731b3ebc39715005c402d746e282fe2edfa7118
Author: tjg <tjg>
Date: Fri, 5 Oct 2001 11:05:33 +0000
alternative fix for fn prompt tailspin
Diffstat:
1 file changed, 5 insertions(+), 8 deletions(-)
diff --git a/input.c b/input.c
@@ -243,6 +243,7 @@ extern void flushu() {
extern Node *doit(bool clobberexecit) {
bool eof;
bool execit;
+ bool infnprompt;
Jbwrap j;
Estack e1;
Edata jerror;
@@ -250,6 +251,7 @@ extern Node *doit(bool clobberexecit) {
if (dashen)
clobberexecit = FALSE;
execit = clobberexecit;
+ infnprompt = FALSE;
sigsetjmp(j.j, 1);
jerror.jb = &j;
except(eError, jerror, &e1);
@@ -271,17 +273,12 @@ extern Node *doit(bool clobberexecit) {
List *s;
if (!dashen && fnlookup("prompt") != NULL) {
static char *arglist[] = { "prompt", NULL };
- Estack e3;
- Edata pjmp;
- Jbwrap pj;
-
- if (sigsetjmp(pj.j, 1) == 0) {
- pjmp.jb = &pj;
- except(eError, pjmp, &e3);
+ if (!infnprompt) {
+ infnprompt = TRUE;
funcall(arglist);
- unexcept();
}
+ infnprompt = FALSE;
}
if ((s = varlookup("prompt")) != NULL) {
#if EDITLINE || READLINE