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
4d3bd06c
Commit
4d3bd06c
authored
Aug 01, 2019
by
Ulrich Sibiller
Committed by
Mike Gabriel
Sep 29, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
NXdixfonts.c: use NXAGENT_SERVER instead of NX_TRANS_SOCK
that macro fits better here since there's no transport specific code.
parent
b1850beb
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
15 deletions
+7
-15
NXdixfonts.c
nx-X11/programs/Xserver/hw/nxagent/NXdixfonts.c
+7
-15
No files found.
nx-X11/programs/Xserver/hw/nxagent/NXdixfonts.c
View file @
4d3bd06c
...
@@ -88,13 +88,7 @@ static Bool doListFontsAndAliases(ClientPtr client, LFclosurePtr c);
...
@@ -88,13 +88,7 @@ static Bool doListFontsAndAliases(ClientPtr client, LFclosurePtr c);
#include "Agent.h"
#include "Agent.h"
#include "Font.h"
#include "Font.h"
#ifndef NX_TRANS_SOCKET
#ifdef NXAGENT_SERVER
#define NX_TRANS_SOCKET
#endif
#ifdef NX_TRANS_SOCKET
#define NXFONTPATHLENGTH 1024
#define NXFONTPATHLENGTH 1024
char
_NXFontPath
[
NXFONTPATHLENGTH
];
char
_NXFontPath
[
NXFONTPATHLENGTH
];
...
@@ -107,8 +101,6 @@ char _NXFontPath[NXFONTPATHLENGTH];
...
@@ -107,8 +101,6 @@ char _NXFontPath[NXFONTPATHLENGTH];
static
const
char
*
_NXGetFontPath
(
const
char
*
path
)
static
const
char
*
_NXGetFontPath
(
const
char
*
path
)
{
{
const
char
*
fontEnv
;
/*
/*
* Check the environment only once.
* Check the environment only once.
*/
*/
...
@@ -118,13 +110,13 @@ static const char *_NXGetFontPath(const char *path)
...
@@ -118,13 +110,13 @@ static const char *_NXGetFontPath(const char *path)
return
_NXFontPath
;
return
_NXFontPath
;
}
}
fontEnv
=
getenv
(
"NX_FONT"
);
const
char
*
fontEnv
=
getenv
(
"NX_FONT"
);
if
(
fontEnv
!=
NULL
&&
*
fontEnv
!=
'\0'
)
if
(
fontEnv
!=
NULL
&&
*
fontEnv
!=
'\0'
)
{
{
if
(
strlen
(
fontEnv
)
+
1
>
NXFONTPATHLENGTH
)
if
(
strlen
(
fontEnv
)
+
1
>
NXFONTPATHLENGTH
)
{
{
#ifdef
NX_TRANS_
TEST
#ifdef TEST
fprintf
(
stderr
,
"_NXGetFontPath: WARNING! Maximum length of font path exceeded.
\n
"
);
fprintf
(
stderr
,
"_NXGetFontPath: WARNING! Maximum length of font path exceeded.
\n
"
);
#endif
#endif
goto
_NXGetFontPathError
;
goto
_NXGetFontPathError
;
...
@@ -132,7 +124,7 @@ static const char *_NXGetFontPath(const char *path)
...
@@ -132,7 +124,7 @@ static const char *_NXGetFontPath(const char *path)
snprintf
(
_NXFontPath
,
NXFONTPATHLENGTH
,
"%s"
,
fontEnv
);
snprintf
(
_NXFontPath
,
NXFONTPATHLENGTH
,
"%s"
,
fontEnv
);
#ifdef
NX_TRANS_
TEST
#ifdef TEST
fprintf
(
stderr
,
"_NXGetFontPath: Using NX font path [%s].
\n
"
,
_NXFontPath
);
fprintf
(
stderr
,
"_NXGetFontPath: Using NX font path [%s].
\n
"
,
_NXFontPath
);
#endif
#endif
...
@@ -143,7 +135,7 @@ _NXGetFontPathError:
...
@@ -143,7 +135,7 @@ _NXGetFontPathError:
snprintf
(
_NXFontPath
,
NXFONTPATHLENGTH
,
"%s"
,
path
);
snprintf
(
_NXFontPath
,
NXFONTPATHLENGTH
,
"%s"
,
path
);
#ifdef
NX_TRANS_
TEST
#ifdef TEST
fprintf
(
stderr
,
"_NXGetFontPath: Using default font path [%s].
\n
"
,
_NXFontPath
);
fprintf
(
stderr
,
"_NXGetFontPath: Using default font path [%s].
\n
"
,
_NXFontPath
);
#endif
#endif
...
@@ -1003,9 +995,9 @@ SetDefaultFontPath(char *path)
...
@@ -1003,9 +995,9 @@ SetDefaultFontPath(char *path)
size
=
0
,
size
=
0
,
bad
;
bad
;
#ifdef NX
_TRANS_SOCKET
#ifdef NX
AGENT_SERVER
path
=
(
char
*
)
_NXGetFontPath
(
path
);
path
=
(
char
*
)
_NXGetFontPath
(
path
);
#endif
/* NX
_TRANS_SOCKET
*/
#endif
/* NX
AGENT_SERVER
*/
start
=
path
;
start
=
path
;
...
...
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