xserver: Branch 'master' - 3 commits

Adam Jackson ajax at kemper.freedesktop.org
Wed Jul 16 12:53:09 PDT 2008


 dix/dixfonts.c                     |   42 +++++---------
 dix/main.c                         |    3 -
 hw/xfree86/common/xf86Module.h     |    1 
 hw/xfree86/dixmods/Makefile.am     |    6 --
 hw/xfree86/dixmods/ftmodule.c      |   75 -------------------------
 hw/xfree86/loader/dixsym.c         |    7 --
 hw/xfree86/loader/fontsym.c        |  109 -------------------------------------
 hw/xfree86/loader/loader.c         |    6 --
 hw/xfree86/loader/loaderProcs.h    |    1 
 hw/xfree86/loader/loadfont.c       |   81 ---------------------------
 hw/xfree86/loader/loadmod.c        |    1 
 hw/xfree86/loader/xf86sym.c        |    1 
 hw/xfree86/utils/xorgcfg/loader.c  |   34 +----------
 hw/xfree86/utils/xorgcfg/loader.h  |   13 ----
 hw/xfree86/utils/xorgcfg/loadmod.c |   55 ------------------
 include/dixfont.h                  |   10 ---
 include/scrnintstr.h               |    2 
 17 files changed, 25 insertions(+), 422 deletions(-)

New commits:
commit affec10635343668839994ea2bac16c1d4524200
Author: Adam Jackson <ajax at redhat.com>
Date:   Wed Jul 16 14:44:33 2008 -0400

    Remove loadable font renderer support.

diff --git a/dix/dixfonts.c b/dix/dixfonts.c
index 1c6d37f..7b79bac 100644
--- a/dix/dixfonts.c
+++ b/dix/dixfonts.c
@@ -87,7 +87,7 @@ extern FontPtr defaultFont;
 
 static FontPathElementPtr *font_path_elements = (FontPathElementPtr *) 0;
 static int  num_fpes = 0;
-_X_EXPORT FPEFunctions *fpe_functions = (FPEFunctions *) 0;
+static FPEFunctions *fpe_functions = (FPEFunctions *) 0;
 static int  num_fpe_types = 0;
 
 static unsigned char *font_path_string;
@@ -97,7 +97,7 @@ static int  size_slept_fpes = 0;
 static FontPathElementPtr *slept_fpes = (FontPathElementPtr *) 0;
 static FontPatternCachePtr patternCache;
 
-_X_EXPORT int
+static int
 FontToXError(err)
     int         err;
 {
@@ -117,6 +117,16 @@ FontToXError(err)
     }
 }
 
+static int
+LoadGlyphs(ClientPtr client, FontPtr pfont, unsigned nchars, int item_size,
+	   unsigned char *data)
+{
+    if (fpe_functions[pfont->fpe->type].load_glyphs)
+	return (*fpe_functions[pfont->fpe->type].load_glyphs)
+	    (client, pfont, 0, nchars, item_size, data);
+    else
+	return Successful;
+}
 
 /*
  * adding RT_FONT prevents conflict with default cursor font
@@ -470,7 +480,7 @@ OpenFont(ClientPtr client, XID fid, Mask flags, unsigned lenfname, char *pfontna
  *
  *  \param value must conform to DeleteType
  */
-_X_EXPORT int
+int
 CloseFont(pointer value, XID fid)
 {
     int         nscr;
@@ -1879,16 +1889,6 @@ GetFontPath(ClientPtr client, int *count, int *length, unsigned char **result)
     return Success;
 }
 
