From 281e4017d7588594a01f784deb0ffe1dbe9ef118 Mon Sep 17 00:00:00 2001 From: "Barton E. Schaefer" Date: Thu, 1 Jun 2017 14:47:08 -0700 Subject: Special-case typeset -c / -C because of PM_* renumbering --- Src/builtin.c | 11 +++++++++++ Src/zsh.h | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) 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" -- cgit 1.4.1