diff options
author | Tanaka Akira <akr@users.sourceforge.net> | 1999-04-15 18:18:42 +0000 |
---|---|---|
committer | Tanaka Akira <akr@users.sourceforge.net> | 1999-04-15 18:18:42 +0000 |
commit | 7a0415cfd70a02b2280d27556c6c54cef1c86e1a (patch) | |
tree | 37a88a1c4611ee37f2a3209873fc9a34a2624587 /Src/Zle/zle_params.c | |
parent | 904b939cbd81a542303da2c58288b95b153106f5 (diff) | |
download | zsh-7a0415cfd70a02b2280d27556c6c54cef1c86e1a.tar.gz zsh-7a0415cfd70a02b2280d27556c6c54cef1c86e1a.tar.xz zsh-7a0415cfd70a02b2280d27556c6c54cef1c86e1a.zip |
zsh-3.1.5-pws-11 zsh-3.1.5-pws-11
Diffstat (limited to 'Src/Zle/zle_params.c')
-rw-r--r-- | Src/Zle/zle_params.c | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/Src/Zle/zle_params.c b/Src/Zle/zle_params.c index 7e15d3d8b..2a35ac416 100644 --- a/Src/Zle/zle_params.c +++ b/Src/Zle/zle_params.c @@ -67,6 +67,8 @@ static struct zleparam { zleunsetfn, NULL }, { "keys", PM_ARRAY | PM_READONLY, NULL, FN(get_keys), zleunsetfn, NULL }, + { "NUMERIC", PM_INTEGER | PM_READONLY, FN(set_numeric), FN(get_numeric), + zleunsetfn, NULL }, { NULL, 0, NULL, NULL, NULL, NULL } }; @@ -97,6 +99,7 @@ makezleparams(int ro) case PM_INTEGER: pm->sets.ifn = (void (*) _((Param, long))) zp->setfn; pm->gets.ifn = (long (*) _((Param))) zp->getfn; + pm->ct = 10; break; } pm->unsetfn = zp->unsetfn; @@ -225,9 +228,9 @@ get_keys(Param pm) { char **r, **q, *p, *k, c; - r = (char **) halloc((strlen(keybuf) + 1) * sizeof(char *)); + r = (char **) zhalloc((strlen(keybuf) + 1) * sizeof(char *)); for (q = r, p = keybuf; (c = *p); q++, p++) { - k = *q = (char *) halloc(5); + k = *q = (char *) zhalloc(5); if (c & 0x80) { *k++ = 'M'; *k++ = '-'; @@ -244,3 +247,17 @@ get_keys(Param pm) return r; } + +/**/ +static void +set_numeric(Param pm, long x) +{ + zmult = x; +} + +/**/ +static long +get_numeric(Param pm) +{ + return zmult; +} |