aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver
diff options
context:
space:
mode:
authorUlrich Sibiller <uli42@gmx.de>2020-01-19 12:51:36 +0100
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2020-05-07 14:57:15 +0200
commit4ad501b3f0b2d2176e7312e544ee4b330286a16e (patch)
treeb600dfcd61482ec006b4452ddd613e8e298ec0ee /nx-X11/programs/Xserver
parentc135bbcfea95d7468c18a672266c98dffde8597f (diff)
downloadnx-libs-4ad501b3f0b2d2176e7312e544ee4b330286a16e.tar.gz
nx-libs-4ad501b3f0b2d2176e7312e544ee4b330286a16e.tar.bz2
nx-libs-4ad501b3f0b2d2176e7312e544ee4b330286a16e.zip
NXdixfonts.c: drop NXAGENT_DEBUG
and use DEBUG like everywhere else. There were already some TEST lines using this scheme. Also indent DEBUG and TEST lines to make the code more readable
Diffstat (limited to 'nx-X11/programs/Xserver')
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Imakefile1
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/NXdixfonts.c70
2 files changed, 35 insertions, 36 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Imakefile b/nx-X11/programs/Xserver/hw/nxagent/Imakefile
index 6e412a0bb..a713467ae 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Imakefile
+++ b/nx-X11/programs/Xserver/hw/nxagent/Imakefile
@@ -215,7 +215,6 @@ INCLUDES = \
#
# DEBUG_COLORMAP
# DEBUG_TREE Include code that activates the keystroke to print the current window tree
-# NXAGENT_DEBUG
# NXAGENT_FIXKEYS_DEBUG
# NXAGENT_FONTCACHE_DEBUG
# NXAGENT_FONTMATCH_DEBUG
diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXdixfonts.c b/nx-X11/programs/Xserver/hw/nxagent/NXdixfonts.c
index 2204ca60d..4c288a18c 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/NXdixfonts.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/NXdixfonts.c
@@ -81,15 +81,16 @@ static Bool doListFontsAndAliases(ClientPtr client, LFclosurePtr c);
#include "../../dix/dixfonts.c"
-/*
-#define NXAGENT_DEBUG
-*/
-
#include "Agent.h"
#include "Font.h"
#ifdef NXAGENT_SERVER
+#define PANIC
+#define WARNING
+#undef TEST
+#undef DEBUG
+
#define NXFONTPATHLENGTH 1024
char _NXFontPath[NXFONTPATHLENGTH];
@@ -116,17 +117,17 @@ static char *_NXGetFontPath(const char *path)
{
if (strlen(fontEnv) + 1 > NXFONTPATHLENGTH)
{
-#ifdef TEST
+ #ifdef TEST
fprintf(stderr, "_NXGetFontPath: WARNING! Maximum length of font path exceeded.\n");
-#endif
+ #endif
goto _NXGetFontPathError;
}
snprintf(_NXFontPath, NXFONTPATHLENGTH, "%s", fontEnv);
-#ifdef TEST
+ #ifdef TEST
fprintf(stderr, "_NXGetFontPath: Using NX font path [%s].\n", _NXFontPath);
-#endif
+ #endif
return _NXFontPath;
}
@@ -135,9 +136,9 @@ _NXGetFontPathError:
snprintf(_NXFontPath, NXFONTPATHLENGTH, "%s", path);
-#ifdef TEST
+ #ifdef TEST
fprintf(stderr, "_NXGetFontPath: Using default font path [%s].\n", _NXFontPath);
-#endif
+ #endif
return _NXFontPath;
}
@@ -253,8 +254,9 @@ doOpenFont(ClientPtr client, OFclosurePtr c)
if (!c->slept) {
c->slept = TRUE;
ClientSleep(client, (ClientSleepProcPtr)doOpenFont, (void *) c);
-#ifdef NXAGENT_DEBUG
+ #ifdef DEBUG
fprintf(stderr, " NXdixfonts: doOpenFont: client [%lx] sleeping.\n", client);
+ #endif
#endif
}
return TRUE;
@@ -328,9 +330,9 @@ bail:
if (c->slept)
{
ClientWakeup(c->client);
-#ifdef NXAGENT_DEBUG
+ #ifdef DEBUG
fprintf(stderr, " NXdixfonts: doOpenFont: client [%lx] wakeup.\n", client);
-#endif
+ #endif
}
for (i = 0; i < c->num_fpes; i++) {
FreeFPE(c->fpe_list[i]);
@@ -403,9 +405,9 @@ doListFontsAndAliases(ClientPtr client, LFclosurePtr c)
ClientSleep(client,
(ClientSleepProcPtr)doListFontsAndAliases,
(void *) c);
-#ifdef NXAGENT_DEBUG
+ #ifdef DEBUG
fprintf(stderr, " NXdixfonts: doListFont (1): client [%lx] sleeping.\n", client);
-#endif
+ #endif
}
return TRUE;
}
@@ -460,12 +462,10 @@ doListFontsAndAliases(ClientPtr client, LFclosurePtr c)
(ClientSleepProcPtr)doListFontsAndAliases,
(void *) c);
c->slept = TRUE;
-#ifdef NXAGENT_DEBUG
+ #ifdef DEBUG
fprintf(stderr, " NXdixfonts: doListFont (2): client [%lx] sleeping.\n", client);
-#endif
-#ifdef NXAGENT_DEBUG
fprintf(stderr, " NXdixfonts: doListFont (3): client [%lx] sleeping.\n", client);
-#endif
+ #endif
}
return TRUE;
}
@@ -647,9 +647,9 @@ bail:
if (c->slept)
{
ClientWakeup(client);
-#ifdef NXAGENT_DEBUG
+ #ifdef DEBUG
fprintf(stderr, " NXdixfonts: doListFont: client [%lx] wakeup.\n", client);
-#endif
+ #endif
}
for (i = 0; i < c->num_fpes; i++)
FreeFPE(c->fpe_list[i]);
@@ -772,9 +772,9 @@ doListFontsWithInfo(ClientPtr client, LFWIclosurePtr c)
{
ClientSleep(client, (ClientSleepProcPtr)doListFontsWithInfo, c);
c->slept = TRUE;
-#ifdef NXAGENT_DEBUG
+ #ifdef DEBUG
fprintf(stderr, " NXdixfonts: doListFontWinfo (1): client [%lx] sleeping.\n", client);
-#endif
+ #endif
}
return TRUE;
}
@@ -800,9 +800,9 @@ doListFontsWithInfo(ClientPtr client, LFWIclosurePtr c)
(ClientSleepProcPtr)doListFontsWithInfo,
c);
c->slept = TRUE;
-#ifdef NXAGENT_DEBUG
+ #ifdef DEBUG
fprintf(stderr, " NXdixfonts: doListFontWinfo (2): client [%lx] sleeping.\n", client);
-#endif
+ #endif
}
return TRUE;
}
@@ -965,9 +965,9 @@ bail:
if (c->slept)
{
ClientWakeup(client);
-#ifdef NXAGENT_DEBUG
+ #ifdef DEBUG
fprintf(stderr, " NXdixfonts: doListFontWinfo: client [%lx] wakeup.\n", client);
-#endif
+ #endif
}
for (i = 0; i < c->num_fpes; i++)
FreeFPE(c->fpe_list[i]);
@@ -1055,9 +1055,9 @@ nxdoListFontsAndAliases(client, fss)
ClientSleep(client,
(ClientSleepProcPtr)nxdoListFontsAndAliases,
(void *) fss);
-#ifdef NXAGENT_DEBUG
+ #ifdef DEBUG
fprintf(stderr, " NXdixfonts: nxdoListFont (1): client [%lx] sleeping.\n", client);
-#endif
+ #endif
}
return TRUE;
}
@@ -1090,9 +1090,9 @@ nxdoListFontsAndAliases(client, fss)
(ClientSleepProcPtr)nxdoListFontsAndAliases,
(void *) fss);
c->slept = TRUE;
-#ifdef NXAGENT_DEBUG
+ #ifdef DEBUG
fprintf(stderr, " NXdixfonts: nxdoListFont (2): client [%lx] sleeping.\n", client);
-#endif
+ #endif
}
return TRUE;
}
@@ -1115,9 +1115,9 @@ nxdoListFontsAndAliases(client, fss)
(ClientSleepProcPtr)nxdoListFontsAndAliases,
(void *) fss);
c->slept = TRUE;
-#ifdef NXAGENT_DEBUG
+ #ifdef DEBUG
fprintf(stderr, " NXdixfonts: nxdoListFont (3): client [%lx] sleeping.\n", client);
-#endif
+ #endif
}
return TRUE;
}
@@ -1283,9 +1283,9 @@ finish:
if (c->slept)
{
ClientWakeup(client);
-#ifdef NXAGENT_DEBUG
+ #ifdef DEBUG
fprintf(stderr, " NXdixfonts: nxdoListFont: client [%lx] wakeup.\n", client);
-#endif
+ #endif
}
for (i = 0; i < c->num_fpes; i++)
FreeFPE(c->fpe_list[i]);