diff options
author | Jason Downs <downsj@cvs.openbsd.org> | 1996-08-19 20:09:10 +0000 |
---|---|---|
committer | Jason Downs <downsj@cvs.openbsd.org> | 1996-08-19 20:09:10 +0000 |
commit | e7e852656e3beb5f62f8c146ba24004cfda2cf88 (patch) | |
tree | b312bc3e985b3f1cf19691c779e7870219573b6e /bin/pdksh/syn.c | |
parent | 1e9e82f84b5de8bcd110c41c780f476397c385d9 (diff) |
update to pdksh-5.2.8
Diffstat (limited to 'bin/pdksh/syn.c')
-rw-r--r-- | bin/pdksh/syn.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/bin/pdksh/syn.c b/bin/pdksh/syn.c index bd5db3740dd..8779c315841 100644 --- a/bin/pdksh/syn.c +++ b/bin/pdksh/syn.c @@ -1,4 +1,4 @@ -/* $OpenBSD: syn.c,v 1.1 1996/08/14 06:19:11 downsj Exp $ */ +/* $OpenBSD: syn.c,v 1.2 1996/08/19 20:08:59 downsj Exp $ */ /* * shell parser (C version) @@ -224,7 +224,7 @@ get_command(cf) syniocf &= ~(KEYWORD|ALIAS); t = newtp(TCOM); while (1) { - cf = (t->evalflags ? ARRAYVAR : 0) + cf = (t->u.evalflags ? ARRAYVAR : 0) | (XPsize(args) == 0 ? ALIAS|VARASN : CMDWORD); switch (tpeek(cf)) { case REDIR: @@ -241,7 +241,7 @@ get_command(cf) if (iopn == 0 && XPsize(vars) == 0 && XPsize(args) == 0 && assign_command(ident)) - t->evalflags = DOVACHECK; + t->u.evalflags = DOVACHECK; if ((XPsize(args) == 0 || Flag(FKEYWORD)) && is_wdvarassign(yylval.cp)) XPput(vars, yylval.cp); @@ -254,7 +254,7 @@ get_command(cf) * allows (not POSIX, but not disallowed) */ afree(t, ATEMP); - if (XPsize(args) == 0 && XPsize(vars) != 0) { + if (XPsize(args) == 0 && XPsize(vars) == 0) { ACCEPT; goto Subshell; } @@ -334,7 +334,7 @@ get_command(cf) case WHILE: case UNTIL: multiline_push(&old_multiline, c); - t = newtp((c == WHILE) ? TWHILE: TUNTIL); + t = newtp((c == WHILE) ? TWHILE : TUNTIL); t->left = c_list(); t->right = dogroup(); multiline_pop(&old_multiline); @@ -552,6 +552,7 @@ function_body(name, ksh_func) } t = newtp(TFUNCT); t->str = Xclose(xs, xp); + t->u.ksh_func = ksh_func; /* Note that POSIX allows only compound statements after foo(), sh and * at&t ksh allow any command, go with the later since it shouldn't @@ -763,7 +764,7 @@ newtp(type) t = (struct op *) alloc(sizeof(*t), ATEMP); t->type = type; - t->evalflags = 0; + t->u.evalflags = 0; t->args = t->vars = NULL; t->ioact = NULL; t->left = t->right = NULL; |