summaryrefslogtreecommitdiffstats
path: root/generic/tkImgPhInstance.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/tkImgPhInstance.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/tkImgPhInstance.c')
-rw-r--r--generic/tkImgPhInstance.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/generic/tkImgPhInstance.c b/generic/tkImgPhInstance.c
index 72ebcb8..b73ceeb 100644
--- a/generic/tkImgPhInstance.c
+++ b/generic/tkImgPhInstance.c
@@ -309,7 +309,7 @@ TkImgPhotoGet(
nGreen = nBlue = 0;
mono = 1;
instancePtr->visualInfo = *visInfoPtr;
- switch (visInfoPtr->class) {
+ switch (visInfoPtr->c_class) {
case DirectColor:
case TrueColor:
nRed = 1 << CountBits(visInfoPtr->red_mask);
@@ -645,7 +645,7 @@ TkImgPhotoDisplay(
if ((instancePtr->masterPtr->flags & COMPLEX_ALPHA)
&& visInfo.depth >= 15
- && (visInfo.class == DirectColor || visInfo.class == TrueColor)) {
+ && (visInfo.c_class == DirectColor || visInfo.c_class == TrueColor)) {
Tk_ErrorHandler handler;
XImage *bgImg = NULL;
@@ -948,7 +948,7 @@ IsValidPalette(
mono = 0;
}
- switch (instancePtr->visualInfo.class) {
+ switch (instancePtr->visualInfo.c_class) {
case DirectColor:
case TrueColor:
if ((nRed > (1 << CountBits(instancePtr->visualInfo.red_mask)))
@@ -1213,8 +1213,8 @@ AllocateColors(
* store them in *colors.
*/
- if ((colorPtr->visualInfo.class == DirectColor)
- || (colorPtr->visualInfo.class == TrueColor)) {
+ if ((colorPtr->visualInfo.c_class == DirectColor)
+ || (colorPtr->visualInfo.c_class == TrueColor)) {
/*
* Direct/True Color: allocate shades of red, green, blue
@@ -1368,8 +1368,8 @@ AllocateColors(
*/
#ifndef _WIN32
- if ((colorPtr->visualInfo.class != DirectColor)
- && (colorPtr->visualInfo.class != TrueColor)) {
+ if ((colorPtr->visualInfo.c_class != DirectColor)
+ && (colorPtr->visualInfo.c_class != TrueColor)) {
colorPtr->flags |= MAP_COLORS;
}
#endif /* _WIN32 */
@@ -1395,8 +1395,8 @@ AllocateColors(
} else {
g = (i * (nGreen - 1) + 127) / 255;
b = (i * (nBlue - 1) + 127) / 255;
- if ((colorPtr->visualInfo.class == DirectColor)
- || (colorPtr->visualInfo.class == TrueColor)) {
+ if ((colorPtr->visualInfo.c_class == DirectColor)
+ || (colorPtr->visualInfo.c_class == TrueColor)) {
colorPtr->redValues[i] =
colors[r].pixel & colorPtr->visualInfo.red_mask;
colorPtr->greenValues[i] =
@@ -1654,8 +1654,8 @@ TkImgDitherInstance(
* DirectColor with many colors).
*/
- if ((colorPtr->visualInfo.class == DirectColor)
- || (colorPtr->visualInfo.class == TrueColor)) {
+ if ((colorPtr->visualInfo.c_class == DirectColor)
+ || (colorPtr->visualInfo.c_class == TrueColor)) {
int nRed, nGreen, nBlue, result;
result = sscanf(colorPtr->id.palette, "%d/%d/%d", &nRed,