diff options
author | Tanaka Akira <akr@users.sourceforge.net> | 1999-06-27 05:33:04 +0000 |
---|---|---|
committer | Tanaka Akira <akr@users.sourceforge.net> | 1999-06-27 05:33:04 +0000 |
commit | 346825df86466cf151be61b9429ef2c1734e66ea (patch) | |
tree | bd3e1ccd947b47f974c62b4113c5276416de2c9f /Src/Zle/zle_params.c | |
parent | a2159285e80508bb682d90a71270fbddada8bd05 (diff) | |
download | zsh-346825df86466cf151be61b9429ef2c1734e66ea.tar.gz zsh-346825df86466cf151be61b9429ef2c1734e66ea.tar.xz zsh-346825df86466cf151be61b9429ef2c1734e66ea.zip |
zsh-3.1.5-pws-24 zsh-3.1.5-pws-24
Diffstat (limited to 'Src/Zle/zle_params.c')
-rw-r--r-- | Src/Zle/zle_params.c | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/Src/Zle/zle_params.c b/Src/Zle/zle_params.c index 5c4feef50..bac399e7d 100644 --- a/Src/Zle/zle_params.c +++ b/Src/Zle/zle_params.c @@ -69,8 +69,8 @@ static struct zleparam { zleunsetfn, NULL }, { "keys", PM_ARRAY | PM_READONLY, NULL, FN(get_keys), zleunsetfn, NULL }, - { "NUMERIC", PM_INTEGER, FN(set_numeric), FN(get_numeric), - zleunsetfn, NULL }, + { "NUMERIC", PM_INTEGER | PM_UNSET, FN(set_numeric), FN(get_numeric), + unset_numeric, NULL }, { "HISTNO", PM_INTEGER | PM_READONLY, NULL, FN(get_histno), zleunsetfn, NULL }, { NULL, 0, NULL, NULL, NULL, NULL } @@ -84,12 +84,12 @@ makezleparams(int ro) for(zp = zleparams; zp->name; zp++) { Param pm = createparam(zp->name, (zp->type |PM_SPECIAL|PM_REMOVABLE| - (ro ? PM_READONLY : 0))); + PM_LOCAL|(ro ? PM_READONLY : 0))); if (!pm) pm = (Param) paramtab->getnode(paramtab, zp->name); DPUTS(!pm, "param not set in makezleparams"); - pm->level = locallevel; + pm->level = locallevel + 1; pm->u.data = zp->data; switch(PM_TYPE(zp->type)) { case PM_SCALAR: @@ -107,6 +107,8 @@ makezleparams(int ro) break; } pm->unsetfn = zp->unsetfn; + if ((zp->type & PM_UNSET) && (zmod.flags & MOD_MULT)) + pm->flags &= ~PM_UNSET; } } @@ -267,6 +269,7 @@ static void set_numeric(Param pm, zlong x) { zmult = x; + zmod.flags = MOD_MULT; } /**/ @@ -277,6 +280,17 @@ get_numeric(Param pm) } /**/ +static void +unset_numeric(Param pm, int exp) +{ + if (exp) { + stdunsetfn(pm, exp); + zmod.flags = 0; + zmult = 1; + } +} + +/**/ static zlong get_histno(Param pm) { |