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
2f61c929
Commit
2f61c929
authored
Apr 09, 2020
by
Ulrich Sibiller
Committed by
Mike Gabriel
May 07, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
NXdixfonts.c: some code cleanups
reformat, extend comments, simplify ifdef
parent
2e50ee07
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
18 deletions
+16
-18
NXdixfonts.c
nx-X11/programs/Xserver/hw/nxagent/NXdixfonts.c
+16
-18
No files found.
nx-X11/programs/Xserver/hw/nxagent/NXdixfonts.c
View file @
2f61c929
...
...
@@ -684,16 +684,14 @@ finish:
bail:
if
(
c
->
slept
)
#ifdef NXAGENT_SERVER
{
ClientWakeup
(
client
);
#ifdef NXAGENT_SERVER
#ifdef DEBUG
fprintf
(
stderr
,
" NXdixfonts: doListFont: client [%lx] wakeup.
\n
"
,
client
);
#endif
}
#else
ClientWakeup
(
client
);
#endif
}
for
(
i
=
0
;
i
<
c
->
num_fpes
;
i
++
)
FreeFPE
(
c
->
fpe_list
[
i
]);
free
(
c
->
fpe_list
);
...
...
@@ -1059,7 +1057,7 @@ typedef struct
OFclosurePtr
oc
;
}
nxFs
,
*
nxFsPtr
;
/* this is derived from doListFontsAndAliases */
/* this is derived from doListFontsAndAliases
above
*/
static
Bool
nxdoListFontsAndAliases
(
ClientPtr
client
,
nxFsPtr
fss
)
{
...
...
@@ -1201,20 +1199,20 @@ nxdoListFontsAndAliases(ClientPtr client, nxFsPtr fss)
{
if
(
c
->
savedName
)
{
memcpy
(
tmp
,
c
->
savedName
,
c
->
savedNameLen
>
255
?
255
:
c
->
savedNameLen
);
tmp
[
c
->
savedNameLen
>
255
?
255
:
c
->
savedNameLen
]
=
0
;
memcpy
(
tmp
,
c
->
savedName
,
c
->
savedNameLen
>
255
?
255
:
c
->
savedNameLen
);
tmp
[
c
->
savedNameLen
>
255
?
255
:
c
->
savedNameLen
]
=
0
;
if
(
nxagentFontLookUp
(
tmp
))
break
;
else
tmp
[
0
]
=
0
;
else
tmp
[
0
]
=
0
;
}
}
else
{
memcpy
(
tmp
,
name
,
namelen
>
255
?
255
:
namelen
);
tmp
[
namelen
>
255
?
255
:
namelen
]
=
0
;
memcpy
(
tmp
,
name
,
namelen
>
255
?
255
:
namelen
);
tmp
[
namelen
>
255
?
255
:
namelen
]
=
0
;
if
(
nxagentFontLookUp
(
tmp
))
break
;
else
tmp
[
0
]
=
0
;
else
tmp
[
0
]
=
0
;
}
}
...
...
@@ -1308,14 +1306,13 @@ finish:
if
(
strlen
(
tmp
))
{
#ifdef NXAGENT_FONTMATCH_DEBUG
fprintf
(
stderr
,
"nxListFont changed (0) font to %s
\n
"
,
tmp
);
fprintf
(
stderr
,
"nxListFont changed (0) font to %s
\n
"
,
tmp
);
#endif
memcpy
(
oc
->
fontname
,
tmp
,
strlen
(
tmp
));
oc
->
fnamelen
=
strlen
(
tmp
);
oc
->
origFontName
=
oc
->
fontname
;
oc
->
origFontNameLen
=
oc
->
fnamelen
;
}
else
{
...
...
@@ -1367,13 +1364,13 @@ finish:
}
/* this is derived from OpenFont() */
/* this is derived from
dix/dixfonts.c:
OpenFont() */
int
nxOpenFont
(
ClientPtr
client
,
XID
fid
,
Mask
flags
,
unsigned
lenfname
,
char
*
pfontname
)
{
nxFsPtr
fss
;
LFclosurePtr
c
;
OFclosurePtr
oc
;
nxFsPtr
fss
;
/* NX Font Struct Ptr */
LFclosurePtr
c
;
/* ListFont closure Ptr */
OFclosurePtr
oc
;
/* OpenFont closure Ptr */
int
i
;
FontPtr
cached
=
(
FontPtr
)
0
;
...
...
@@ -1428,7 +1425,8 @@ nxOpenFont(ClientPtr client, XID fid, Mask flags, unsigned lenfname, char *pfont
free
(
fss
);
return
BadAlloc
;
}
c
->
fpe_list
=
(
FontPathElementPtr
*
)
c
->
fpe_list
=
(
FontPathElementPtr
*
)
malloc
(
sizeof
(
FontPathElementPtr
)
*
num_fpes
);
if
(
!
c
->
fpe_list
)
{
free
(
c
);
...
...
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