From cd24fcabc449bbc701a25e3cad279009dec69032 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Sat, 9 Jul 2005 23:31:40 +0000 Subject: Switch from monolithic configuration symbols to modular ones, add backward compatibility for monolithic symbols --- src/fontfile/register.c | 44 ++++++++++++++++++++++++++++++++++---------- 1 file changed, 34 insertions(+), 10 deletions(-) (limited to 'src/fontfile/register.c') diff --git a/src/fontfile/register.c b/src/fontfile/register.c index dd4a04b..cb74c7c 100644 --- a/src/fontfile/register.c +++ b/src/fontfile/register.c @@ -35,7 +35,10 @@ in this Software without prior written authorization from The Open Group. #ifdef HAVE_CONFIG_H #include +#else +#define XFONT_BITMAP 1 #endif + #include #include #include @@ -44,29 +47,50 @@ in this Software without prior written authorization from The Open Group. #include #endif +/* + * Translate monolithic build symbols to modular build symbols. + * I chose to make the modular symbols 'canonical' because they + * are prefixed with XFONT_, neatly avoiding name collisions + * with other packages. + */ + +#ifndef CRAY +# ifdef BUILD_SPEEDO +# define XFONT_SPEEDO 1 +# endif +# ifdef BUILD_TYPE1 +# define XFONT_TYPE1 1 +# endif +#endif + +#ifdef BUILD_CID +# define XFONT_CID 1 +#endif +#ifdef BUILD_FREETYPE +# define XFONT_FREETYPE 1 +#endif + void FontFileRegisterFpeFunctions(void) { #ifndef LOADABLEFONTS - BitmapRegisterFontFileFunctions (); - -#ifndef CRAY -#ifdef BUILD_SPEEDO +#ifdef XFONT_BITMAP + BitmapRegisterFontFileFunctions (); +#endif +#ifdef XFONT_SPEEDO SpeedoRegisterFontFileFunctions (); #endif -#ifdef BUILD_TYPE1 +#ifdef XFONT_TYPE1 Type1RegisterFontFileFunctions(); #endif -#endif -#ifdef BUILD_CID +#ifdef XFONT_CID CIDRegisterFontFileFunctions(); #endif -#ifdef BUILD_FREETYPE +#ifdef XFONT_FREETYPE FreeTypeRegisterFontFileFunctions(); #endif - #else { int i; @@ -79,7 +103,7 @@ FontFileRegisterFpeFunctions(void) } } #endif - + FontFileRegisterLocalFpeFunctions (); } -- cgit v1.2.3