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
91cef61a
Commit
91cef61a
authored
Dec 31, 2020
by
Ulrich Sibiller
Committed by
Mike Gabriel
Jan 15, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Font.c: Use Booleans where appropriate
parent
0bca321f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
16 deletions
+16
-16
Font.c
nx-X11/programs/Xserver/hw/nxagent/Font.c
+16
-16
No files found.
nx-X11/programs/Xserver/hw/nxagent/Font.c
View file @
91cef61a
...
...
@@ -102,7 +102,7 @@ static XFontStruct *nxagentLoadBestQueryFont(Display* dpy, char *fontName, FontP
static
XFontStruct
*
nxagentLoadQueryFont
(
register
Display
*
dpy
,
char
*
fontName
,
FontPtr
pFont
);
int
nxagentFreeFont
(
XFontStruct
*
fs
);
static
Bool
nxagentGetFontServerPath
(
char
*
fontServerPath
,
int
size
);
static
char
*
nxagentMakeScalableFontName
(
const
char
*
fontName
,
int
scalableResolution
);
static
char
*
nxagentMakeScalableFontName
(
const
char
*
fontName
,
Bool
scalableResolution
);
RESTYPE
RT_NX_FONT
;
...
...
@@ -414,10 +414,10 @@ Bool nxagentFontLookUp(const char *name)
if
(
name
&&
strlen
(
name
)
==
0
)
{
return
0
;
return
False
;
}
int
result
=
nxagentFontFind
(
name
,
&
i
);
Bool
result
=
nxagentFontFind
(
name
,
&
i
);
char
*
scalable
=
NULL
;
...
...
@@ -425,9 +425,9 @@ Bool nxagentFontLookUp(const char *name)
* Let's try with the scalable font description.
*/
if
(
result
==
0
)
if
(
!
result
)
{
if
((
scalable
=
nxagentMakeScalableFontName
(
name
,
0
))
!=
NULL
)
if
((
scalable
=
nxagentMakeScalableFontName
(
name
,
False
))
!=
NULL
)
{
result
=
nxagentFontFind
(
scalable
,
&
i
);
...
...
@@ -439,9 +439,9 @@ Bool nxagentFontLookUp(const char *name)
* Let's try again after replacing zero to xdpi and ydpi in the pattern.
*/
if
(
result
==
0
)
if
(
!
result
)
{
if
((
scalable
=
nxagentMakeScalableFontName
(
name
,
1
))
!=
NULL
)
if
((
scalable
=
nxagentMakeScalableFontName
(
name
,
True
))
!=
NULL
)
{
result
=
nxagentFontFind
(
scalable
,
&
i
);
...
...
@@ -449,9 +449,9 @@ Bool nxagentFontLookUp(const char *name)
}
}
if
(
result
==
0
)
if
(
!
result
)
{
return
0
;
return
False
;
}
else
{
...
...
@@ -612,7 +612,7 @@ Bool nxagentRealizeFont(ScreenPtr pScreen, FontPtr pFont)
if
(
nxagentFontPriv
(
pFont
)
->
font_struct
==
NULL
)
{
if
(
nxagentFontLookUp
(
name
)
==
False
)
if
(
!
nxagentFontLookUp
(
name
)
)
{
fprintf
(
stderr
,
"Font: nxagentRealizeFont failed with font Font=%s, not in our remote list
\n
"
,
validateString
(
name
));
...
...
@@ -1532,7 +1532,7 @@ XFontStruct* nxagentLoadQueryFont(register Display *dpy, char *name, FontPtr pFo
fprintf
(
stderr
,
"nxagentLoadQueryFont: Looking for font '%s'.
\n
"
,
name
);
#endif
if
(
nxagentFontLookUp
(
name
)
==
0
)
if
(
!
nxagentFontLookUp
(
name
)
)
{
#ifdef DEBUG
fprintf
(
stderr
,
"nxagentLoadQueryFont: WARNING! Font not found '%s'.
\n
"
,
name
);
...
...
@@ -1630,7 +1630,7 @@ int nxagentSplitString(char *string, char *fields[], int nfields, char *sep)
char
*
current
=
string
;
int
i
=
0
;
int
last
=
0
;
Bool
last
=
False
;
for
(;;)
{
...
...
@@ -1644,7 +1644,7 @@ int nxagentSplitString(char *string, char *fields[], int nfields, char *sep)
if
(
next
==
NULL
)
{
next
=
string
+
len
;
last
=
1
;
last
=
True
;
}
int
fieldlen
=
next
-
current
;
...
...
@@ -1662,7 +1662,7 @@ int nxagentSplitString(char *string, char *fields[], int nfields, char *sep)
i
++
;
if
(
last
==
1
)
if
(
last
)
{
break
;
}
...
...
@@ -1671,7 +1671,7 @@ int nxagentSplitString(char *string, char *fields[], int nfields, char *sep)
return
i
;
}
char
*
nxagentMakeScalableFontName
(
const
char
*
fontName
,
int
scalableResolution
)
char
*
nxagentMakeScalableFontName
(
const
char
*
fontName
,
Bool
scalableResolution
)
{
char
*
scalableFontName
;
...
...
@@ -1710,7 +1710,7 @@ char *nxagentMakeScalableFontName(const char *fontName, int scalableResolution)
strcat
(
scalableFontName
,
"-0"
);
}
else
if
(
scalableResolution
==
1
&&
(
field
==
8
||
field
==
9
))
else
if
(
scalableResolution
&&
(
field
==
8
||
field
==
9
))
{
/*
* RESOLUTION_X || RESOLUTION_Y
...
...
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