mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-18 15:21:16 +02:00
18325: options on by default weren't printed correctly by zsh/parameter
This commit is contained in:
parent
79d0de7c3a
commit
1c9ac56c43
3 changed files with 13 additions and 3 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2003-03-07 Peter Stephenson <pws@csr.com>
|
||||||
|
|
||||||
|
* 18325: Src/Modules/parameter.c: options on by default weren't
|
||||||
|
handled correctly.
|
||||||
|
|
||||||
2003-02-26 Clint Adams <clint@zsh.org>
|
2003-02-26 Clint Adams <clint@zsh.org>
|
||||||
|
|
||||||
* 18303: zshconfig.ac: fix some always-true test evaluations.
|
* 18303: zshconfig.ac: fix some always-true test evaluations.
|
||||||
|
|
|
@ -794,7 +794,14 @@ getpmoption(HashTable ht, char *name)
|
||||||
pm->level = 0;
|
pm->level = 0;
|
||||||
|
|
||||||
if ((n = optlookup(name)))
|
if ((n = optlookup(name)))
|
||||||
pm->u.str = dupstring(opts[n] ? "on" : "off");
|
{
|
||||||
|
int ison;
|
||||||
|
if (n > 0)
|
||||||
|
ison = opts[n];
|
||||||
|
else
|
||||||
|
ison = !opts[-n];
|
||||||
|
pm->u.str = dupstring(ison ? "on" : "off");
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
pm->u.str = dupstring("");
|
pm->u.str = dupstring("");
|
||||||
pm->flags |= PM_UNSET;
|
pm->flags |= PM_UNSET;
|
||||||
|
|
|
@ -347,8 +347,6 @@ scantermcap(HashTable ht, ScanFunc func, int flags)
|
||||||
u = buf;
|
u = buf;
|
||||||
|
|
||||||
pm->flags = PM_READONLY | PM_SCALAR;
|
pm->flags = PM_READONLY | PM_SCALAR;
|
||||||
pm->sets.cfn = NULL;
|
|
||||||
pm->gets.cfn = strgetfn;
|
|
||||||
|
|
||||||
for (capcode = (char **)boolcodes; *capcode; capcode++) {
|
for (capcode = (char **)boolcodes; *capcode; capcode++) {
|
||||||
if ((num = ztgetflag(*capcode)) != -1) {
|
if ((num = ztgetflag(*capcode)) != -1) {
|
||||||
|
|
Loading…
Reference in a new issue