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
dfb5602a
Commit
dfb5602a
authored
Apr 23, 2019
by
Ulrich Sibiller
Committed by
Mike Gabriel
May 10, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Font.c: Let dix check if a font path exists
Dix will only add font paths that are existing on the system. There's no need to check that ourselves.
parent
8029141e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
30 deletions
+24
-30
Font.c
nx-X11/programs/Xserver/hw/nxagent/Font.c
+24
-30
No files found.
nx-X11/programs/Xserver/hw/nxagent/Font.c
View file @
dfb5602a
...
@@ -1433,45 +1433,39 @@ static Bool nxagentGetFontServerPath(char * fontServerPath, int size)
...
@@ -1433,45 +1433,39 @@ static Bool nxagentGetFontServerPath(char * fontServerPath, int size)
void
nxagentVerifySingleFontPath
(
char
**
dest
,
const
char
*
fontDir
)
void
nxagentVerifySingleFontPath
(
char
**
dest
,
const
char
*
fontDir
)
{
{
struct
stat
dirStat
;
if
(
!
dest
||
!*
dest
)
if
(
!
dest
||
!*
dest
)
return
;
return
;
if
(
stat
(
fontDir
,
&
dirStat
)
==
0
&&
#ifdef TEST
S_ISDIR
(
dirStat
.
st_mode
)
!=
0
)
fprintf
(
stderr
,
"%s: Assuming fonts in directory [%s].
\n
"
,
__func__
,
{
validateString
(
fontDir
));
#ifdef TEST
#endif
fprintf
(
stderr
,
"%s: Assuming fonts in directory [%s].
\n
"
,
__func__
,
validateString
(
fontDir
));
#endif
for
(
int
i
=
0
;
;
i
++
)
for
(
int
i
=
0
;
;
i
++
)
{
{
char
*
tmppath
=
NULL
;
char
*
tmppath
=
NULL
;
int
rc
;
int
rc
;
const
char
*
subdir
=
nxagentFontSubdirs
[
i
];
const
char
*
subdir
=
nxagentFontSubdirs
[
i
];
if
(
subdir
==
NULL
)
if
(
subdir
==
NULL
)
return
;
return
;
if
(
**
dest
!=
'\0'
)
if
(
**
dest
!=
'\0'
)
{
{
rc
=
asprintf
(
&
tmppath
,
"%s,%s/%s"
,
*
dest
,
fontDir
,
subdir
);
rc
=
asprintf
(
&
tmppath
,
"%s,%s/%s"
,
*
dest
,
fontDir
,
subdir
);
}
}
else
else
{
{
rc
=
asprintf
(
&
tmppath
,
"%s/%s"
,
fontDir
,
subdir
);
rc
=
asprintf
(
&
tmppath
,
"%s/%s"
,
fontDir
,
subdir
);
}
}
if
(
rc
==
-
1
)
if
(
rc
==
-
1
)
return
;
return
;
free
(
*
dest
);
free
(
*
dest
);
*
dest
=
tmppath
;
*
dest
=
tmppath
;
tmppath
=
NULL
;
tmppath
=
NULL
;
}
}
}
}
}
...
...
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