-_X_EXPORT int
-LoadGlyphs(ClientPtr client, FontPtr pfont, unsigned nchars, int item_size, unsigned char *data)
-{
-    if (fpe_functions[pfont->fpe->type].load_glyphs)
-	return (*fpe_functions[pfont->fpe->type].load_glyphs)
-	    (client, pfont, 0, nchars, item_size, data);
-    else
-	return Successful;
-}
-
 void
 DeleteClientFontStuff(ClientPtr client)
 {
@@ -1911,6 +1911,7 @@ InitFonts (void)
 #ifdef BUILTIN_FONTS
     BuiltinRegisterFpeFunctions();
 #else
+    FreeTypeRegisterFontFileFunctions();
     FontFileRegisterFpeFunctions();
     fs_register_fpe_functions();
 #endif
diff --git a/hw/xfree86/common/xf86Module.h b/hw/xfree86/common/xf86Module.h
index c8bf1ce..3c75df0 100644
--- a/hw/xfree86/common/xf86Module.h
+++ b/hw/xfree86/common/xf86Module.h
@@ -194,7 +194,6 @@ pointer LoadSubModuleLocal(pointer, const char *, const char **,
 			   const char **, pointer, const XF86ModReqInfo *,
 			   int *, int *);
 void UnloadSubModule(pointer);
-void LoadFont(pointer);
 void UnloadModule (pointer);
 #endif
 pointer LoaderSymbol(const char *);
diff --git a/hw/xfree86/dixmods/Makefile.am b/hw/xfree86/dixmods/Makefile.am
index f19a852..365f006 100644
--- a/hw/xfree86/dixmods/Makefile.am
+++ b/hw/xfree86/dixmods/Makefile.am
@@ -23,9 +23,6 @@ extsmodule_LTLIBRARIES = $(RECORDMOD) \
 			 $(DBEMOD) \
                          $(GLXMODS)
 
-fontsmoduledir = $(moduledir)/fonts
-fontsmodule_LTLIBRARIES = libfreetype.la
-
 AM_CFLAGS = @XORG_CFLAGS@ @DIX_CFLAGS@
 INCLUDES = @XORG_INCS@ \
            -I$(top_srcdir)/dbe \
@@ -64,9 +61,6 @@ libshadow_la_LDFLAGS = -avoid-version
 libshadow_la_LIBADD = $(top_builddir)/miext/shadow/libshadow.la
 libshadow_la_SOURCES = shmodule.c
 
-libfreetype_la_LDFLAGS = -avoid-version
-libfreetype_la_SOURCES = ftmodule.c
-
 libdixmods_la_SOURCES = $(top_srcdir)/mi/miinitext.c
 libdixmods_la_CFLAGS = -DXFree86LOADER $(AM_CFLAGS)
 
diff --git a/hw/xfree86/dixmods/ftmodule.c b/hw/xfree86/dixmods/ftmodule.c
deleted file mode 100644
index 382c0b3..0000000
--- a/hw/xfree86/dixmods/ftmodule.c
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Copyright (C) 1998-2002 The XFree86 Project, Inc.  All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
- * XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
- * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- * Except as contained in this notice, the name of the XFree86 Project shall
- * not be used in advertising or otherwise to promote the sale, use or other
- * dealings in this Software without prior written authorization from the
- * XFree86 Project.
- */
-
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
-#include "misc.h"
-
-#include <X11/fonts/fontmod.h>
-#include "xf86Module.h"
-
-static MODULESETUPPROTO(freetypeSetup);
-
-    /*
-     * This is the module data function that is accessed when loading
-     * libfreetype as a module.
-     */
-
-static XF86ModuleVersionInfo VersRec =
-{
-	"freetype",
-	MODULEVENDORSTRING " & the After X-TT Project",
-	MODINFOSTRING1,
-	MODINFOSTRING2,
-	XORG_VERSION_CURRENT,
-        2, 1, 0,
-	ABI_CLASS_FONT,			/* Font module */
-	ABI_FONT_VERSION,
-	MOD_CLASS_FONT,
-	{0,0,0,0}       /* signature, to be patched into the file by a tool */
-};
-
-_X_EXPORT XF86ModuleData freetypeModuleData = { &VersRec, freetypeSetup, NULL };
-
-extern void FreeTypeRegisterFontFileFunctions(void);
-
-static FontModule freetypeModule = {
-    FreeTypeRegisterFontFileFunctions,
-    "FreeType",
-    NULL
-};
-
-static pointer
-freetypeSetup(pointer module, pointer opts, int *errmaj, int *errmin)
-{
-    freetypeModule.module = module;
-    LoadFont(&freetypeModule);
-
-    /* Need a non-NULL return */
-    return (pointer)1;
-}
diff --git a/hw/xfree86/loader/dixsym.c b/hw/xfree86/loader/dixsym.c
index eba52ec..1505e8e 100644
--- a/hw/xfree86/loader/dixsym.c
+++ b/hw/xfree86/loader/dixsym.c
@@ -57,7 +57,6 @@
 #include "cursorstr.h"
 #include "dix.h"
 #include "dixevents.h"
-#include "dixfont.h"
 #include "dixstruct.h"
 #include "misc.h"
 #include "globals.h"
@@ -99,6 +98,7 @@ _X_HIDDEN void *dixLookupTab[] = {
     /* dix */
     /* atom.c */
     SYMFUNC(MakeAtom)
+    SYMFUNC(NameForAtom)
     SYMFUNC(ValidAtom)
     /* colormap.c */
     SYMFUNC(AllocColor)
@@ -147,11 +147,6 @@ _X_HIDDEN void *dixLookupTab[] = {
     SYMVAR(isItTimeToYield)
     SYMVAR(ClientStateCallback)
     SYMVAR(ServerGrabCallback)
-    /* dixfonts.c */
-    SYMFUNC(CloseFont)
-    SYMFUNC(FontToXError)
-    SYMFUNC(LoadGlyphs)
-    SYMVAR(fpe_functions)
     /* dixutils.c */
     SYMFUNC(AddCallback)
     SYMFUNC(ClientSleep)
diff --git a/hw/xfree86/loader/fontsym.c b/hw/xfree86/loader/fontsym.c
deleted file mode 100644
index 82d4b1c..0000000
--- a/hw/xfree86/loader/fontsym.c
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- * Copyright (c) 1998-2002 by The XFree86 Project, Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- * OTHER DEALINGS IN THE SOFTWARE.
- *
- * Except as contained in this notice, the name of the copyright holder(s)
- * and author(s) shall not be used in advertising or otherwise to promote
- * the sale, use or other dealings in this Software without prior written
- * authorization from the copyright holder(s) and author(s).
- */
-
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
-#include <X11/fonts/font.h>
-#include "sym.h"
-#include <X11/fonts/fntfilst.h>
-#include <X11/fonts/fontenc.h>
-#ifdef FONTENC_COMPATIBILITY
-#include <X11/fonts/fontencc.h>
-#endif
-#include <X11/fonts/fntfilio.h>
-#include <X11/fonts/fntfil.h>
-#include <X11/fonts/fontutil.h>
-#include <X11/fonts/fontxlfd.h>
-#ifdef FONTCACHE
-#define _FONTCACHE_SERVER_
-#include "fontcache.h"
-#endif
-
-_X_HIDDEN void *fontLookupTab[] = {
-
-    SYMFUNC(TwoByteSwap)
-    SYMFUNC(FourByteSwap)
-    SYMFUNC(FontCouldBeTerminal)
-    SYMFUNC(BufFileRead)
-    SYMFUNC(BufFileWrite)
-    SYMFUNC(CheckFSFormat)
-    SYMFUNC(FontFileOpen)
-    SYMFUNC(FontFilePriorityRegisterRenderer)
-    SYMFUNC(FontFileRegisterRenderer)
-    SYMFUNC(FontParseXLFDName)
-    SYMFUNC(FontFileCloseFont)
-    SYMFUNC(FontFileOpenBitmap)
-    SYMFUNC(FontFileCompleteXLFD)
-    SYMFUNC(FontFileCountDashes)
-    SYMFUNC(FontFileFindNameInDir)
-    SYMFUNC(FontFileClose)
-    SYMFUNC(FontComputeInfoAccelerators)
-    SYMFUNC(FontDefaultFormat)
-    SYMFUNC(NameForAtom)
-    SYMFUNC(BitOrderInvert)
-    SYMFUNC(FontFileMatchRenderer)
-    SYMFUNC(RepadBitmap)
-    SYMFUNC(FontEncName)
-    SYMFUNC(FontEncRecode)
-    SYMFUNC(FontEncFind)
-    SYMFUNC(FontMapFind)
-    SYMFUNC(FontEncMapFind)
-    SYMFUNC(FontEncFromXLFD)
-    SYMFUNC(FontEncDirectory)
-    SYMFUNC(FontMapReverse)
-    SYMFUNC(FontMapReverseFree)
-    SYMFUNC(CreateFontRec)
-    SYMFUNC(DestroyFontRec)
-    SYMFUNC(GetGlyphs)
-    SYMFUNC(QueryGlyphExtents)
-
-    SYMVAR(FontFileBitmapSources)
-
-#ifdef FONTENC_COMPATIBILITY
-    /* Obsolete backwards compatibility symbols -- fontencc.c */
-    SYMFUNC(font_encoding_from_xlfd)
-    SYMFUNC(font_encoding_find)
-    SYMFUNC(font_encoding_recode)
-    SYMFUNC(font_encoding_name)
-    SYMFUNC(identifyEncodingFile)
-#endif
-
-#ifdef FONTCACHE
-    /* fontcache.c */
-    SYMFUNC(FontCacheGetSettings)
-    SYMFUNC(FontCacheGetStatistics)
-    SYMFUNC(FontCacheChangeSettings)
-    SYMFUNC(FontCacheOpenCache)
-    SYMFUNC(FontCacheCloseCache)
-    SYMFUNC(FontCacheSearchEntry)
-    SYMFUNC(FontCacheGetEntry)
-    SYMFUNC(FontCacheInsertEntry)
-    SYMFUNC(FontCacheGetBitmap)
-#endif
-};
diff --git a/hw/xfree86/loader/loader.c b/hw/xfree86/loader/loader.c
index b05c48e..c1df446 100644
--- a/hw/xfree86/loader/loader.c
+++ b/hw/xfree86/loader/loader.c
@@ -113,8 +113,7 @@ LoaderInit(void)
 
     xf86MsgVerb(X_INFO, 2, "Loader magic: %p\n", (void *)
 		((long)dixLookupTab ^ (long)extLookupTab
-	        ^ (long)fontLookupTab ^ (long)miLookupTab
-		^ (long)xfree86LookupTab));
+	        ^ (long)miLookupTab ^ (long)xfree86LookupTab));
     xf86MsgVerb(X_INFO, 2, "Module ABI versions:\n");
     xf86ErrorFVerb(2, "\t%s: %d.%d\n", ABI_CLASS_ANSIC,
 		   GET_ABI_MAJOR(LoaderVersionInfo.ansicVersion),
@@ -128,9 +127,6 @@ LoaderInit(void)
     xf86ErrorFVerb(2, "\t%s : %d.%d\n", ABI_CLASS_EXTENSION,
 		   GET_ABI_MAJOR(LoaderVersionInfo.extensionVersion),
 		   GET_ABI_MINOR(LoaderVersionInfo.extensionVersion));
-    xf86ErrorFVerb(2, "\t%s : %d.%d\n", ABI_CLASS_FONT,
-		   GET_ABI_MAJOR(LoaderVersionInfo.fontVersion),
-		   GET_ABI_MINOR(LoaderVersionInfo.fontVersion));
 
     LoaderGetOS(&osname, NULL, NULL, NULL);
     if (osname)
diff --git a/hw/xfree86/loader/loaderProcs.h b/hw/xfree86/loader/loaderProcs.h
index 9c73db3..827f3a9 100644
--- a/hw/xfree86/loader/loaderProcs.h
+++ b/hw/xfree86/loader/loaderProcs.h
@@ -87,7 +87,6 @@ ModuleDescPtr LoadSubModuleLocal(ModuleDescPtr, const char *,
 				 pointer, const XF86ModReqInfo *,
 				 int *, int *);
 ModuleDescPtr DuplicateModule(ModuleDescPtr mod, ModuleDescPtr parent);
-void LoadFont(FontModule *);
 void UnloadModule(ModuleDescPtr);
 void UnloadSubModule(ModuleDescPtr);
 void UnloadDriver(ModuleDescPtr);
diff --git a/hw/xfree86/loader/loadfont.c b/hw/xfree86/loader/loadfont.c
deleted file mode 100644
index 94d31d6..0000000
--- a/hw/xfree86/loader/loadfont.c
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Copyright (c) 1998 by The XFree86 Project, Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- * OTHER DEALINGS IN THE SOFTWARE.
- *
- * Except as contained in this notice, the name of the copyright holder(s)
- * and author(s) shall not be used in advertising or otherwise to promote
- * the sale, use or other dealings in this Software without prior written
- * authorization from the copyright holder(s) and author(s).
- */
-
-/* Maybe this file belongs in lib/font/fontfile/module/ ? */
-
-#define LOADERDECLARATIONS
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
-#include "loaderProcs.h"
-#include "misc.h"
-#include "xf86.h"
-
-/* XXX this should be static, but xorgcfg needs it, nngh */
-FontModule *FontModuleList = NULL;
-static int numFontModules = 0;
-
-static FontModule *
-NewFontModule(void)
-{
-    FontModule *save = FontModuleList;
-    int n;
-
-    /* Sanity check */
-    if (!FontModuleList)
-	numFontModules = 0;
-
-    n = numFontModules + 1;
-    FontModuleList = xrealloc(FontModuleList, (n + 1) * sizeof(FontModule));
-    if (FontModuleList == NULL) {
-	FontModuleList = save;
-	return NULL;
-    } else {
-	numFontModules++;
-	FontModuleList[numFontModules].name = NULL;
-	return FontModuleList + (numFontModules - 1);
-    }
-}
-
-_X_EXPORT void
-LoadFont(FontModule * f)
-{
-    FontModule *newfont;
-
-    if (f == NULL)
-	return;
-
-    if (!(newfont = NewFontModule()))
-	return;
-
-    xf86MsgVerb(X_INFO, 2, "Loading font %s\n", f->name);
-
-    newfont->name = f->name;
-    newfont->initFunc = f->initFunc;
-    newfont->module = f->module;
-}
diff --git a/hw/xfree86/loader/loadmod.c b/hw/xfree86/loader/loadmod.c
index 04719a6..6031db7 100644
--- a/hw/xfree86/loader/loadmod.c
+++ b/hw/xfree86/loader/loadmod.c
@@ -198,7 +198,6 @@ LoaderSetPath(const char *path)
 /* Standard set of module subdirectories to search, in order of preference */
 static const char *stdSubdirs[] = {
     "",
-    "fonts/",
     "input/",
     "drivers/",
     "multimedia/",
diff --git a/hw/xfree86/loader/xf86sym.c b/hw/xfree86/loader/xf86sym.c
index 5f0a683..8a45fe7 100644
--- a/hw/xfree86/loader/xf86sym.c
+++ b/hw/xfree86/loader/xf86sym.c
@@ -671,7 +671,6 @@ _X_HIDDEN void *xfree86LookupTab[] = {
     SYMFUNC(LoaderErrorMsg)
     SYMFUNC(LoaderCheckUnresolved)
     SYMFUNC(LoadExtension)
-    SYMFUNC(LoadFont)
     SYMFUNC(LoaderReqSymbols)
     SYMFUNC(LoaderReqSymLists)
     SYMFUNC(LoaderRefSymbols)
diff --git a/include/dixfont.h b/include/dixfont.h
index 516d91b..d61dd7e 100644
--- a/include/dixfont.h
+++ b/include/dixfont.h
@@ -33,10 +33,6 @@ SOFTWARE.
 
 typedef struct _DIXFontProp *DIXFontPropPtr;
 
-extern FPEFunctions *fpe_functions;
-
-extern int FontToXError(int /*err*/);
-
 extern Bool SetDefaultFont(char * /*defaultfontname*/);
 
 extern void QueueFontWakeup(FontPathElementPtr /*fpe*/);
@@ -110,12 +106,6 @@ extern int GetFontPath(ClientPtr client,
 		       int *length,
 		       unsigned char **result);
 
-extern int LoadGlyphs(ClientPtr /*client*/,
-		      FontPtr /*pfont*/,
-		      unsigned /*nchars*/,
-		      int /*item_size*/,
-		      unsigned char * /*data*/);
-
 extern void DeleteClientFontStuff(ClientPtr /*client*/);
 
 /* Quartz support on Mac OS X pulls in the QuickDraw
commit acc91054316208844742495dea0b80a860ef02bb
Author: Adam Jackson <ajax at redhat.com>
Date:   Wed Jul 16 14:24:47 2008 -0400

    Remove font module support from xorgcfg.

diff --git a/hw/xfree86/utils/xorgcfg/loader.c b/hw/xfree86/utils/xorgcfg/loader.c
index 8a9ad1a..35a03e7 100644
--- a/hw/xfree86/utils/xorgcfg/loader.c
+++ b/hw/xfree86/utils/xorgcfg/loader.c
@@ -74,9 +74,6 @@ extern int noverify;
 extern ModuleType module_type;
 static OptionInfoPtr option;
 
-extern FontModule *font_module;
-extern int numFontModules;
-
 char **checkerLegend;
 int *checkerErrors;
 
@@ -173,12 +170,12 @@ LoaderInitializeOptions(void)
     XrmQuark classes[2];
     volatile int i;
     static ModuleType module_types[] = {
-	GenericModule, FontRendererModule, InputModule, VideoModule, NullModule
+	GenericModule, InputModule, VideoModule, NullModule
     };
 
     /* The offset in this vector must match loader.h:enum ModuleType values */
     static char *module_strs[] = {
-	"Null Module", "Video Module", "Input Module", "Generic Module", "Font Module"
+	"Null Module", "Video Module", "Input Module", "Generic Module",
     };
 
     if (first) {
@@ -202,9 +199,8 @@ LoaderInitializeOptions(void)
 	checkerLegend[CHECKER_RECOGNIZED_AS] =
 	"This message means the module code did not follow what was expected\n"
 	"by the checker. For video drivers, it did not call xf86AddDriver,\n"
-	"a input module did not call xf86AddInputDriver and a font renderer\n"
-	"module did not call LoadFont. This message can also be printed if\n"
-	"the module is in the incorrect directory.";
+	"a input module did not call xf86AddInputDriver. This message can\n"
+	"also be printed if the module is in the incorrect directory.";
 	checkerLegend[CHECKER_NO_OPTIONS_AVAILABLE] =
 	"The driver does not have an AvailableOptions function, or that\n"
 	"function is returning NULL. If the driver is returning NULL, and\n"
@@ -272,9 +268,8 @@ LoaderInitializeOptions(void)
 		signal(SIGFPE, sig_handler);
 		if (sigsetjmp(jmp, 1) == 0) {
 		    if (!noverify) {
-			int ok, nfont_modules;
+			int ok;
 
-			nfont_modules = numFontModules;
 			error_level = 0;
 			ErrorF("CHECK MODULE %s\n", *ploaderList);
 			if ((ok = xf86cfgCheckModule()) == 0) {
@@ -352,25 +347,6 @@ LoaderInitializeOptions(void)
 				    CheckChipsets(module_options, &error_level);
 				}
 			    }
-
-			    /* font modules check */
-			    if (module_type == FontRendererModule) {
-				if (strcmp(*ploaderList, font_module->name)) {
-				    /* not an error */
-				    ErrorF("  NOTICE FontModule->name specification mismatch: \"%s\" \"%s\"\n",
-					   *ploaderList, font_module->name);
-				}
-				if (nfont_modules + 1 != numFontModules) {
-				    /* not an error */
-				    ErrorF("  NOTICE font module \"%s\" loaded more than one font renderer.\n",
-					   *ploaderList);
-				}
-			    }
-			    else if (nfont_modules != numFontModules) {
-				ErrorF("  WARNING number of font modules changed from %d to %d.\n",
-				       nfont_modules, numFontModules);
-				++error_level;
-			    }
 			}
 			ErrorF("  SUMMARY error_level set to %d.\n\n", error_level);
 		    }
diff --git a/hw/xfree86/utils/xorgcfg/loader.h b/hw/xfree86/utils/xorgcfg/loader.h
index 16c5273..5affada 100644
--- a/hw/xfree86/utils/xorgcfg/loader.h
+++ b/hw/xfree86/utils/xorgcfg/loader.h
@@ -47,7 +47,6 @@
 #endif
 #include "xf86Xinput.h"
 
-#include <X11/fonts/fontmod.h>
 #include "loaderProcs.h"
 
 #include <sym.h>
@@ -102,17 +101,6 @@ typedef struct {
     Bool                found;
 } OptionInfoRec, *OptionInfoPtr;
 
-/* fontmod.h */
-typedef void (*InitFont)(void);
-
-typedef struct {
-    InitFont	initFunc;
-    char *	name;
-    void	*module;
-} FontModule;
-
-extern FontModule *FontModuleList;
-
 typedef struct {
     int                 token;          /* id of the token */
     const char *        name;           /* token name */
@@ -124,7 +112,6 @@ typedef enum {
     VideoModule,
     InputModule,
     GenericModule,
-    FontRendererModule
 } ModuleType;
 
 typedef struct _xf86cfgModuleOptions {
diff --git a/hw/xfree86/utils/xorgcfg/loadmod.c b/hw/xfree86/utils/xorgcfg/loadmod.c
index 6dbc65e..809a51a 100644
--- a/hw/xfree86/utils/xorgcfg/loadmod.c
+++ b/hw/xfree86/utils/xorgcfg/loadmod.c
@@ -80,8 +80,6 @@ Bool xf86CheckPciSlot( const struct pci_device * );
 
 extern char *loaderPath, **loaderList, **ploaderList;
 xf86cfgModuleOptions *module_options;
-FontModule *font_module;
-int numFontModules;
 
 extern int noverify, error_level;
 
@@ -89,7 +87,6 @@ int xf86ShowUnresolved = 1;
 
 LOOKUP miLookupTab[]      = {{0,0}};
 LOOKUP dixLookupTab[]     = {{0,0}};
-LOOKUP fontLookupTab[]    = {{0,0}};
 LOOKUP extLookupTab[]     = {{0,0}};
 LOOKUP xfree86LookupTab[] = {
        /* Loader functions */
@@ -99,7 +96,6 @@ LOOKUP xfree86LookupTab[] = {
    SYMFUNC(LoaderErrorMsg)
    SYMFUNC(LoaderCheckUnresolved)
    SYMFUNC(LoadExtension)
-   SYMFUNC(LoadFont)
    SYMFUNC(LoaderReqSymbols)
    SYMFUNC(LoaderReqSymLists)
    SYMFUNC(LoaderRefSymbols)
@@ -221,10 +217,6 @@ xf86cfgLoaderInitList(int type)
 	"input",
 	NULL
     };
-    static const char *font[] = {
-	"fonts",
-	NULL
-    };
     const char **subdirs;
 
     switch (type) {
@@ -237,9 +229,6 @@ xf86cfgLoaderInitList(int type)
 	case InputModule:
 	    subdirs = input;
 	    break;
-	case FontRendererModule:
-	    subdirs = font;
-	    break;
 	default:
 	    fprintf(stderr, "Invalid value passed to xf86cfgLoaderInitList.\n");
 	    subdirs = generic;
@@ -270,13 +259,10 @@ xf86cfgCheckModule(void)
 {
     int errmaj, errmin;
     ModuleDescPtr module;
-    int nfonts;
-    FontModule *fonts, *pfont_module;
 
     driver = NULL;
     chips = NULL;
     info = NULL;
-    pfont_module = NULL;
     vendor = -1;
     module_type = GenericModule;
 
@@ -319,47 +305,6 @@ xf86cfgCheckModule(void)
 	XtFree(p);
     }
 
-    nfonts = numFontModules;
-    numFontModules = 0;
-    fonts = FontModuleList;
-    if (fonts) {
-	Bool dup = FALSE;
-	while (fonts->name) {
-	    if (strcasecmp(fonts->name, *ploaderList) == 0) {
-		pfont_module = fonts;
-		/* HACK:
-		 * fonts->names points into modules.
-		 * Duplicate string of all remaining names to survive
-		 * unloading. Since new fonts are appended to list
-		 * this will only happen once per renderer.
-		 */
-		dup = TRUE;
-	    }
-	    if (dup)
-		fonts->name = strdup(fonts->name);
-	    ++numFontModules;
-	    ++fonts;
-	}
-    }
-    if (pfont_module)
-	module_type = FontRendererModule;
-    else if (nfonts + 1 <= numFontModules) {
-	/* loader.c will flag a warning if -noverify is not set */
-	pfont_module = &FontModuleList[nfonts];
-	module_type = FontRendererModule;
-    }
-
-    if (font_module) {
-	XtFree((XtPointer)font_module->name);
-	XtFree((XtPointer)font_module);
-	font_module = NULL;
-    }
-    if (pfont_module) {
-	font_module = XtNew(FontModule);
-	memcpy(font_module, pfont_module, sizeof(FontModule));
-	font_module->name = XtNewString(pfont_module->name);
-    }
-
     UnloadModule(module);
 
     return (1);
commit a82e6efb7b9b2ab9a1597b002f375c5ee105e7f5
Author: Adam Jackson <ajax at redhat.com>
Date:   Wed Jul 16 14:19:04 2008 -0400

    Remove the numVideoScreens xprintism.
    
    This was to account for cases where you had video and print screens in
    the same server.  Lunacy.  Leave the slot in ScreenInfo, but rename it,
    and stop looking at it.

diff --git a/dix/dixfonts.c b/dix/dixfonts.c
index 89f1528..1c6d37f 100644
--- a/dix/dixfonts.c
+++ b/dix/dixfonts.c
@@ -1908,21 +1908,12 @@ InitFonts (void)
 {
     patternCache = MakeFontPatternCache();
 
-#ifndef BUILTIN_FONTS
-    if (screenInfo.numScreens > screenInfo.numVideoScreens) {
-	PrinterFontRegisterFpeFunctions();
-	FontFileCheckRegisterFpeFunctions();
-	check_fs_register_fpe_functions();
-    } else 
-#endif
-    {
 #ifdef BUILTIN_FONTS
-        BuiltinRegisterFpeFunctions();
+    BuiltinRegisterFpeFunctions();
 #else
-	FontFileRegisterFpeFunctions();
-	fs_register_fpe_functions();
+    FontFileRegisterFpeFunctions();
+    fs_register_fpe_functions();
 #endif
-    }
 }
 
 int
diff --git a/dix/main.c b/dix/main.c
index 3bc45fb..d8e3bac 100644
--- a/dix/main.c
+++ b/dix/main.c
@@ -309,7 +309,6 @@ int main(int argc, char *argv[], char *envp[])
 	SetInputCheck(&alwaysCheckForInput[0], &alwaysCheckForInput[1]);
 	screenInfo.arraySize = MAXSCREENS;
 	screenInfo.numScreens = 0;
-	screenInfo.numVideoScreens = -1;
 	WindowTable = (WindowPtr *)xalloc(MAXSCREENS * sizeof(WindowPtr));
 	if (!WindowTable)
 	    FatalError("couldn't create root window table");
@@ -339,8 +338,6 @@ int main(int argc, char *argv[], char *envp[])
 
 	if (screenInfo.numScreens < 1)
 	    FatalError("no screens found");
-	if (screenInfo.numVideoScreens < 0)
-	    screenInfo.numVideoScreens = screenInfo.numScreens;
 	InitExtensions(argc, argv);
 	for (i = 0; i < screenInfo.numScreens; i++)
 	{
diff --git a/include/scrnintstr.h b/include/scrnintstr.h
index 6cf9333..5d4ddbb 100644
--- a/include/scrnintstr.h
+++ b/include/scrnintstr.h
@@ -612,7 +612,7 @@ typedef struct _ScreenInfo {
     int		arraySize;
     int		numScreens;
     ScreenPtr	screens[MAXSCREENS];
-    int		numVideoScreens;
+    int		unused;
 } ScreenInfo;
 
 extern ScreenInfo screenInfo;


More information about the xorg-commit mailing list