about summary refs log tree commit diff
path: root/Src/builtin.c
diff options
context:
space:
mode:
authorBarton E. Schaefer <schaefer@zsh.org>2017-06-01 14:47:08 -0700
committerBarton E. Schaefer <schaefer@zsh.org>2017-06-01 14:47:08 -0700
commit281e4017d7588594a01f784deb0ffe1dbe9ef118 (patch)
tree6bcde82aca3571f9320a46d77431abcf19b54637 /Src/builtin.c
parent77fb699adad0540d99a6e4f0da0f266542f62ce6 (diff)
downloadzsh-281e4017d7588594a01f784deb0ffe1dbe9ef118.tar.gz
zsh-281e4017d7588594a01f784deb0ffe1dbe9ef118.tar.xz
zsh-281e4017d7588594a01f784deb0ffe1dbe9ef118.zip
Special-case typeset -c / -C because of PM_* renumbering
Diffstat (limited to 'Src/builtin.c')
-rw-r--r--Src/builtin.c11
1 files changed, 11 insertions, 0 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. */