Commit 4d3bd06c authored by Ulrich Sibiller's avatar Ulrich Sibiller Committed by Mike Gabriel

NXdixfonts.c: use NXAGENT_SERVER instead of NX_TRANS_SOCK

that macro fits better here since there's no transport specific code.
parent b1850beb
...@@ -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 NXAGENT_SERVER
path = (char *) _NXGetFontPath(path); path = (char *) _NXGetFontPath(path);
#endif /* NX_TRANS_SOCKET */ #endif /* NXAGENT_SERVER */
start = path; start = path;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment