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
8205db42
Commit
8205db42
authored
Jun 19, 2019
by
Ulrich Sibiller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Font.c: code simplifications
parent
cb508b26
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
20 deletions
+9
-20
Font.c
nx-X11/programs/Xserver/hw/nxagent/Font.c
+9
-20
No files found.
nx-X11/programs/Xserver/hw/nxagent/Font.c
View file @
8205db42
...
@@ -369,18 +369,16 @@ static void nxagentFreeRemoteFontList(nxagentFontList *listRec)
...
@@ -369,18 +369,16 @@ static void nxagentFreeRemoteFontList(nxagentFontList *listRec)
Bool
nxagentFontFind
(
const
char
*
name
,
int
*
pos
)
Bool
nxagentFontFind
(
const
char
*
name
,
int
*
pos
)
{
{
int
low
,
high
,
res
,
iter
,
lpos
;
if
(
!
nxagentRemoteFontList
.
length
)
if
(
!
nxagentRemoteFontList
.
length
)
{
{
*
pos
=
0
;
*
pos
=
0
;
return
False
;
return
False
;
}
}
low
=
0
;
int
low
=
0
;
high
=
nxagentRemoteFontList
.
length
-
1
;
int
high
=
nxagentRemoteFontList
.
length
-
1
;
iter
=
0
;
i
nt
i
ter
=
0
;
res
=
1
;
int
res
=
1
;
lpos
=
nxagentRemoteFontList
.
length
;
int
lpos
=
nxagentRemoteFontList
.
length
;
while
(
low
<=
high
)
while
(
low
<=
high
)
{
{
*
pos
=
(
high
+
low
)
/
2
;
*
pos
=
(
high
+
low
)
/
2
;
...
@@ -416,18 +414,15 @@ Bool nxagentFontFind(const char *name, int *pos)
...
@@ -416,18 +414,15 @@ Bool nxagentFontFind(const char *name, int *pos)
Bool
nxagentFontLookUp
(
const
char
*
name
)
Bool
nxagentFontLookUp
(
const
char
*
name
)
{
{
int
i
;
int
i
;
int
result
;
char
*
scalable
;
if
(
name
!=
NULL
&&
strlen
(
name
)
==
0
)
if
(
name
!=
NULL
&&
strlen
(
name
)
==
0
)
{
{
return
0
;
return
0
;
}
}
result
=
nxagentFontFind
(
name
,
&
i
);
int
result
=
nxagentFontFind
(
name
,
&
i
);
scalable
=
NULL
;
char
*
scalable
=
NULL
;
/*
/*
* Let's try with the scalable font description.
* Let's try with the scalable font description.
...
@@ -435,9 +430,7 @@ Bool nxagentFontLookUp(const char *name)
...
@@ -435,9 +430,7 @@ Bool nxagentFontLookUp(const char *name)
if
(
result
==
0
)
if
(
result
==
0
)
{
{
scalable
=
nxagentMakeScalableFontName
(
name
,
0
);
if
((
scalable
=
nxagentMakeScalableFontName
(
name
,
0
))
!=
NULL
)
if
(
scalable
!=
NULL
)
{
{
result
=
nxagentFontFind
(
scalable
,
&
i
);
result
=
nxagentFontFind
(
scalable
,
&
i
);
...
@@ -451,9 +444,7 @@ Bool nxagentFontLookUp(const char *name)
...
@@ -451,9 +444,7 @@ Bool nxagentFontLookUp(const char *name)
if
(
result
==
0
)
if
(
result
==
0
)
{
{
scalable
=
nxagentMakeScalableFontName
(
name
,
1
);
if
((
scalable
=
nxagentMakeScalableFontName
(
name
,
1
))
!=
NULL
)
if
(
scalable
!=
NULL
)
{
{
result
=
nxagentFontFind
(
scalable
,
&
i
);
result
=
nxagentFontFind
(
scalable
,
&
i
);
...
@@ -888,7 +879,6 @@ static void nxagentFontDisconnect(FontPtr pFont, XID param1, void * param2)
...
@@ -888,7 +879,6 @@ static void nxagentFontDisconnect(FontPtr pFont, XID param1, void * param2)
static
void
nxagentCollectFailedFont
(
FontPtr
fpt
,
XID
id
)
static
void
nxagentCollectFailedFont
(
FontPtr
fpt
,
XID
id
)
{
{
if
(
nxagentFailedToReconnectFonts
.
font
==
NULL
)
if
(
nxagentFailedToReconnectFonts
.
font
==
NULL
)
{
{
nxagentFailedToReconnectFonts
.
size
=
8
;
nxagentFailedToReconnectFonts
.
size
=
8
;
...
@@ -1632,7 +1622,6 @@ XFontStruct* nxagentLoadQueryFont(register Display *dpy, char *name, FontPtr pFo
...
@@ -1632,7 +1622,6 @@ XFontStruct* nxagentLoadQueryFont(register Display *dpy, char *name, FontPtr pFo
int
nxagentFreeFont
(
XFontStruct
*
fs
)
int
nxagentFreeFont
(
XFontStruct
*
fs
)
{
{
if
(
fs
->
per_char
)
if
(
fs
->
per_char
)
{
{
#ifdef USE_XF86BIGFONT
#ifdef USE_XF86BIGFONT
...
...
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