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
a8a69381
You need to sign in or sign up before continuing.
Commit
a8a69381
authored
Jan 02, 2018
by
Ulrich Sibiller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Font.c: pass down size
parent
19a3918a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
6 deletions
+5
-6
Font.c
nx-X11/programs/Xserver/hw/nxagent/Font.c
+5
-6
No files found.
nx-X11/programs/Xserver/hw/nxagent/Font.c
View file @
a8a69381
...
...
@@ -109,7 +109,7 @@ static void nxagentFontReconnect(FontPtr, XID, void *);
static
XFontStruct
*
nxagentLoadBestQueryFont
(
Display
*
dpy
,
char
*
fontName
,
FontPtr
pFont
);
static
XFontStruct
*
nxagentLoadQueryFont
(
register
Display
*
dpy
,
char
*
fontName
,
FontPtr
pFont
);
int
nxagentFreeFont
(
XFontStruct
*
fs
);
static
Bool
nxagentGetFontServerPath
(
char
*
fontServerPath
);
static
Bool
nxagentGetFontServerPath
(
char
*
fontServerPath
,
int
size
);
static
char
*
nxagentMakeScalableFontName
(
const
char
*
fontName
,
int
scalableResolution
);
...
...
@@ -1283,7 +1283,7 @@ Bool nxagentReconnectFailedFonts(void *p0)
fprintf
(
stderr
,
"nxagentReconnectFailedFonts:
\n
"
);
#endif
if
(
nxagentGetFontServerPath
(
fontServerPath
)
==
False
)
if
(
nxagentGetFontServerPath
(
fontServerPath
,
sizeof
(
fontServerPath
)
)
==
False
)
{
#ifdef WARNING
fprintf
(
stderr
,
"nxagentReconnectFailedFonts: WARNING! "
...
...
@@ -1404,19 +1404,18 @@ Bool nxagentDisconnectAllFonts()
return
True
;
}
static
Bool
nxagentGetFontServerPath
(
char
*
fontServerPath
)
static
Bool
nxagentGetFontServerPath
(
char
*
fontServerPath
,
int
size
)
{
/* ensure path is no longer than fontServerPath */
char
path
[
256
]
=
{
0
};
if
(
NXGetFontParameters
(
nxagentDisplay
,
sizeof
(
path
),
path
)
==
True
)
{
/* the length is stored in the first byte and is therefore limited to 255 */
unsigned
int
len
=
*
path
;
if
(
len
)
{
strncpy
(
fontServerPath
,
path
+
1
,
len
);
fontServerPath
[
len
]
=
'\0'
;
snprintf
(
fontServerPath
,
MIN
(
size
,
len
+
1
),
"%s"
,
path
+
1
);
#ifdef TEST
fprintf
(
stderr
,
"nxagentGetFontServerPath: Got path [%s].
\n
"
,
...
...
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