aboutsummaryrefslogtreecommitdiff
path: root/nx-X11
diff options
context:
space:
mode:
authorUlrich Sibiller <uli42@gmx.de>2020-12-31 00:36:20 +0100
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2021-01-15 16:26:31 +0100
commit2ce0fa8f07bf297dd063c5665a6ebaf6bb37ab13 (patch)
tree18de6e9150706541152ca569b6591bcc8c104e81 /nx-X11
parent3151736d326a5ff5e54b2e08ca16c210f504207c (diff)
downloadnx-libs-2ce0fa8f07bf297dd063c5665a6ebaf6bb37ab13.tar.gz
nx-libs-2ce0fa8f07bf297dd063c5665a6ebaf6bb37ab13.tar.bz2
nx-libs-2ce0fa8f07bf297dd063c5665a6ebaf6bb37ab13.zip
GC.c: make internal variable and function Boolean
Diffstat (limited to 'nx-X11')
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/GC.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/GC.c b/nx-X11/programs/Xserver/hw/nxagent/GC.c
index d39f743e6..2aa404910 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/GC.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/GC.c
@@ -86,7 +86,7 @@ GCPtr nxagentCreateGraphicContext(int depth);
static void nxagentReconnectGC(void*, XID, void*);
static void nxagentReconnectClip(GCPtr, int, void *, int);
-static int nxagentCompareRegions(RegionPtr, RegionPtr);
+static Bool nxagentCompareRegions(RegionPtr, RegionPtr);
struct nxagentGCRec
{
@@ -497,7 +497,7 @@ void nxagentDestroyGC(GCPtr pGC)
void nxagentChangeClip(GCPtr pGC, int type, void * pValue, int nRects)
{
- int clipsMatch = 0;
+ Bool clipsMatch = False;
#ifdef TEST
fprintf(stderr, "nxagentChangeClip: Going to change clip on GC [%p]\n",
@@ -528,7 +528,7 @@ void nxagentChangeClip(GCPtr pGC, int type, void * pValue, int nRects)
}
default:
{
- clipsMatch = 0;
+ clipsMatch = False;
break;
}
}
@@ -544,7 +544,7 @@ void nxagentChangeClip(GCPtr pGC, int type, void * pValue, int nRects)
{
case CT_NONE:
{
- if (clipsMatch == 0 && !nxagentGCTrap)
+ if (!clipsMatch && !nxagentGCTrap)
{
XSetClipMask(nxagentDisplay, nxagentGC(pGC), None);
}
@@ -552,7 +552,7 @@ void nxagentChangeClip(GCPtr pGC, int type, void * pValue, int nRects)
}
case CT_REGION:
{
- if (clipsMatch == 0 && !nxagentGCTrap)
+ if (!clipsMatch && !nxagentGCTrap)
{
XRectangle *pRects;
nRects = RegionNumRects((RegionPtr)pValue);
@@ -594,7 +594,7 @@ void nxagentChangeClip(GCPtr pGC, int type, void * pValue, int nRects)
}
case CT_UNSORTED:
{
- if (clipsMatch == 0 && !nxagentGCTrap)
+ if (!clipsMatch && !nxagentGCTrap)
{
XSetClipRectangles(nxagentDisplay, nxagentGC(pGC),
pGC->clipOrg.x, pGC->clipOrg.y,
@@ -604,7 +604,7 @@ void nxagentChangeClip(GCPtr pGC, int type, void * pValue, int nRects)
}
case CT_YSORTED:
{
- if (clipsMatch == 0 && !nxagentGCTrap)
+ if (!clipsMatch && !nxagentGCTrap)
{
XSetClipRectangles(nxagentDisplay, nxagentGC(pGC),
pGC->clipOrg.x, pGC->clipOrg.y,
@@ -614,7 +614,7 @@ void nxagentChangeClip(GCPtr pGC, int type, void * pValue, int nRects)
}
case CT_YXSORTED:
{
- if (clipsMatch == 0 && !nxagentGCTrap)
+ if (!clipsMatch && !nxagentGCTrap)
{
XSetClipRectangles(nxagentDisplay, nxagentGC(pGC),
pGC->clipOrg.x, pGC->clipOrg.y,
@@ -624,7 +624,7 @@ void nxagentChangeClip(GCPtr pGC, int type, void * pValue, int nRects)
}
case CT_YXBANDED:
{
- if (clipsMatch == 0 && !nxagentGCTrap)
+ if (!clipsMatch && !nxagentGCTrap)
{
XSetClipRectangles(nxagentDisplay, nxagentGC(pGC),
pGC->clipOrg.x, pGC->clipOrg.y,
@@ -1209,29 +1209,29 @@ static void nxagentReconnectClip(GCPtr pGC, int type, void * pValue, int nRects)
nxagentGCPriv(pGC)->nClipRects = nRects;
}
-static int nxagentCompareRegions(RegionPtr r1, RegionPtr r2)
+static Bool nxagentCompareRegions(RegionPtr r1, RegionPtr r2)
{
/*
- * It returns 1 if regions are equal, 0 otherwise
+ * It returns True if regions are equal, False otherwise
*/
if (r1 == NULL && r2 == NULL)
{
- return 1;
+ return True;
}
if ((r1 == NULL) || (r2 == NULL))
{
- return 0;
+ return False;
}
if (RegionNumRects(r1) != RegionNumRects(r2))
{
- return 0;
+ return False;
}
else if (RegionNumRects(r1) == 0)
{
- return 1;
+ return True;
}
else if ((*RegionExtents(r1)).x1 != (*RegionExtents(r2)).x1) return 0;
else if ((*RegionExtents(r1)).x2 != (*RegionExtents(r2)).x2) return 0;
@@ -1247,7 +1247,7 @@ static int nxagentCompareRegions(RegionPtr r1, RegionPtr r2)
else if (RegionRects(r1)[i].y2 != RegionRects(r2)[i].y2) return 0;
}
}
- return 1;
+ return True;
}
/*