From: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
To: zsh-workers@sunsite.auc.dk
Subject: Re: Infinite loop (?) in "typeset"
Date: Mon, 20 Mar 2000 11:56:09 +0100 (MET) [thread overview]
Message-ID: <200003201056.LAA10460@beta.informatik.hu-berlin.de> (raw)
In-Reply-To: "Bart Schaefer"'s message of Sun, 19 Mar 2000 20:59:11 +0000
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
next reply other threads:[~2000-03-20 10:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-03-20 10:56 Sven Wischnowsky [this message]
2000-03-20 18:17 ` Bart Schaefer
-- strict thread matches above, loose matches on Subject: below --
2000-03-19 20:59 Bart Schaefer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200003201056.LAA10460@beta.informatik.hu-berlin.de \
--to=wischnow@informatik.hu-berlin.de \
--cc=zsh-workers@sunsite.auc.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).