diff options
author | Adam Jackson <ajax@redhat.com> | 2008-07-16 14:24:47 -0400 |
---|---|---|
committer | Adam Jackson <ajax@redhat.com> | 2008-07-16 14:24:47 -0400 |
commit | acc91054316208844742495dea0b80a860ef02bb (patch) | |
tree | e43a0d0953ce0f2c755fac320d71b017d2e489b9 | |
parent | a82e6efb7b9b2ab9a1597b002f375c5ee105e7f5 (diff) |
Remove font module support from xorgcfg.
-rw-r--r-- | hw/xfree86/utils/xorgcfg/loader.c | 34 | ||||
-rw-r--r-- | hw/xfree86/utils/xorgcfg/loader.h | 13 | ||||
-rw-r--r-- | hw/xfree86/utils/xorgcfg/loadmod.c | 55 |
3 files changed, 5 insertions, 97 deletions
diff --git a/hw/xfree86/utils/xorgcfg/loader.c b/hw/xfree86/utils/xorgcfg/loader.c index 8a9ad1aef..35a03e7cd 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 16c527327..5affada84 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 6dbc65ea4..809a51a03 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); |