From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24864 invoked from network); 20 Mar 2000 10:56:30 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 20 Mar 2000 10:56:30 -0000 Received: (qmail 10758 invoked by alias); 20 Mar 2000 10:56:16 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 10179 Received: (qmail 10749 invoked from network); 20 Mar 2000 10:56:16 -0000 Date: Mon, 20 Mar 2000 11:56:09 +0100 (MET) Message-Id: <200003201056.LAA10460@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@sunsite.auc.dk In-reply-to: "Bart Schaefer"'s message of Sun, 19 Mar 2000 20:59:11 +0000 Subject: Re: Infinite loop (?) in "typeset" Bart Schaefer wrote: > It seems to be trying to print out the body of the _normal function from > the $functions assoc, but I'm not quite sure. It repeatedly executes > > 228 while (1) { > 229 if (stack) { > 230 if (!(s = tstack)) > 232 if (s->pop) { > 237 code = s->code; > 238 stack = 0; > 239 } else { > 243 switch (wc_code(code)) { > 697 stack = 1; > 698 break; I couldn't reproduce it (_normal works for me). The only thing that has changed there lately was that (..) and {..} now have a WC_END after their bodies. Could you try the patch below? Bye Sven diff -ru ../z.old/Src/text.c Src/text.c --- ../z.old/Src/text.c Mon Mar 20 11:28:50 2000 +++ Src/text.c Mon Mar 20 11:50:23 2000 @@ -194,6 +194,9 @@ struct { int par; } _cond; + struct { + Wordcode end; + } _subsh; } u; }; @@ -329,8 +332,10 @@ if (!s) { taddstr("( "); tindent++; - tpush(code, 1); + n = tpush(code, 1); + n->u._subsh.end = state->pc + WC_SUBSH_SKIP(code); } else { + state->pc = s->u._subsh.end; tindent--; taddstr(" )"); stack = 1; @@ -340,8 +345,10 @@ if (!s) { taddstr("{ "); tindent++; - tpush(code, 1); + n = tpush(code, 1); + n->u._subsh.end = state->pc + WC_CURSH_SKIP(code); } else { + state->pc = s->u._subsh.end; tindent--; taddstr(" }"); stack = 1; -- Sven Wischnowsky wischnow@informatik.hu-berlin.de