From a2159285e80508bb682d90a71270fbddada8bd05 Mon Sep 17 00:00:00 2001 From: Tanaka Akira Date: Fri, 18 Jun 1999 10:55:45 +0000 Subject: zsh-3.1.5-pws-22 --- Src/text.c | 36 +++++++++++++++++++----------------- 1 file changed, 19 insertions(+), 17 deletions(-) (limited to 'Src/text.c') diff --git a/Src/text.c b/Src/text.c index d3eafaf9f..73b9088f2 100644 --- a/Src/text.c +++ b/Src/text.c @@ -169,7 +169,6 @@ gettext2(struct node *n) if (_List(n)->type & Z_DISOWN) taddstr("|"); } - simplifyright(_List(n)); if (_List(n)->right) { if (tnewlins) taddnl(); @@ -460,22 +459,23 @@ getsimptext(Cmd cmd) { LinkNode n; - for (n = firstnode(cmd->vars); n; incnode(n)) { - struct varasg *v = (struct varasg *)getdata(n); - - taddstr(v->name); - taddchr('='); - if (PM_TYPE(v->type) == PM_ARRAY) { - taddchr('('); - taddlist(v->arr); - taddstr(") "); - } else if (PM_TYPE(v->type) == PM_HASHED) { - /* XXX */ - } else { - taddstr(v->str); - taddchr(' '); + if (cmd->vars) + for (n = firstnode(cmd->vars); n; incnode(n)) { + struct varasg *v = (struct varasg *)getdata(n); + + taddstr(v->name); + taddchr('='); + if (PM_TYPE(v->type) == PM_ARRAY) { + taddchr('('); + taddlist(v->arr); + taddstr(") "); + } else if (PM_TYPE(v->type) == PM_HASHED) { + /* XXX */ + } else { + taddstr(v->str); + taddchr(' '); + } } - } taddlist(cmd->args); } @@ -490,6 +490,8 @@ getredirs(Cmd cmd) "<<", "<<-", "<<<", "<&", ">&", NULL /* >&- */, "<", ">" }; + if (!cmd->redir) + return; taddchr(' '); for (n = firstnode(cmd->redir); n; incnode(n)) { struct redir *f = (struct redir *)getdata(n); @@ -537,7 +539,7 @@ taddlist(LinkList l) { LinkNode n; - if (!(n = firstnode(l))) + if (!l || !(n = firstnode(l))) return; for (; n; incnode(n)) { taddstr(getdata(n)); -- cgit 1.4.1