diff options
author | Jason Downs <downsj@cvs.openbsd.org> | 1996-11-21 07:59:41 +0000 |
---|---|---|
committer | Jason Downs <downsj@cvs.openbsd.org> | 1996-11-21 07:59:41 +0000 |
commit | e7ba2dde1be71475ca9e13475a5da793e6e71492 (patch) | |
tree | 92fc7d77b93be740bc71187341a0164e93242b61 /bin/pdksh/c_ksh.c | |
parent | 348b1798b3067a1b3e79d9460d7f51a07ccd44ef (diff) |
Update to 5.2.12.
Diffstat (limited to 'bin/pdksh/c_ksh.c')
-rw-r--r-- | bin/pdksh/c_ksh.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/bin/pdksh/c_ksh.c b/bin/pdksh/c_ksh.c index a08ec31ae1c..df402d54e1b 100644 --- a/bin/pdksh/c_ksh.c +++ b/bin/pdksh/c_ksh.c @@ -1,4 +1,4 @@ -/* $OpenBSD: c_ksh.c,v 1.4 1996/10/01 02:05:32 downsj Exp $ */ +/* $OpenBSD: c_ksh.c,v 1.5 1996/11/21 07:59:27 downsj Exp $ */ /* * built-in Korn commands: c_* @@ -768,6 +768,12 @@ c_typeset(wp) for (l = e->loc; l; l = l->next) { for (p = tsort(&l->vars); (vp = *p++); ) for (; vp; vp = vp->u.array) { + /* Report an unset param only if the user has + * explicitly given it some attribute (like export); + * otherwise, after "echo $FOO", we would report FOO... + */ + if (!(vp->flag & ISSET) && !(vp->flag & USERATTRIB)) + continue; if (flag && (vp->flag & flag) == 0) continue; /* no arguments */ |