Unlike the xset app, xfs has never defined or included a header that defines FONTCACHE, even when compiled with libXfont 1.3.3 which uses fontcacheproto and defines FONTCACHE in its config.h.
This will allow further simplification when generating config.cpp. Signed-off-by: Gaetan Nadon <[email protected]> --- config.cpp | 7 ------ difs/initfonts.c | 59 ------------------------------------------------------ include/os.h | 4 --- os/config.c | 17 --------------- 4 files changed, 0 insertions(+), 87 deletions(-) diff --git a/config.cpp b/config.cpp index 4668089..cc858b3 100644 --- a/config.cpp +++ b/config.cpp @@ -8,10 +8,3 @@ error-file = FSERRORS XCOMM in decipoints default-point-size = 120 default-resolutions = 75,75,100,100 - -#ifdef FONTCACHE -XCOMM font cache control, specified in KB -cache-hi-mark = 2048 -cache-low-mark = 1433 -cache-balance = 70 -#endif /* FONTCACHE */ diff --git a/difs/initfonts.c b/difs/initfonts.c index 84a5140..b0f75db 100644 --- a/difs/initfonts.c +++ b/difs/initfonts.c @@ -52,77 +52,18 @@ in this Software without prior written authorization from The Open Group. #include <X11/fonts/font.h> #include "difs.h" #include "globals.h" -#ifdef FONTCACHE -#include "misc.h" -#include <X11/extensions/fontcacheP.h> - -#define CACHE_HI_MARK (2048 * 1024) -#define CACHE_LOW_MARK (((2048 * 1024) / 4) * 3) -#define CACHE_BALANCE 70 -#endif FontPatternCachePtr fontPatternCache; -#ifdef FONTCACHE -FontCacheSettings cacheSettings = { -1, -1, -1 }; -#endif void InitFonts(void) { -#ifdef FONTCACHE - long himark, lowmark; - long balance; - FontCacheSettings cs; -#endif - if (fontPatternCache) FreeFontPatternCache(fontPatternCache); fontPatternCache = MakeFontPatternCache(); ResetFontPrivateIndex(); -#ifdef FONTCACHE - /* check cache control parameters */ - if (cacheSettings.himark == -1) { - himark = CACHE_HI_MARK; - if (cacheSettings.lowmark == -1) { - lowmark = CACHE_LOW_MARK; - } else { - lowmark = cacheSettings.lowmark; - } - } else { - himark = cacheSettings.himark; - if (cacheSettings.lowmark == -1) { - lowmark = (himark / 4) * 3; - } else { - lowmark = cacheSettings.lowmark; - } - } - if (cacheSettings.balance == -1) { - balance = CACHE_BALANCE; - } else { - balance = cacheSettings.balance; - } - - if (himark <= 0 || lowmark <= 0) { - FatalError("illegal cache parameter setting\n"); - } - if (himark <= lowmark) { - FatalError("illegal cache parameter setting\n"); - } - if (!(10 <= balance && balance <= 90)) { - FatalError("illegal cache parameter setting\n"); - } - - /* set cache control parameters */ - cs.himark = himark; - cs.lowmark = lowmark; - cs.balance = balance; - if (FontCacheChangeSettings(&cs) == 0) { - FatalError("couldn't init renderer font cache\n"); - } -#endif - #ifdef FONT_PCF FontFileRegisterFpeFunctions(); diff --git a/include/os.h b/include/os.h index 0ac4c42..8f99186 100644 --- a/include/os.h +++ b/include/os.h @@ -73,10 +73,6 @@ extern int ListenPort; extern Bool UseSyslog; extern Bool CloneSelf; extern char ErrorFile[]; -#ifdef FONTCACHE -#include <X11/extensions/fontcacheP.h> -extern FontCacheSettings cacheSettings; -#endif struct _osComm; /* FIXME: osCommPtr */ diff --git a/os/config.c b/os/config.c index 298dc2f..6b1b08e 100644 --- a/os/config.c +++ b/os/config.c @@ -58,9 +58,6 @@ in this Software without prior written authorization from The Open Group. #include "globals.h" #include "access.h" #include "difsutils.h" -#ifdef FONTCACHE -#include <X11/extensions/fontcacheP.h> -#endif #include <X11/fonts/fontutil.h> #include "difs.h" @@ -93,11 +90,6 @@ static char *config_set_snf_format(ConfigOptionPtr parm, char *val); */ static ConfigOptionRec config_options[] = { {"alternate-servers", config_set_list}, -#ifdef FONTCACHE - {"cache-balance", config_set_int}, - {"cache-hi-mark", config_set_int}, - {"cache-low-mark", config_set_int}, -#endif {"catalogue", config_set_catalogue}, {"client-limit", config_set_int}, {"clone-self", config_set_bool}, @@ -504,15 +496,6 @@ config_set_int( } else if (!strcmp(parm->parm_name, "default-point-size")) { SetDefaultPointSize(ival); } -#ifdef FONTCACHE - else if (!strcmp(parm->parm_name, "cache-balance")) { - cacheSettings.balance = ival; - } else if (!strcmp(parm->parm_name, "cache-hi-mark")) { - cacheSettings.himark = ival * 1024; - } else if (!strcmp(parm->parm_name, "cache-low-mark")) { - cacheSettings.lowmark = ival * 1024; - } -#endif return val; } -- 1.6.0.4 _______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
