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
c135bbcf
Commit
c135bbcf
authored
Jan 19, 2020
by
Ulrich Sibiller
Committed by
Mike Gabriel
May 07, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
NXdixfonts.c: call dix version of SetDefaultFontPath
parent
8199ec31
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
73 deletions
+6
-73
dixfonts.c
nx-X11/programs/Xserver/dix/dixfonts.c
+4
-2
NXdixfonts.c
nx-X11/programs/Xserver/hw/nxagent/NXdixfonts.c
+2
-71
No files found.
nx-X11/programs/Xserver/dix/dixfonts.c
View file @
c135bbcf
...
...
@@ -1958,9 +1958,12 @@ SetFontPath(ClientPtr client, int npaths, unsigned char *paths)
return
err
;
}
#ifndef NXAGENT_SERVER
int
#ifdef NXAGENT_SERVER
xorg_SetDefaultFontPath
(
char
*
path
)
#else
SetDefaultFontPath
(
char
*
path
)
#endif
{
char
*
temp_path
,
*
start
,
...
...
@@ -2027,7 +2030,6 @@ SetDefaultFontPath(char *path)
return
err
;
}
#endif
/* NXAGENT_SERVER */
unsigned
char
*
GetFontPath
(
int
*
count
,
int
*
length
)
...
...
nx-X11/programs/Xserver/hw/nxagent/NXdixfonts.c
View file @
c135bbcf
...
...
@@ -99,7 +99,7 @@ char _NXFontPath[NXFONTPATHLENGTH];
* the NX_FONT environment.
*/
static
c
onst
c
har
*
_NXGetFontPath
(
const
char
*
path
)
static
char
*
_NXGetFontPath
(
const
char
*
path
)
{
/*
* Check the environment only once.
...
...
@@ -982,78 +982,9 @@ bail:
int
SetDefaultFontPath
(
char
*
path
)
{
char
*
temp_path
,
*
start
,
*
end
;
unsigned
char
*
cp
,
*
pp
,
*
nump
,
*
newpath
;
int
num
=
1
,
len
,
err
,
size
=
0
,
bad
;
#ifdef NXAGENT_SERVER
path
=
(
char
*
)
_NXGetFontPath
(
path
);
#endif
/* NXAGENT_SERVER */
start
=
path
;
/* ensure temp_path contains "built-ins" */
while
(
1
)
{
start
=
strstr
(
start
,
"built-ins"
);
if
(
start
==
NULL
)
break
;
end
=
start
+
strlen
(
"built-ins"
);
if
((
start
==
path
||
start
[
-
1
]
==
','
)
&&
(
!*
end
||
*
end
==
','
))
break
;
start
=
end
;
}
if
(
!
start
)
{
if
(
asprintf
(
&
temp_path
,
"%s%sbuilt-ins"
,
path
,
*
path
?
","
:
""
)
==
-
1
)
temp_path
=
NULL
;
}
else
{
temp_path
=
strdup
(
path
);
}
if
(
!
temp_path
)
return
BadAlloc
;
/* get enough for string, plus values -- use up commas */
len
=
strlen
(
temp_path
)
+
1
;
nump
=
cp
=
newpath
=
(
unsigned
char
*
)
malloc
(
len
);
if
(
!
newpath
)
{
free
(
temp_path
);
return
BadAlloc
;
}
pp
=
(
unsigned
char
*
)
temp_path
;
cp
++
;
while
(
*
pp
)
{
if
(
*
pp
==
','
)
{
*
nump
=
(
unsigned
char
)
size
;
nump
=
cp
++
;
pp
++
;
num
++
;
size
=
0
;
}
else
{
*
cp
++
=
*
pp
++
;
size
++
;
}
}
*
nump
=
(
unsigned
char
)
size
;
err
=
SetFontPathElements
(
num
,
newpath
,
&
bad
,
TRUE
);
free
(
newpath
);
free
(
temp_path
);
return
err
;
return
xorg_SetDefaultFontPath
(
_NXGetFontPath
(
path
));
}
typedef
struct
{
LFclosurePtr
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