diff options
author | Barton E. Schaefer <schaefer@zsh.org> | 2017-06-01 14:47:08 -0700 |
---|---|---|
committer | Barton E. Schaefer <schaefer@zsh.org> | 2017-06-01 14:47:08 -0700 |
commit | 281e4017d7588594a01f784deb0ffe1dbe9ef118 (patch) | |
tree | 6bcde82aca3571f9320a46d77431abcf19b54637 | |
parent | 77fb699adad0540d99a6e4f0da0f266542f62ce6 (diff) | |
download | zsh-281e4017d7588594a01f784deb0ffe1dbe9ef118.tar.gz zsh-281e4017d7588594a01f784deb0ffe1dbe9ef118.tar.xz zsh-281e4017d7588594a01f784deb0ffe1dbe9ef118.zip |
Special-case typeset -c / -C because of PM_* renumbering
-rw-r--r-- | Src/builtin.c | 11 | ||||
-rw-r--r-- | Src/zsh.h | 2 |
2 files changed, 12 insertions, 1 deletions
diff --git a/Src/builtin.c b/Src/builtin.c index d54b0f41c..2a2b22d3b 100644 --- a/Src/builtin.c +++ b/Src/builtin.c @@ -2579,6 +2579,17 @@ bin_typeset(char *name, char **argv, LinkList assigns, Options ops, int func) else if (OPT_PLUS(ops,optval)) off |= bit; } + + /* Special case, ran out of bit<<1 positions for optstr */ + if (OPT_MINUS(ops,'c')) + on |= PM_CACHELEN; + else if (OPT_PLUS(ops,'c')) + off |= PM_CACHELEN; + if (OPT_MINUS(ops,'C')) + on |= PM_CHECKLEN; + else if (OPT_PLUS(ops,'C')) + off |= PM_CHECKLEN; + roff = off; /* Sanity checks on the options. Remove conflicting options. */ diff --git a/Src/zsh.h b/Src/zsh.h index 48e280984..5fbd95469 100644 --- a/Src/zsh.h +++ b/Src/zsh.h @@ -1857,7 +1857,7 @@ struct tieddata { #define PM_NAMEDDIR (1<<30) /* has a corresponding nameddirtab entry */ /* The option string corresponds to the first of the variables above */ -#define TYPESET_OPTSTR "aiEFALRZlurtxUhHTkzcC" +#define TYPESET_OPTSTR "aiEFALRZlurtxUhHTkz" /* These typeset options take an optional numeric argument */ #define TYPESET_OPTNUM "LRZiEF" |