diff options
author | Tanaka Akira <akr@users.sourceforge.net> | 1999-05-19 13:10:41 +0000 |
---|---|---|
committer | Tanaka Akira <akr@users.sourceforge.net> | 1999-05-19 13:10:41 +0000 |
commit | 4fec788fa5f6e7c9723e02e3d0b57068ce9785aa (patch) | |
tree | 2b4fd7f79ee29b231c77c9bc0bc67b4eed913bef /Src/builtin.c | |
parent | ea0ddb0fc6073be3d7d289e59b083f564dbd761f (diff) | |
download | zsh-4fec788fa5f6e7c9723e02e3d0b57068ce9785aa.tar.gz zsh-4fec788fa5f6e7c9723e02e3d0b57068ce9785aa.tar.xz zsh-4fec788fa5f6e7c9723e02e3d0b57068ce9785aa.zip |
zsh-3.1.5-pws-19 dot-zsh-3.1.5-pws-19-199905271502
Diffstat (limited to 'Src/builtin.c')
-rw-r--r-- | Src/builtin.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/Src/builtin.c b/Src/builtin.c index 8436cde33..a90d59cae 100644 --- a/Src/builtin.c +++ b/Src/builtin.c @@ -1521,9 +1521,14 @@ typeset_single(char *cname, char *pname, Param pm, int func, zerrnam(cname, "%s: restricted", pname, 0); return pm; } - if (PM_TYPE(pm->flags) == PM_ARRAY && (on & PM_UNIQUE) && - !(pm->flags & PM_READONLY & ~off)) - uniqarray((*pm->gets.afn) (pm)); + if ((on & PM_UNIQUE) && !(pm->flags & PM_READONLY & ~off)) { + Param apm; + if (PM_TYPE(pm->flags) == PM_ARRAY) + uniqarray((*pm->gets.afn) (pm)); + else if (PM_TYPE(pm->flags) == PM_SCALAR && pm->ename && + (apm = (Param) paramtab->getnode(paramtab, pm->ename))) + uniqarray((*apm->gets.afn) (apm)); + } pm->flags = (pm->flags | on) & ~off; /* This auxlen/pm->ct stuff is a nasty hack. */ if ((on & (PM_LEFT | PM_RIGHT_B | PM_RIGHT_Z | PM_INTEGER)) && @@ -3647,7 +3652,7 @@ bin_ttyctl(char *name, char **argv, char *ops, int func) int bin_let(char *name, char **argv, char *ops, int func) { - long val = 0; + zlong val = 0; while (*argv) val = matheval(*argv++); |