Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nx-libs
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
dimbor
nx-libs
Commits
15cf1eee
You need to sign in or sign up before continuing.
Commit
15cf1eee
authored
Dec 31, 2020
by
Ulrich Sibiller
Committed by
Mike Gabriel
Jan 15, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
GC.c: make internal variable and function Boolean
parent
e8a5e328
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
16 deletions
+16
-16
GC.c
nx-X11/programs/Xserver/hw/nxagent/GC.c
+16
-16
No files found.
nx-X11/programs/Xserver/hw/nxagent/GC.c
View file @
15cf1eee
...
@@ -86,7 +86,7 @@ GCPtr nxagentCreateGraphicContext(int depth);
...
@@ -86,7 +86,7 @@ GCPtr nxagentCreateGraphicContext(int depth);
static
void
nxagentReconnectGC
(
void
*
,
XID
,
void
*
);
static
void
nxagentReconnectGC
(
void
*
,
XID
,
void
*
);
static
void
nxagentReconnectClip
(
GCPtr
,
int
,
void
*
,
int
);
static
void
nxagentReconnectClip
(
GCPtr
,
int
,
void
*
,
int
);
static
int
nxagentCompareRegions
(
RegionPtr
,
RegionPtr
);
static
Bool
nxagentCompareRegions
(
RegionPtr
,
RegionPtr
);
struct
nxagentGCRec
struct
nxagentGCRec
{
{
...
@@ -497,7 +497,7 @@ void nxagentDestroyGC(GCPtr pGC)
...
@@ -497,7 +497,7 @@ void nxagentDestroyGC(GCPtr pGC)
void
nxagentChangeClip
(
GCPtr
pGC
,
int
type
,
void
*
pValue
,
int
nRects
)
void
nxagentChangeClip
(
GCPtr
pGC
,
int
type
,
void
*
pValue
,
int
nRects
)
{
{
int
clipsMatch
=
0
;
Bool
clipsMatch
=
False
;
#ifdef TEST
#ifdef TEST
fprintf
(
stderr
,
"nxagentChangeClip: Going to change clip on GC [%p]
\n
"
,
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)
...
@@ -528,7 +528,7 @@ void nxagentChangeClip(GCPtr pGC, int type, void * pValue, int nRects)
}
}
default:
default:
{
{
clipsMatch
=
0
;
clipsMatch
=
False
;
break
;
break
;
}
}
}
}
...
@@ -544,7 +544,7 @@ void nxagentChangeClip(GCPtr pGC, int type, void * pValue, int nRects)
...
@@ -544,7 +544,7 @@ void nxagentChangeClip(GCPtr pGC, int type, void * pValue, int nRects)
{
{
case
CT_NONE
:
case
CT_NONE
:
{
{
if
(
clipsMatch
==
0
&&
!
nxagentGCTrap
)
if
(
!
clipsMatch
&&
!
nxagentGCTrap
)
{
{
XSetClipMask
(
nxagentDisplay
,
nxagentGC
(
pGC
),
None
);
XSetClipMask
(
nxagentDisplay
,
nxagentGC
(
pGC
),
None
);
}
}
...
@@ -552,7 +552,7 @@ void nxagentChangeClip(GCPtr pGC, int type, void * pValue, int nRects)
...
@@ -552,7 +552,7 @@ void nxagentChangeClip(GCPtr pGC, int type, void * pValue, int nRects)
}
}
case
CT_REGION
:
case
CT_REGION
:
{
{
if
(
clipsMatch
==
0
&&
!
nxagentGCTrap
)
if
(
!
clipsMatch
&&
!
nxagentGCTrap
)
{
{
XRectangle
*
pRects
;
XRectangle
*
pRects
;
nRects
=
RegionNumRects
((
RegionPtr
)
pValue
);
nRects
=
RegionNumRects
((
RegionPtr
)
pValue
);
...
@@ -594,7 +594,7 @@ void nxagentChangeClip(GCPtr pGC, int type, void * pValue, int nRects)
...
@@ -594,7 +594,7 @@ void nxagentChangeClip(GCPtr pGC, int type, void * pValue, int nRects)
}
}
case
CT_UNSORTED
:
case
CT_UNSORTED
:
{
{
if
(
clipsMatch
==
0
&&
!
nxagentGCTrap
)
if
(
!
clipsMatch
&&
!
nxagentGCTrap
)
{
{
XSetClipRectangles
(
nxagentDisplay
,
nxagentGC
(
pGC
),
XSetClipRectangles
(
nxagentDisplay
,
nxagentGC
(
pGC
),
pGC
->
clipOrg
.
x
,
pGC
->
clipOrg
.
y
,
pGC
->
clipOrg
.
x
,
pGC
->
clipOrg
.
y
,
...
@@ -604,7 +604,7 @@ void nxagentChangeClip(GCPtr pGC, int type, void * pValue, int nRects)
...
@@ -604,7 +604,7 @@ void nxagentChangeClip(GCPtr pGC, int type, void * pValue, int nRects)
}
}
case
CT_YSORTED
:
case
CT_YSORTED
:
{
{
if
(
clipsMatch
==
0
&&
!
nxagentGCTrap
)
if
(
!
clipsMatch
&&
!
nxagentGCTrap
)
{
{
XSetClipRectangles
(
nxagentDisplay
,
nxagentGC
(
pGC
),
XSetClipRectangles
(
nxagentDisplay
,
nxagentGC
(
pGC
),
pGC
->
clipOrg
.
x
,
pGC
->
clipOrg
.
y
,
pGC
->
clipOrg
.
x
,
pGC
->
clipOrg
.
y
,
...
@@ -614,7 +614,7 @@ void nxagentChangeClip(GCPtr pGC, int type, void * pValue, int nRects)
...
@@ -614,7 +614,7 @@ void nxagentChangeClip(GCPtr pGC, int type, void * pValue, int nRects)
}
}
case
CT_YXSORTED
:
case
CT_YXSORTED
:
{
{
if
(
clipsMatch
==
0
&&
!
nxagentGCTrap
)
if
(
!
clipsMatch
&&
!
nxagentGCTrap
)
{
{
XSetClipRectangles
(
nxagentDisplay
,
nxagentGC
(
pGC
),
XSetClipRectangles
(
nxagentDisplay
,
nxagentGC
(
pGC
),
pGC
->
clipOrg
.
x
,
pGC
->
clipOrg
.
y
,
pGC
->
clipOrg
.
x
,
pGC
->
clipOrg
.
y
,
...
@@ -624,7 +624,7 @@ void nxagentChangeClip(GCPtr pGC, int type, void * pValue, int nRects)
...
@@ -624,7 +624,7 @@ void nxagentChangeClip(GCPtr pGC, int type, void * pValue, int nRects)
}
}
case
CT_YXBANDED
:
case
CT_YXBANDED
:
{
{
if
(
clipsMatch
==
0
&&
!
nxagentGCTrap
)
if
(
!
clipsMatch
&&
!
nxagentGCTrap
)
{
{
XSetClipRectangles
(
nxagentDisplay
,
nxagentGC
(
pGC
),
XSetClipRectangles
(
nxagentDisplay
,
nxagentGC
(
pGC
),
pGC
->
clipOrg
.
x
,
pGC
->
clipOrg
.
y
,
pGC
->
clipOrg
.
x
,
pGC
->
clipOrg
.
y
,
...
@@ -1209,29 +1209,29 @@ static void nxagentReconnectClip(GCPtr pGC, int type, void * pValue, int nRects)
...
@@ -1209,29 +1209,29 @@ static void nxagentReconnectClip(GCPtr pGC, int type, void * pValue, int nRects)
nxagentGCPriv
(
pGC
)
->
nClipRects
=
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
)
if
(
r1
==
NULL
&&
r2
==
NULL
)
{
{
return
1
;
return
True
;
}
}
if
((
r1
==
NULL
)
||
(
r2
==
NULL
))
if
((
r1
==
NULL
)
||
(
r2
==
NULL
))
{
{
return
0
;
return
False
;
}
}
if
(
RegionNumRects
(
r1
)
!=
RegionNumRects
(
r2
))
if
(
RegionNumRects
(
r1
)
!=
RegionNumRects
(
r2
))
{
{
return
0
;
return
False
;
}
}
else
if
(
RegionNumRects
(
r1
)
==
0
)
else
if
(
RegionNumRects
(
r1
)
==
0
)
{
{
return
1
;
return
True
;
}
}
else
if
((
*
RegionExtents
(
r1
)).
x1
!=
(
*
RegionExtents
(
r2
)).
x1
)
return
0
;
else
if
((
*
RegionExtents
(
r1
)).
x1
!=
(
*
RegionExtents
(
r2
)).
x1
)
return
0
;
else
if
((
*
RegionExtents
(
r1
)).
x2
!=
(
*
RegionExtents
(
r2
)).
x2
)
return
0
;
else
if
((
*
RegionExtents
(
r1
)).
x2
!=
(
*
RegionExtents
(
r2
)).
x2
)
return
0
;
...
@@ -1247,7 +1247,7 @@ static int nxagentCompareRegions(RegionPtr r1, RegionPtr r2)
...
@@ -1247,7 +1247,7 @@ static int nxagentCompareRegions(RegionPtr r1, RegionPtr r2)
else
if
(
RegionRects
(
r1
)[
i
].
y2
!=
RegionRects
(
r2
)[
i
].
y2
)
return
0
;
else
if
(
RegionRects
(
r1
)[
i
].
y2
!=
RegionRects
(
r2
)[
i
].
y2
)
return
0
;
}
}
}
}
return
1
;
return
True
;
}
}
/*
/*
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment