summaryrefslogtreecommitdiffstats
path: root/generic/tkVisual.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2019-09-24 15:01:58 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2019-09-24 15:01:58 (GMT)
commitc1d2b9d95856fe913236eec23533b0bd522726d3 (patch)
treed2205c21c6895c4707b37d72ce3afbc98f0d3b4c /generic/tkVisual.c
parent93a3e63b7e9a22f94f1101b7ba32ac79738e5b65 (diff)
downloadtk-c1d2b9d95856fe913236eec23533b0bd522726d3.zip
tk-c1d2b9d95856fe913236eec23533b0bd522726d3.tar.gz
tk-c1d2b9d95856fe913236eec23533b0bd522726d3.tar.bz2
Don't use "class" as (internal) struct field name or local variable name. Make it "c_class" (just as X11 does as well), in order to prevent conflict with C++ compilers.
Diffstat (limited to 'generic/tkVisual.c')
-rw-r--r--generic/tkVisual.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/generic/tkVisual.c b/generic/tkVisual.c
index 8b0c155..567c552 100644
--- a/generic/tkVisual.c
+++ b/generic/tkVisual.c
@@ -23,7 +23,7 @@ typedef struct VisualDictionary {
const char *name; /* Textual name of class. */
int minLength; /* Minimum # characters that must be specified
* for an unambiguous match. */
- int class; /* X symbol for class. */
+ int c_class; /* X symbol for class. */
} VisualDictionary;
static const VisualDictionary visualNames[] = {
{"best", 1, 0},
@@ -145,7 +145,7 @@ Tk_GetVisual(
return visual;
}
template.depth = Tk_Depth(tkwin2);
- template.class = visual->class;
+ template.c_class = visual->c_class;
template.red_mask = visual->red_mask;
template.green_mask = visual->green_mask;
template.blue_mask = visual->blue_mask;
@@ -192,16 +192,16 @@ Tk_GetVisual(
}
}
length = p - string;
- template.class = -1;
+ template.c_class = -1;
for (dictPtr = visualNames; dictPtr->name != NULL; dictPtr++) {
if ((dictPtr->name[0] == c) && (length >= dictPtr->minLength)
&& (strncmp(string, dictPtr->name,
(size_t) length) == 0)) {
- template.class = dictPtr->class;
+ template.c_class = dictPtr->c_class;
break;
}
}
- if (template.class == -1) {
+ if (template.c_class == -1) {
Tcl_Obj *msgObj = Tcl_ObjPrintf(
"unknown or ambiguous visual name \"%s\": class must be ",
string);
@@ -262,7 +262,7 @@ Tk_GetVisual(
bestPrio = 0;
bestPtr = NULL;
for (i = 0; i < numVisuals; i++) {
- switch (visInfoList[i].class) {
+ switch (visInfoList[i].c_class) {
case DirectColor:
prio = 5; break;
case GrayScale: