summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
Diffstat (limited to 'generic')
-rw-r--r--generic/regcomp.c32
-rw-r--r--generic/tclCmdIL.c4
-rw-r--r--generic/tclCmdMZ.c26
-rw-r--r--generic/tclCompCmdsSZ.c4
-rw-r--r--generic/tclEvent.c4
-rw-r--r--generic/tclFileName.c4
-rw-r--r--generic/tclIOCmd.c10
-rw-r--r--generic/tclIndexObj.c4
-rw-r--r--generic/tclInterp.c12
-rw-r--r--generic/tclLoad.c10
-rw-r--r--generic/tclPkg.c4
-rw-r--r--generic/tclProcess.c4
-rw-r--r--generic/tclTest.c8
-rw-r--r--generic/tclTimer.c2
-rw-r--r--generic/tclTrace.c4
-rw-r--r--generic/tclVar.c8
-rw-r--r--generic/tclZlib.c4
17 files changed, 73 insertions, 71 deletions
diff --git a/generic/regcomp.c b/generic/regcomp.c
index 33121a7..4843b54 100644
--- a/generic/regcomp.c
+++ b/generic/regcomp.c
@@ -56,7 +56,7 @@ static const chr *scanplain(struct vars *);
static void onechr(struct vars *, pchr, struct state *, struct state *);
static void dovec(struct vars *, struct cvec *, struct state *, struct state *);
static void wordchrs(struct vars *);
-static struct subre *subre(struct vars *, int, int, struct state *, struct state *);
+static struct subre *sub_re(struct vars *, int, int, struct state *, struct state *);
static void freesubre(struct vars *, struct subre *);
static void freesrnode(struct vars *, struct subre *);
static int numst(struct subre *, int);
@@ -662,7 +662,7 @@ parse(
assert(stopper == ')' || stopper == EOS);
- branches = subre(v, '|', LONGER, init, final);
+ branches = sub_re(v, '|', LONGER, init, final);
NOERRN();
branch = branches;
firstbranch = 1;
@@ -672,7 +672,7 @@ parse(
* Need a place to hang the branch.
*/
- branch->right = subre(v, '|', LONGER, init, final);
+ branch->right = sub_re(v, '|', LONGER, init, final);
NOERRN();
branch = branch->right;
}
@@ -743,7 +743,7 @@ parsebranch(
lp = left;
seencontent = 0;
- t = subre(v, '=', 0, left, right); /* op '=' is tentative */
+ t = sub_re(v, '=', 0, left, right); /* op '=' is tentative */
NOERRN();
while (!SEE('|') && !SEE(stopper) && !SEE(EOS)) {
if (seencontent) { /* implicit concat operator */
@@ -976,7 +976,7 @@ parseqatom(
NOERR();
if (cap) {
v->subs[subno] = atom;
- t = subre(v, '(', atom->flags|CAP, lp, rp);
+ t = sub_re(v, '(', atom->flags|CAP, lp, rp);
NOERR();
t->subno = subno;
t->left = atom;
@@ -994,7 +994,7 @@ parseqatom(
INSIST(v->subs[v->nextvalue] != NULL, REG_ESUBREG);
NOERR();
assert(v->nextvalue > 0);
- atom = subre(v, 'b', BACKR, lp, rp);
+ atom = sub_re(v, 'b', BACKR, lp, rp);
NOERR();
subno = v->nextvalue;
atom->subno = subno;
@@ -1109,7 +1109,7 @@ parseqatom(
*/
if (atom == NULL) {
- atom = subre(v, '=', 0, lp, rp);
+ atom = sub_re(v, '=', 0, lp, rp);
NOERR();
}
@@ -1146,7 +1146,7 @@ parseqatom(
* Break remaining subRE into x{...} and what follows.
*/
- t = subre(v, '.', COMBINE(qprefer, atom->flags), lp, rp);
+ t = sub_re(v, '.', COMBINE(qprefer, atom->flags), lp, rp);
NOERR();
t->left = atom;
atomp = &t->left;
@@ -1160,7 +1160,7 @@ parseqatom(
*/
assert(top->op == '=' && top->left == NULL && top->right == NULL);
- top->left = subre(v, '=', top->flags, top->begin, lp);
+ top->left = sub_re(v, '=', top->flags, top->begin, lp);
NOERR();
top->op = '.';
top->right = t;
@@ -1229,9 +1229,9 @@ parseqatom(
assert(m >= 1 && m != DUPINF && n >= 1);
repeat(v, s, atom->begin, m-1, (n == DUPINF) ? n : n-1);
f = COMBINE(qprefer, atom->flags);
- t = subre(v, '.', f, s, atom->end); /* prefix and atom */
+ t = sub_re(v, '.', f, s, atom->end); /* prefix and atom */
NOERR();
- t->left = subre(v, '=', PREF(f), s, atom->begin);
+ t->left = sub_re(v, '=', PREF(f), s, atom->begin);
NOERR();
t->right = atom;
*atomp = t;
@@ -1246,7 +1246,7 @@ parseqatom(
dupnfa(v->nfa, atom->begin, atom->end, s, s2);
repeat(v, s, s2, m, n);
f = COMBINE(qprefer, atom->flags);
- t = subre(v, '*', f, s, s2);
+ t = sub_re(v, '*', f, s, s2);
NOERR();
t->min = (short) m;
t->max = (short) n;
@@ -1264,7 +1264,7 @@ parseqatom(
t->right = parsebranch(v, stopper, type, s2, rp, 1);
} else {
EMPTYARC(s2, rp);
- t->right = subre(v, '=', 0, s2, rp);
+ t->right = sub_re(v, '=', 0, s2, rp);
}
NOERR();
assert(SEE('|') || SEE(stopper) || SEE(EOS));
@@ -1716,12 +1716,12 @@ wordchrs(
}
/*
- - subre - allocate a subre
- ^ static struct subre *subre(struct vars *, int, int, struct state *,
+ - sub_re - allocate a subre
+ ^ static struct subre *sub_re(struct vars *, int, int, struct state *,
^ struct state *);
*/
static struct subre *
-subre(
+sub_re(
struct vars *v,
int op,
int flags,
diff --git a/generic/tclCmdIL.c b/generic/tclCmdIL.c
index 24e8f39..170fa54 100644
--- a/generic/tclCmdIL.c
+++ b/generic/tclCmdIL.c
@@ -3160,7 +3160,7 @@ Tcl_LsearchObjCmd(
"-real", "-regexp", "-sorted", "-start", "-stride",
"-subindices", NULL
};
- enum options {
+ enum lsearchoptions {
LSEARCH_ALL, LSEARCH_ASCII, LSEARCH_BISECT, LSEARCH_DECREASING,
LSEARCH_DICTIONARY, LSEARCH_EXACT, LSEARCH_GLOB, LSEARCH_INCREASING,
LSEARCH_INDEX, LSEARCH_INLINE, LSEARCH_INTEGER, LSEARCH_NOCASE,
@@ -3208,7 +3208,7 @@ Tcl_LsearchObjCmd(
result = TCL_ERROR;
goto done;
}
- switch ((enum options) index) {
+ switch ((enum lsearchoptions) index) {
case LSEARCH_ALL: /* -all */
allMatches = 1;
break;
diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c
index 06bd0db..17f5ec0 100644
--- a/generic/tclCmdMZ.c
+++ b/generic/tclCmdMZ.c
@@ -137,7 +137,7 @@ Tcl_RegexpObjCmd(
"-expanded", "-line", "-linestop", "-lineanchor",
"-nocase", "-start", "--", NULL
};
- enum options {
+ enum regexpoptions {
REGEXP_ALL, REGEXP_ABOUT, REGEXP_INDICES, REGEXP_INLINE,
REGEXP_EXPANDED,REGEXP_LINE, REGEXP_LINESTOP,REGEXP_LINEANCHOR,
REGEXP_NOCASE, REGEXP_START, REGEXP_LAST
@@ -162,7 +162,7 @@ Tcl_RegexpObjCmd(
&index) != TCL_OK) {
goto optionError;
}
- switch ((enum options) index) {
+ switch ((enum regexpoptions) index) {
case REGEXP_ALL:
all = 1;
break;
@@ -500,7 +500,7 @@ Tcl_RegsubObjCmd(
"-linestop", "-lineanchor", "-nocase", "-start",
"--", NULL
};
- enum options {
+ enum regsubobjoptions {
REGSUB_ALL, REGSUB_COMMAND, REGSUB_EXPANDED, REGSUB_LINE,
REGSUB_LINESTOP, REGSUB_LINEANCHOR, REGSUB_NOCASE, REGSUB_START,
REGSUB_LAST
@@ -524,7 +524,7 @@ Tcl_RegsubObjCmd(
TCL_EXACT, &index) != TCL_OK) {
goto optionError;
}
- switch ((enum options) index) {
+ switch ((enum regsubobjoptions) index) {
case REGSUB_ALL:
all = 1;
break;
@@ -1539,7 +1539,7 @@ StringIsCmd(
"space", "true", "upper", "wideinteger",
"wordchar", "xdigit", NULL
};
- enum isClasses {
+ enum isClassesEnum {
STR_IS_ALNUM, STR_IS_ALPHA, STR_IS_ASCII, STR_IS_CONTROL,
STR_IS_BOOL, STR_IS_DICT, STR_IS_DIGIT, STR_IS_DOUBLE,
STR_IS_ENTIER, STR_IS_FALSE, STR_IS_GRAPH, STR_IS_INT,
@@ -1550,7 +1550,7 @@ StringIsCmd(
static const char *const isOptions[] = {
"-strict", "-failindex", NULL
};
- enum isOptions {
+ enum isOptionsEnum {
OPT_STRICT, OPT_FAILIDX
};
@@ -1572,7 +1572,7 @@ StringIsCmd(
&idx2) != TCL_OK) {
return TCL_ERROR;
}
- switch ((enum isOptions) idx2) {
+ switch ((enum isOptionsEnum) idx2) {
case OPT_STRICT:
strict = 1;
break;
@@ -1601,7 +1601,7 @@ StringIsCmd(
* When entering here, result == 1 and failat == 0.
*/
- switch ((enum isClasses) index) {
+ switch ((enum isClassesEnum) index) {
case STR_IS_ALNUM:
chcomp = Tcl_UniCharIsAlnum;
break;
@@ -3495,7 +3495,7 @@ TclNRSwitchObjCmd(
"-exact", "-glob", "-indexvar", "-matchvar", "-nocase", "-regexp",
"--", NULL
};
- enum options {
+ enum switchOptionsEnum {
OPT_EXACT, OPT_GLOB, OPT_INDEXV, OPT_MATCHV, OPT_NOCASE, OPT_REGEXP,
OPT_LAST
};
@@ -3516,7 +3516,7 @@ TclNRSwitchObjCmd(
&index) != TCL_OK) {
return TCL_ERROR;
}
- switch ((enum options) index) {
+ switch ((enum switchOptionsEnum) index) {
/*
* General options.
*/
@@ -4182,7 +4182,7 @@ Tcl_TimeRateObjCmd(
static const char *const options[] = {
"-direct", "-overhead", "-calibrate", "--", NULL
};
- enum options {
+ enum timeRateOptionsEnum {
TMRT_EV_DIRECT, TMRT_OVERHEAD, TMRT_CALIBRATE, TMRT_LAST
};
NRE_callback *rootPtr;
@@ -4199,7 +4199,7 @@ Tcl_TimeRateObjCmd(
i++;
break;
}
- switch (index) {
+ switch ((enum timeRateOptionsEnum)index) {
case TMRT_EV_DIRECT:
direct = objv[i];
break;
@@ -4214,6 +4214,8 @@ Tcl_TimeRateObjCmd(
case TMRT_CALIBRATE:
calibrate = objv[i];
break;
+ case TMRT_LAST:
+ break;
}
}
diff --git a/generic/tclCompCmdsSZ.c b/generic/tclCompCmdsSZ.c
index c9f72dd..f3865ea 100644
--- a/generic/tclCompCmdsSZ.c
+++ b/generic/tclCompCmdsSZ.c
@@ -511,7 +511,7 @@ TclCompileStringIsCmd(
"true", "upper", "wideinteger", "wordchar",
"xdigit", NULL
};
- enum isClasses {
+ enum isClassesEnum {
STR_IS_ALNUM, STR_IS_ALPHA, STR_IS_ASCII, STR_IS_CONTROL,
STR_IS_BOOL, STR_IS_DICT, STR_IS_DIGIT, STR_IS_DOUBLE, STR_IS_ENTIER,
STR_IS_FALSE, STR_IS_GRAPH, STR_IS_INT, STR_IS_LIST,
@@ -575,7 +575,7 @@ TclCompileStringIsCmd(
CompileWord(envPtr, tokenPtr, interp, parsePtr->numWords-1);
- switch ((enum isClasses) t) {
+ switch ((enum isClassesEnum) t) {
case STR_IS_ALNUM:
strClassType = STR_CLASS_ALNUM;
goto compileStrClass;
diff --git a/generic/tclEvent.c b/generic/tclEvent.c
index 4d473e4..13501b3 100644
--- a/generic/tclEvent.c
+++ b/generic/tclEvent.c
@@ -1491,7 +1491,7 @@ Tcl_UpdateObjCmd(
int optionIndex;
int flags = 0; /* Initialized to avoid compiler warning. */
static const char *const updateOptions[] = {"idletasks", NULL};
- enum updateOptions {OPT_IDLETASKS};
+ enum updateOptionsEnum {OPT_IDLETASKS};
if (objc == 1) {
flags = TCL_ALL_EVENTS|TCL_DONT_WAIT;
@@ -1500,7 +1500,7 @@ Tcl_UpdateObjCmd(
"option", 0, &optionIndex) != TCL_OK) {
return TCL_ERROR;
}
- switch ((enum updateOptions) optionIndex) {
+ switch ((enum updateOptionsEnum) optionIndex) {
case OPT_IDLETASKS:
flags = TCL_WINDOW_EVENTS|TCL_IDLE_EVENTS|TCL_DONT_WAIT;
break;
diff --git a/generic/tclFileName.c b/generic/tclFileName.c
index 5b641a8..eb110e0 100644
--- a/generic/tclFileName.c
+++ b/generic/tclFileName.c
@@ -1239,7 +1239,7 @@ Tcl_GlobObjCmd(
"-directory", "-join", "-nocomplain", "-path", "-tails",
"-types", "--", NULL
};
- enum options {
+ enum globOptionsEnum {
GLOB_DIR, GLOB_JOIN, GLOB_NOCOMPLAIN, GLOB_PATH, GLOB_TAILS,
GLOB_TYPE, GLOB_LAST
};
@@ -1272,7 +1272,7 @@ Tcl_GlobObjCmd(
}
}
- switch (index) {
+ switch ((enum globOptionsEnum) index) {
case GLOB_NOCOMPLAIN: /* -nocomplain */
globFlags |= TCL_GLOBMODE_NO_COMPLAIN;
break;
diff --git a/generic/tclIOCmd.c b/generic/tclIOCmd.c
index 31134fe..34c12f5 100644
--- a/generic/tclIOCmd.c
+++ b/generic/tclIOCmd.c
@@ -861,7 +861,7 @@ Tcl_ExecObjCmd(
static const char *const options[] = {
"-ignorestderr", "-keepnewline", "--", NULL
};
- enum options {
+ enum execOptionsEnum {
EXEC_IGNORESTDERR, EXEC_KEEPNEWLINE, EXEC_LAST
};
@@ -1443,7 +1443,7 @@ Tcl_SocketObjCmd(
"-async", "-myaddr", "-myport", "-reuseaddr", "-reuseport", "-server",
NULL
};
- enum socketOptions {
+ enum socketOptionsEnum {
SKT_ASYNC, SKT_MYADDR, SKT_MYPORT, SKT_REUSEADDR, SKT_REUSEPORT,
SKT_SERVER
};
@@ -1468,7 +1468,7 @@ Tcl_SocketObjCmd(
TCL_EXACT, &optionIndex) != TCL_OK) {
return TCL_ERROR;
}
- switch ((enum socketOptions) optionIndex) {
+ switch ((enum socketOptionsEnum) optionIndex) {
case SKT_ASYNC:
if (server == 1) {
Tcl_SetObjResult(interp, Tcl_NewStringObj(
@@ -1779,7 +1779,7 @@ ChanPendingObjCmd(
Tcl_Channel chan;
int index, mode;
static const char *const options[] = {"input", "output", NULL};
- enum options {PENDING_INPUT, PENDING_OUTPUT};
+ enum pendingOptionsEnum {PENDING_INPUT, PENDING_OUTPUT};
if (objc != 3) {
Tcl_WrongNumArgs(interp, 1, objv, "mode channelId");
@@ -1795,7 +1795,7 @@ ChanPendingObjCmd(
return TCL_ERROR;
}
- switch ((enum options) index) {
+ switch ((enum pendingOptionsEnum) index) {
case PENDING_INPUT:
if (!(mode & TCL_READABLE)) {
Tcl_SetObjResult(interp, Tcl_NewWideIntObj(-1));
diff --git a/generic/tclIndexObj.c b/generic/tclIndexObj.c
index 7df4581..89582b7 100644
--- a/generic/tclIndexObj.c
+++ b/generic/tclIndexObj.c
@@ -484,7 +484,7 @@ PrefixMatchObjCmd(
static const char *const matchOptions[] = {
"-error", "-exact", "-message", NULL
};
- enum matchOptions {
+ enum matchOptionsEnum {
PRFMATCH_ERROR, PRFMATCH_EXACT, PRFMATCH_MESSAGE
};
@@ -498,7 +498,7 @@ PrefixMatchObjCmd(
&index) != TCL_OK) {
return TCL_ERROR;
}
- switch ((enum matchOptions) index) {
+ switch ((enum matchOptionsEnum) index) {
case PRFMATCH_EXACT:
flags |= TCL_EXACT;
break;
diff --git a/generic/tclInterp.c b/generic/tclInterp.c
index 69d2b13..f7eff58 100644
--- a/generic/tclInterp.c
+++ b/generic/tclInterp.c
@@ -639,7 +639,7 @@ NRInterpCmd(
"share", "target", "transfer",
NULL
};
- enum option {
+ enum interpOptionEnum {
OPT_ALIAS, OPT_ALIASES, OPT_BGERROR, OPT_CANCEL,
OPT_CHILDREN, OPT_CREATE, OPT_DEBUG, OPT_DELETE,
OPT_EVAL, OPT_EXISTS, OPT_EXPOSE, OPT_HIDE,
@@ -662,7 +662,7 @@ NRInterpCmd(
"option", 0, &index);
return TCL_ERROR;
}
- switch ((enum option)index) {
+ switch ((enum interpOptionEnum)index) {
case OPT_ALIAS: {
Tcl_Interp *parentInterp;
@@ -715,7 +715,7 @@ NRInterpCmd(
static const char *const cancelOptions[] = {
"-unwind", "--", NULL
};
- enum option {
+ enum optionCancelEnum {
OPT_UNWIND, OPT_LAST
};
@@ -730,7 +730,7 @@ NRInterpCmd(
return TCL_ERROR;
}
- switch ((enum option) index) {
+ switch ((enum optionCancelEnum) index) {
case OPT_UNWIND:
/*
* The evaluation stack in the target interp is to be unwound.
@@ -2571,7 +2571,7 @@ NRChildCmd(
"issafe", "invokehidden", "limit", "marktrusted",
"recursionlimit", NULL
};
- enum options {
+ enum childCmdOptionsEnum {
OPT_ALIAS, OPT_ALIASES, OPT_BGERROR, OPT_DEBUG,
OPT_EVAL, OPT_EXPOSE, OPT_HIDE, OPT_HIDDEN,
OPT_ISSAFE, OPT_INVOKEHIDDEN, OPT_LIMIT, OPT_MARKTRUSTED,
@@ -2591,7 +2591,7 @@ NRChildCmd(
return TCL_ERROR;
}
- switch ((enum options) index) {
+ switch ((enum childCmdOptionsEnum) index) {
case OPT_ALIAS:
if (objc > 2) {
if (objc == 3) {
diff --git a/generic/tclLoad.c b/generic/tclLoad.c
index 72cba78..7bea2c1 100644
--- a/generic/tclLoad.c
+++ b/generic/tclLoad.c
@@ -137,7 +137,7 @@ Tcl_LoadObjCmd(
static const char *const options[] = {
"-global", "-lazy", "--", NULL
};
- enum options {
+ enum loadOptionsEnum {
LOAD_GLOBAL, LOAD_LAZY, LOAD_LAST
};
@@ -150,9 +150,9 @@ Tcl_LoadObjCmd(
return TCL_ERROR;
}
++objv; --objc;
- if (LOAD_GLOBAL == (enum options) index) {
+ if (LOAD_GLOBAL == (enum loadOptionsEnum) index) {
flags |= TCL_LOAD_GLOBAL;
- } else if (LOAD_LAZY == (enum options) index) {
+ } else if (LOAD_LAZY == (enum loadOptionsEnum) index) {
flags |= TCL_LOAD_LAZY;
} else {
break;
@@ -557,7 +557,7 @@ Tcl_UnloadObjCmd(
static const char *const options[] = {
"-nocomplain", "-keeplibrary", "--", NULL
};
- enum options {
+ enum unloadOptionsEnum {
UNLOAD_NOCOMPLAIN, UNLOAD_KEEPLIB, UNLOAD_LAST
};
@@ -582,7 +582,7 @@ Tcl_UnloadObjCmd(
break;
}
}
- switch (index) {
+ switch ((enum unloadOptionsEnum)index) {
case UNLOAD_NOCOMPLAIN: /* -nocomplain */
complain = 0;
break;
diff --git a/generic/tclPkg.c b/generic/tclPkg.c
index 1fc5ae1..9022fe9 100644
--- a/generic/tclPkg.c
+++ b/generic/tclPkg.c
@@ -1073,7 +1073,7 @@ TclNRPackageObjCmd(
"present", "provide", "require", "unknown", "vcompare",
"versions", "vsatisfies", NULL
};
- enum pkgOptions {
+ enum pkgOptionsEnum {
PKG_FILES, PKG_FORGET, PKG_IFNEEDED, PKG_NAMES, PKG_PREFER,
PKG_PRESENT, PKG_PROVIDE, PKG_REQUIRE, PKG_UNKNOWN, PKG_VCOMPARE,
PKG_VERSIONS, PKG_VSATISFIES
@@ -1099,7 +1099,7 @@ TclNRPackageObjCmd(
&optionIndex) != TCL_OK) {
return TCL_ERROR;
}
- switch ((enum pkgOptions) optionIndex) {
+ switch ((enum pkgOptionsEnum) optionIndex) {
case PKG_FILES: {
PkgFiles *pkgFiles;
diff --git a/generic/tclProcess.c b/generic/tclProcess.c
index bab2fca..838d8d6 100644
--- a/generic/tclProcess.c
+++ b/generic/tclProcess.c
@@ -472,7 +472,7 @@ ProcessStatusObjCmd(
static const char *const switches[] = {
"-wait", "--", NULL
};
- enum switches {
+ enum switchesEnum {
STATUS_WAIT, STATUS_LAST
};
@@ -485,7 +485,7 @@ ProcessStatusObjCmd(
return TCL_ERROR;
}
++objv; --objc;
- if (STATUS_WAIT == (enum switches) index) {
+ if (STATUS_WAIT == (enum switchesEnum) index) {
options = 0;
} else {
break;
diff --git a/generic/tclTest.c b/generic/tclTest.c
index e23d42d..91e3b49 100644
--- a/generic/tclTest.c
+++ b/generic/tclTest.c
@@ -3207,7 +3207,7 @@ TestlinkarrayCmd(
static const char *LinkOption[] = {
"update", "remove", "create", NULL
};
- enum LinkOption { LINK_UPDATE, LINK_REMOVE, LINK_CREATE };
+ enum LinkOptionEnum { LINK_UPDATE, LINK_REMOVE, LINK_CREATE };
static const char *LinkType[] = {
"char", "uchar", "short", "ushort", "int", "uint", "long", "ulong",
"wide", "uwide", "float", "double", "string", "char*", "binary", NULL
@@ -3232,7 +3232,7 @@ TestlinkarrayCmd(
&optionIndex) != TCL_OK) {
return TCL_ERROR;
}
- switch ((enum LinkOption) optionIndex) {
+ switch ((enum LinkOptionEnum) optionIndex) {
case LINK_UPDATE:
for (i=2; i<objc; i++) {
Tcl_UpdateLinkedVar(interp, Tcl_GetString(objv[i]));
@@ -3799,7 +3799,7 @@ TestregexpObjCmd(
"-xflags",
"--", NULL
};
- enum options {
+ enum optionsEnum {
REGEXP_INDICES, REGEXP_NOCASE, REGEXP_ABOUT, REGEXP_EXPANDED,
REGEXP_MULTI, REGEXP_NOCROSS, REGEXP_NEWL,
REGEXP_XFLAGS,
@@ -3824,7 +3824,7 @@ TestregexpObjCmd(
&index) != TCL_OK) {
return TCL_ERROR;
}
- switch ((enum options) index) {
+ switch ((enum optionsEnum) index) {
case REGEXP_INDICES:
indices = 1;
break;
diff --git a/generic/tclTimer.c b/generic/tclTimer.c
index 133c44e..84332a0 100644
--- a/generic/tclTimer.c
+++ b/generic/tclTimer.c
@@ -792,7 +792,7 @@ Tcl_AfterObjCmd(
static const char *const afterSubCmds[] = {
"cancel", "idle", "info", NULL
};
- enum afterSubCmds {AFTER_CANCEL, AFTER_IDLE, AFTER_INFO};
+ enum afterSubCmdsEnum {AFTER_CANCEL, AFTER_IDLE, AFTER_INFO};
ThreadSpecificData *tsdPtr = InitTimer();
if (objc < 2) {
diff --git a/generic/tclTrace.c b/generic/tclTrace.c
index 16d5432..10935c9 100644
--- a/generic/tclTrace.c
+++ b/generic/tclTrace.c
@@ -202,7 +202,7 @@ Tcl_TraceObjCmd(
NULL
};
/* 'OLD' options are pre-Tcl-8.4 style */
- enum traceOptions {
+ enum traceOptionsEnum {
TRACE_ADD, TRACE_INFO, TRACE_REMOVE,
#ifndef TCL_REMOVE_OBSOLETE_TRACES
TRACE_OLD_VARIABLE, TRACE_OLD_VDELETE, TRACE_OLD_VINFO
@@ -218,7 +218,7 @@ Tcl_TraceObjCmd(
&optionIndex) != TCL_OK) {
return TCL_ERROR;
}
- switch ((enum traceOptions) optionIndex) {
+ switch ((enum traceOptionsEnum) optionIndex) {
case TRACE_ADD:
case TRACE_REMOVE: {
/*
diff --git a/generic/tclVar.c b/generic/tclVar.c
index 8a779bd..3de3a89 100644
--- a/generic/tclVar.c
+++ b/generic/tclVar.c
@@ -3771,7 +3771,7 @@ ArrayNamesCmd(
static const char *const options[] = {
"-exact", "-glob", "-regexp", NULL
};
- enum options { OPT_EXACT, OPT_GLOB, OPT_REGEXP };
+ enum arrayNamesOptionsEnum { OPT_EXACT, OPT_GLOB, OPT_REGEXP };
Var *varPtr, *varPtr2;
Tcl_Obj *nameObj, *resultObj, *patternObj;
Tcl_HashSearch search;
@@ -3839,7 +3839,7 @@ ArrayNamesCmd(
const char *name = TclGetString(nameObj);
int matched = 0;
- switch ((enum options) mode) {
+ switch ((enum arrayNamesOptionsEnum) mode) {
case OPT_EXACT:
Tcl_Panic("exact matching shouldn't get here");
case OPT_GLOB:
@@ -6436,7 +6436,7 @@ ArrayDefaultCmd(
static const char *const options[] = {
"get", "set", "exists", "unset", NULL
};
- enum options { OPT_GET, OPT_SET, OPT_EXISTS, OPT_UNSET };
+ enum arrayDefaultOptionsEnum { OPT_GET, OPT_SET, OPT_EXISTS, OPT_UNSET };
Tcl_Obj *arrayNameObj, *defaultValueObj;
Var *varPtr, *arrayPtr;
int isArray, option;
@@ -6460,7 +6460,7 @@ ArrayDefaultCmd(
return TCL_ERROR;
}
- switch (option) {
+ switch ((enum arrayDefaultOptionsEnum)option) {
case OPT_GET:
if (objc != 3) {
Tcl_WrongNumArgs(interp, 2, objv, "arrayName");
diff --git a/generic/tclZlib.c b/generic/tclZlib.c
index 8f1ebe4..36064c5 100644
--- a/generic/tclZlib.c
+++ b/generic/tclZlib.c
@@ -2407,7 +2407,7 @@ ZlibPushSubcmd(
"-dictionary", "-header", "-level", "-limit", NULL
};
const char *const *pushOptions = pushDecompressOptions;
- enum pushOptions {poDictionary, poHeader, poLevel, poLimit};
+ enum pushOptionsEnum {poDictionary, poHeader, poLevel, poLimit};
Tcl_Obj *headerObj = NULL, *compDictObj = NULL;
int limit = DEFAULT_BUFFER_SIZE, dummy;
@@ -2489,7 +2489,7 @@ ZlibPushSubcmd(
Tcl_SetErrorCode(interp, "TCL", "ZIP", "NOVAL", NULL);
return TCL_ERROR;
}
- switch ((enum pushOptions) option) {
+ switch ((enum pushOptionsEnum) option) {
case poHeader:
headerObj = objv[i];
if (Tcl_DictObjSize(interp, headerObj, &dummy) != TCL_OK) {