diff options
author | Keith Packard <keithp@keithp.com> | 2005-07-09 23:30:07 +0000 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2005-07-09 23:30:07 +0000 |
commit | 428dd333c1c1a96d205d8236c6ecee32dbf7cac9 (patch) | |
tree | 4e8965e117fb01e9df56377bd82ec14e00d9e7a5 /src | |
parent | 99cde389c331616f22dd6aab395c488f3a798e2e (diff) |
Switch from monolithic configuration symbols to modular ones, add backward
compatibility for monolithic symbols
Diffstat (limited to 'src')
-rw-r--r-- | src/Type1/AFM.h | 4 | ||||
-rw-r--r-- | src/Type1/afm.c | 4 | ||||
-rw-r--r-- | src/Type1/cidchar.c | 4 | ||||
-rw-r--r-- | src/Type1/fontfcn.c | 32 | ||||
-rw-r--r-- | src/Type1/fontfcn.h | 25 | ||||
-rw-r--r-- | src/Type1/objects.c | 1 | ||||
-rw-r--r-- | src/Type1/objects.h | 6 | ||||
-rw-r--r-- | src/Type1/range.h | 4 | ||||
-rw-r--r-- | src/Type1/scanfont.c | 20 | ||||
-rw-r--r-- | src/Type1/spaces.c | 1 | ||||
-rw-r--r-- | src/Type1/t1funcs.c | 34 | ||||
-rw-r--r-- | src/Type1/t1info.c | 22 | ||||
-rw-r--r-- | src/Type1/t1intf.h | 16 | ||||
-rw-r--r-- | src/Type1/t1io.c | 8 | ||||
-rw-r--r-- | src/Type1/t1malloc.c | 4 | ||||
-rw-r--r-- | src/Type1/t1stdio.h | 6 | ||||
-rw-r--r-- | src/Type1/type1.c | 12 | ||||
-rw-r--r-- | src/Type1/util.c | 6 | ||||
-rw-r--r-- | src/Type1/util.h | 5 |
19 files changed, 143 insertions, 71 deletions
diff --git a/src/Type1/AFM.h b/src/Type1/AFM.h index 4f44b08..f2c997a 100644 --- a/src/Type1/AFM.h +++ b/src/Type1/AFM.h @@ -16,6 +16,10 @@ * Graphics, Inc. */ #ifdef BUILDCID +#define XFONT_CID 1 +#endif + +#if XFONT_CID #ifndef AFM_H #define AFM_H diff --git a/src/Type1/afm.c b/src/Type1/afm.c index 0f7c510..b8ce2d3 100644 --- a/src/Type1/afm.c +++ b/src/Type1/afm.c @@ -21,6 +21,10 @@ #include <config.h> #endif #ifdef BUILDCID +#define XFONT_CID 1 +#endif + +#ifdef XFONT_CID #ifndef FONTMODULE #include <stdio.h> #include <string.h> diff --git a/src/Type1/cidchar.c b/src/Type1/cidchar.c index c0d1498..20d2665 100644 --- a/src/Type1/cidchar.c +++ b/src/Type1/cidchar.c @@ -21,6 +21,10 @@ #include <config.h> #endif #ifdef BUILDCID +#define XFONT_CID 1 +#endif + +#if XFONT_CID #ifndef FONTMODULE #include <stdio.h> #include <string.h> diff --git a/src/Type1/fontfcn.c b/src/Type1/fontfcn.c index 5b13b5e..9b48b98 100644 --- a/src/Type1/fontfcn.c +++ b/src/Type1/fontfcn.c @@ -50,6 +50,10 @@ #ifdef HAVE_CONFIG_H #include <config.h> #endif +#ifdef BUILDCID +#define XFONT_CID 1 +#endif + #ifndef FONTMODULE #include <stdio.h> #include <string.h> @@ -60,9 +64,9 @@ #endif #include "t1imager.h" #include "util.h" -#ifdef BUILDCID +#if XFONT_CID #include "range.h" -#include "Xdefs.h" +#include <X11/Xdefs.h> #endif #include <X11/fonts/fntfilst.h> #include "fontfcn.h" @@ -72,7 +76,7 @@ extern struct segment *Type1Char ( char *env, XYspace S, psobj *osubrsP, struct blues_struct *bluesP, int *modeP ); -#ifdef BUILDCID +#if XFONT_CID extern struct xobject *CIDChar ( char *env, XYspace S, psobj *charstrP, psobj *subrsP, psobj *osubrsP, @@ -88,7 +92,7 @@ char *CurFontEnv; char *vm_base = NULL; psfont *FontP = NULL; psfont TheCurrentFont; -#ifdef BUILDCID +#if XFONT_CID char CurCIDFontName[CID_PATH_MAX]; char CurCMapName[CID_PATH_MAX]; cidfont *CIDFontP = NULL; @@ -125,7 +129,7 @@ SearchDictName(psdict *dictP, psobj *keyP) return(0); } -#ifdef BUILDCID +#if XFONT_CID static boolean initCIDFont(int cnt) { @@ -182,7 +186,7 @@ initFont(int cnt) vm_base = vm_next_byte(); if (!(Init_BuiltInEncoding())) return(FALSE); strcpy(CurFontName, ""); /* iniitialize to none */ -#ifdef BUILDCID +#if XFONT_CID /* cause a font data reset on the next CID-keyed font */ strcpy(CurCIDFontName, ""); /* initialize to none */ #endif @@ -193,7 +197,7 @@ initFont(int cnt) return(TRUE); } /***================================================================***/ -#ifdef BUILDCID +#if XFONT_CID static void resetCIDFont(char *cidfontname, char *cmapfile) { @@ -257,7 +261,7 @@ resetFont(char *env) } -#ifdef BUILDCID +#if XFONT_CID /***================================================================***/ int readCIDFont(char *cidfontname, char *cmapfile) @@ -314,7 +318,7 @@ readFont(char *env) rcode = scan_font(FontP); if (rcode == SCAN_OUT_OF_MEMORY) { /* free the memory and start again */ -#ifdef BUILDCID +#if XFONT_CID /* xfree(vm_base); */ #else xfree(vm_base); @@ -325,7 +329,7 @@ readFont(char *env) } resetFont(env); rcode = scan_font(FontP); -#ifdef BUILDCID +#if XFONT_CID /* only double the memory twice, then report error */ if (rcode == SCAN_OUT_OF_MEMORY) { /* free the memory and start again */ @@ -389,7 +393,7 @@ fontfcnB(struct XYspace *S, unsigned char *code, int *lenP, int *mode) return(charpath); } -#ifdef BUILDCID +#if XFONT_CID /***================================================================***/ /* CIDfontfcnA(cidfontname, cmapfile, mode) */ /* */ @@ -472,7 +476,7 @@ fontfcnA(char *env, int *mode) /* Has the FontP initialized? If not, then */ /* Initialize */ -#ifdef BUILDCID +#if XFONT_CID if (FontP == NULL || strcmp(CurFontName, "") == 0) { #else if (FontP == NULL) { @@ -501,7 +505,7 @@ fontfcnA(char *env, int *mode) } -#ifdef BUILDCID +#if XFONT_CID /***================================================================***/ /* CIDQueryFontLib(cidfontname,cmapfile,infoName,infoValue,rcodeP) */ /* */ @@ -683,7 +687,7 @@ QueryFontLib(char *env, char *infoName, else *rcodeP = 1; } -#ifdef BUILDCID +#if XFONT_CID struct xobject * CIDfontfcnC(struct XYspace *S, psobj *theStringP, psobj *SubrsArrayP, struct blues_struct *BluesP, diff --git a/src/Type1/fontfcn.h b/src/Type1/fontfcn.h index b53b4df..1409eb9 100644 --- a/src/Type1/fontfcn.h +++ b/src/Type1/fontfcn.h @@ -48,6 +48,15 @@ #ifdef BUILDCID +#define XFONT_CID 1 +#endif + +/* modular config.h defines VERSION as libXfont version */ +#ifdef VERSION +#undef VERSION +#endif + +#if XFONT_CID /* Definition of a PostScript CIDFont resource */ typedef struct cid_font { char *vm_start; @@ -89,7 +98,7 @@ struct blues_struct *BluesP; /***================================================================***/ extern boolean Init_BuiltInEncoding ( void ); -#ifdef BUILDCID +#if XFONT_CID extern int scan_cidfont ( cidfont *CIDFontP, cmapres *CMapP ); extern int scan_cidtype1font ( psfont *FontP ); #endif @@ -106,7 +115,7 @@ extern int scan_font ( psfont *FontP ); #define SCAN_FALSE -6 #define SCAN_END -7 -#ifdef BUILDCID +#if XFONT_CID /***================================================================***/ /* Name of CID FontInfo fields */ /***================================================================***/ @@ -183,7 +192,7 @@ extern int scan_font ( psfont *FontP ); #define RNDSTEMUP 15 #define EXPANSIONFACTOR 16 -#ifdef BUILDCID +#if XFONT_CID /***================================================================***/ /* Name of CID Type 1 Private values */ /***================================================================***/ @@ -210,29 +219,29 @@ extern int scan_font ( psfont *FontP ); #define CID_BITMAP_UNDEFINED 0 extern int SearchDictName ( psdict *dictP, psobj *keyP ); -#ifdef BUILDCID +#if XFONT_CID extern boolean initCIDType1Font ( void ); #endif extern boolean initFont ( int cnt ); -#ifdef BUILDCID +#if XFONT_CID extern int readCIDFont ( char *cidfontname, char *cmapfile ); extern int readCIDType1Font ( void ); #endif extern int readFont ( char *env ); extern struct xobject *fontfcnB ( struct XYspace *S, unsigned char *code, int *lenP, int *mode ); -#ifdef BUILDCID +#if XFONT_CID extern Bool CIDfontfcnA ( char *cidfontname, char *cmapfile, int *mode ); extern Bool CIDType1fontfcnA ( int *mode ); #endif extern Bool fontfcnA ( char *env, int *mode ); -#ifdef BUILDCID +#if XFONT_CID extern void CIDQueryFontLib ( char *cidfontname, char *cmapfile, char *infoName, pointer infoValue, int *rcodeP ); #endif extern void QueryFontLib ( char *env, char *infoName, pointer infoValue, int *rcodeP ); -#ifdef BUILDCID +#if XFONT_CID extern struct xobject *CIDfontfcnC ( struct XYspace *S, psobj *theStringP, psobj *SubrsArrayP, struct blues_struct *BluesP, int *lenP, diff --git a/src/Type1/objects.c b/src/Type1/objects.c index 70857a3..c86587d 100644 --- a/src/Type1/objects.c +++ b/src/Type1/objects.c @@ -61,6 +61,7 @@ you do do not need to include these header files. #include <string.h> #include <ctype.h> #include <stdarg.h> +#include <stdio.h> #else #include "Xdefs.h" /* Bool declaration */ #include "Xmd.h" /* INT32 declaration */ diff --git a/src/Type1/objects.h b/src/Type1/objects.h index 348297b..7552f98 100644 --- a/src/Type1/objects.h +++ b/src/Type1/objects.h @@ -47,6 +47,10 @@ /*SHARED*/ /*END SHARED*/ +#ifdef BUILDCID +#define XFONT_CID 1 +#endif + #include <X11/Xdefs.h> #include <X11/Xfuncproto.h> #ifndef FONTMODULE @@ -299,7 +303,7 @@ struct xobject { extern char MustCheckArgs INITIALIZED(TRUE); extern char MustTraceCalls INITIALIZED(FALSE); -#ifdef BUILDCID +#if XFONT_CID extern char MustCrash INITIALIZED(FALSE); #else extern char MustCrash INITIALIZED(TRUE); diff --git a/src/Type1/range.h b/src/Type1/range.h index c611e72..496f000 100644 --- a/src/Type1/range.h +++ b/src/Type1/range.h @@ -16,6 +16,10 @@ * Graphics, Inc. */ #ifdef BUILDCID +#define XFONT_CID 1 +#endif + +#if XFONT_CID #define CID_NAME_MAX 255 /* max # of characters in a file name */ #define CID_PATH_MAX 1024 /* max # of characters in a path name */ diff --git a/src/Type1/scanfont.c b/src/Type1/scanfont.c index 357c5fa..04e3fe2 100644 --- a/src/Type1/scanfont.c +++ b/src/Type1/scanfont.c @@ -1,4 +1,4 @@ -/* $XdotOrg: xc/lib/font/Type1/scanfont.c,v 1.3 2005/07/03 07:00:59 daniels Exp $ */ +/* $XdotOrg: xc/lib/font/Type1/scanfont.c,v 1.5 2005/07/09 23:18:27 keithp Exp $ */ /* $Xorg: scanfont.c,v 1.3 2000/08/17 19:46:32 cpqbld Exp $ */ /* Copyright International Business Machines,Corp. 1991 * All Rights Reserved @@ -51,6 +51,10 @@ #ifdef HAVE_CONFIG_H #include <config.h> #endif +#ifdef BUILDCID +#define XFONT_CID 1 +#endif + #ifndef FONTMODULE #include <string.h> #else @@ -61,7 +65,7 @@ #include "t1stdio.h" #include "util.h" #include "token.h" -#ifdef BUILDCID +#if XFONT_CID #include "range.h" #endif #include "objects.h" @@ -69,7 +73,7 @@ #include "fontfcn.h" #include "blues.h" -#ifdef BUILDCID +#if XFONT_CID #define CID_BUFSIZE 80 extern psfont *FDArrayP; @@ -625,7 +629,7 @@ getEncoding(psobj *arrayP) return (SCAN_ERROR); } /***================================================================***/ -#ifdef BUILDCID +#if XFONT_CID static int getFDArray(psobj *arrayP) { @@ -938,7 +942,7 @@ BuildCharStrings(psfont *FontP) } /***================================================================***/ -#ifdef BUILDCID +#if XFONT_CID /***================================================================***/ /* * BuildCIDFontInfo Dictionary @@ -1081,7 +1085,7 @@ BuildFontInfo(psfont *fontP) objFormatReal(&(dictP[UNDERLINETHICKNESS].value),0.0); return(SCAN_OK); } -#ifdef BUILDCID +#if XFONT_CID /***================================================================***/ /* * BuildCIDType1Private Dictionary @@ -1543,7 +1547,7 @@ FindDictValue(psdict *dictP) if ( V != SCAN_OK ) return(V); break; case OBJ_ARRAY: -#ifdef BUILDCID +#if XFONT_CID if (0 == strncmp(tokenStartP,"FDArray",7)) V = getFDArray(&(dictP[N].value)); else @@ -1607,7 +1611,7 @@ FindDictValue(psdict *dictP) } /***================================================================***/ -#ifdef BUILDCID +#if XFONT_CID /* * ------------------------------------------------------------------- * Scan the next token and convert it into an object diff --git a/src/Type1/spaces.c b/src/Type1/spaces.c index a193161..55cc96f 100644 --- a/src/Type1/spaces.c +++ b/src/Type1/spaces.c @@ -49,6 +49,7 @@ This module is responsible for handling the TYPE1IMAGER "XYspace" object. #include "xf86_ansic.h" #else #include "X11/Xos.h" +#include <stdio.h> #endif #include "objects.h" #include "spaces.h" diff --git a/src/Type1/t1funcs.c b/src/Type1/t1funcs.c index 8845e8e..9de819a 100644 --- a/src/Type1/t1funcs.c +++ b/src/Type1/t1funcs.c @@ -104,9 +104,13 @@ from The Open Group. #ifdef HAVE_CONFIG_H #include <config.h> #endif +#ifdef BUILDCID +#define XFONT_CID 1 +#endif + #ifndef FONTMODULE #include <string.h> -#ifdef BUILDCID +#if XFONT_CID #include <stdlib.h> #include <sys/types.h> #include <dirent.h> @@ -139,7 +143,7 @@ from The Open Group. #include <X11/fonts/fontenc.h> #include "t1unicode.h" -#ifdef BUILDCID +#if XFONT_CID #include "range.h" #endif @@ -157,7 +161,7 @@ static int Type1GetGlyphs ( FontPtr pFont, unsigned long count, unsigned char *chars, FontEncoding charEncoding, unsigned long *glyphCount, CharInfoPtr *glyphs ); -#ifdef BUILDCID +#if XFONT_CID #define CMapDir "/CMap/" #define CFMDir "/CFM/" #define CIDFontDir "/CIDFont/" @@ -178,7 +182,7 @@ static void fillrun ( char *p, pel x0, pel x1, int bit ); extern psfont *FontP; extern psobj *ISOLatin1EncArrayP; -#ifdef BUILDCID +#if XFONT_CID extern char CurCIDFontName[]; extern char CurCMapName[]; @@ -192,7 +196,7 @@ extern cmapres *CMapP; static void fill ( char *dest, int h, int w, struct region *area, int byte, int bit, int wordsize ); -#ifdef BUILDCID +#if XFONT_CID int CIDOpenScalable (FontPathElementPtr fpe, FontPtr *ppFont, @@ -552,7 +556,7 @@ Type1OpenScalable (FontPathElementPtr fpe, bzero(type1, sizeof(struct type1font)); /* heuristic for "maximum" size of pool we'll need: */ -#ifdef BUILDCID +#if XFONT_CID size = 400000 + 600 * #else size = 200000 + 600 * @@ -820,7 +824,7 @@ Type1OpenScalable (FontPathElementPtr fpe, return Successful; } -#ifdef BUILDCID +#if XFONT_CID unsigned int getCID(FontPtr pFont, unsigned int charcode) { @@ -1165,7 +1169,7 @@ Type1GetGlyphs(FontPtr pFont, #undef EXIST } -#ifdef BUILDCID +#if XFONT_CID static CharInfoRec nonExistantChar; int @@ -1240,7 +1244,7 @@ Type1GetMetrics(FontPtr pFont, return ret; } -#ifdef BUILDCID +#if XFONT_CID void CIDCloseFont(FontPtr pFont) { @@ -1434,14 +1438,14 @@ fillrun(char *p, /* address of this scan line */ #define CAPABILITIES (CAP_MATRIX | CAP_CHARSUBSETTING) -#ifdef BUILDCID +#if XFONT_CID FontRendererRec CIDRendererInfo[] = { { ".cid", 4, NULL, CIDOpenScalable, NULL, CIDGetInfoScalable, 0, CAPABILITIES } }; #endif -#ifdef BUILDCID +#if XFONT_CID FontRendererRec Type1RendererInfo[] = { #else static FontRendererRec renderers[] = { @@ -1452,7 +1456,7 @@ static FontRendererRec renderers[] = { NULL, Type1GetInfoScalable, 0, CAPABILITIES } }; -#ifdef BUILDCID +#if XFONT_CID void CIDRegisterFontFileFunctions(void) { @@ -1469,7 +1473,7 @@ Type1RegisterFontFileFunctions(void) { int i; -#ifdef BUILDCID +#if XFONT_CID Type1InitStdProps(); for (i=0; i < sizeof(Type1RendererInfo) / sizeof(FontRendererRec); i++) FontFilePriorityRegisterRenderer(&Type1RendererInfo[i], -10); @@ -1500,7 +1504,7 @@ Type1ReturnCodeToXReturnCode(int rc) /* fall through */ default: /* this should not happen */ -#ifdef BUILDCID +#if XFONT_CID ErrorF("Font return code cannot be converted to X return code: %d\n", rc); #else ErrorF("Type1 return code not convertable to X return code: %d\n", rc); @@ -1509,7 +1513,7 @@ Type1ReturnCodeToXReturnCode(int rc) } } -#ifdef BUILDCID +#if XFONT_CID CharInfoPtr CIDRenderGlyph(FontPtr pFont, psobj *charstringP, psobj *subarrayP, struct blues_struct *bluesP, CharInfoPtr pci, int *mode) diff --git a/src/Type1/t1info.c b/src/Type1/t1info.c index 900e63f..322572e 100644 --- a/src/Type1/t1info.c +++ b/src/Type1/t1info.c @@ -104,6 +104,10 @@ from The Open Group. #ifdef HAVE_CONFIG_H #include <config.h> #endif +#ifdef BUILDCID +#define XFONT_CID 1 +#endif + #include <X11/fonts/fntfilst.h> #include <X11/fonts/fontutil.h> #ifndef FONTMODULE @@ -116,7 +120,7 @@ from The Open Group. #endif #include <X11/fonts/FSproto.h> -#ifdef BUILDCID +#if XFONT_CID #ifndef FONTMODULE #ifdef _XOPEN_SOURCE #include <math.h> @@ -131,7 +135,7 @@ from The Open Group. #include "range.h" #endif -#ifdef BUILDCID +#if XFONT_CID #include "util.h" #include "fontfcn.h" @@ -154,7 +158,7 @@ enum scaleType { resolution_y, average_width }; -#ifdef BUILDCID +#if XFONT_CID extern cidfont *CIDFontP; static int stdpropsinit = 0; @@ -330,7 +334,7 @@ ComputeBounds(FontInfoPtr pInfo, CharInfoPtr pChars, FontScalablePtr Vals) FontComputeInfoAccelerators (pInfo); } -#ifdef BUILDCID +#if XFONT_CID #ifdef CID_ALL_CHARS void ComputeBoundsAllChars(FontPtr pFont, char *cfmfilename, double sxmult) @@ -597,7 +601,7 @@ ComputeProps(FontInfoPtr pInfo, FontScalablePtr Vals, char *Filename, } } -#ifdef BUILDCID +#if XFONT_CID #ifndef CID_ALL_CHARS static void CIDComputeStdProps(FontInfoPtr pInfo, FontScalablePtr Vals, @@ -874,7 +878,7 @@ ComputeStdProps(FontInfoPtr pInfo, FontScalablePtr Vals, } } -#ifdef BUILDCID +#if XFONT_CID /*ARGSUSED*/ int CIDGetInfoScalable(FontPathElementPtr fpe, @@ -934,7 +938,7 @@ Type1GetInfoScalable(FontPathElementPtr fpe, return Successful; } -#ifdef BUILDCID +#if XFONT_CID #ifndef CID_ALL_CHARS void CIDFillFontInfo(FontPtr pFont, FontScalablePtr Vals, @@ -1062,7 +1066,7 @@ T1FillFontInfo(FontPtr pFont, FontScalablePtr Vals, /* Called once, at renderer registration time */ void -#ifdef BUILDCID +#if XFONT_CID Type1InitStdProps(void) #else T1InitStdProps(void) @@ -1071,7 +1075,7 @@ T1InitStdProps(void) int i; fontProp *t; -#ifdef BUILDCID +#if XFONT_CID if (!stdpropsinit) { stdpropsinit = 1; i = sizeof(fontNamePropTable) / sizeof(fontProp); diff --git a/src/Type1/t1intf.h b/src/Type1/t1intf.h index 3a1f00b..831acc5 100644 --- a/src/Type1/t1intf.h +++ b/src/Type1/t1intf.h @@ -47,6 +47,10 @@ /* $XFree86: xc/lib/font/Type1/t1intf.h,v 1.6 2001/01/17 19:43:23 dawes Exp $ */ #ifdef BUILDCID +#define XFONT_CID 1 +#endif + +#if XFONT_CID #include "AFM.h" #endif @@ -55,7 +59,7 @@ struct type1font { CharInfoRec glyphs[256]; }; -#ifdef BUILDCID +#if XFONT_CID typedef struct cid_glyphs { char *CIDFontName; char *CMapName; @@ -75,7 +79,7 @@ typedef struct cid_glyphs { * Function prototypes */ /* t1funcs.c */ -#ifdef BUILDCID +#if XFONT_CID extern int CIDOpenScalable ( FontPathElementPtr fpe, FontPtr *ppFont, int flags, FontEntryPtr entry, char *fileName, FontScalablePtr vals, fsBitmapFormat format, @@ -87,7 +91,7 @@ extern int Type1OpenScalable ( FontPathElementPtr fpe, FontPtr *ppFont, FontScalablePtr vals, fsBitmapFormat format, fsBitmapFormatMask fmask, FontPtr non_cachable_font ); -#ifdef BUILDCID +#if XFONT_CID extern unsigned int getCID ( FontPtr pFont, unsigned int charcode ); extern int CIDGetGlyphs ( FontPtr pFont, unsigned long count, unsigned char *chars, FontEncoding charEncoding, @@ -99,7 +103,7 @@ extern void CIDCloseFont ( FontPtr pFont ); #endif extern void Type1CloseFont ( FontPtr pFont ); extern int Type1ReturnCodeToXReturnCode ( int rc ); -#ifdef BUILDCID +#if XFONT_CID extern CharInfoPtr CIDRenderGlyph ( FontPtr pFont, psobj *charstringP, psobj *subarrayP, struct blues_struct *bluesP, @@ -110,7 +114,7 @@ extern CharInfoPtr CIDRenderGlyph ( FontPtr pFont, psobj *charstringP, #ifdef CID_ALL_CHARS extern void ComputeBoundsAllChars ( FontPtr pFont, char *cfmfilename, double sxmult ); #endif -#ifdef BUILDCID +#if XFONT_CID extern int CIDGetInfoScalable ( FontPathElementPtr fpe, FontInfoPtr pInfo, FontEntryPtr entry, FontNamePtr fontName, char *fileName, FontScalablePtr Vals ); @@ -118,7 +122,7 @@ extern int CIDGetInfoScalable ( FontPathElementPtr fpe, FontInfoPtr pInfo, extern int Type1GetInfoScalable ( FontPathElementPtr fpe, FontInfoPtr pInfo, FontEntryPtr entry, FontNamePtr fontName, char *fileName, FontScalablePtr Vals ); -#ifdef BUILDCID +#if XFONT_CID extern void CIDFillFontInfo ( FontPtr pFont, FontScalablePtr Vals, char *Filename, char *Fontname, char *Cmapname, #ifdef HAVE_CFM diff --git a/src/Type1/t1io.c b/src/Type1/t1io.c index fdf6972..42b8bb6 100644 --- a/src/Type1/t1io.c +++ b/src/Type1/t1io.c @@ -53,6 +53,10 @@ #ifdef HAVE_CONFIG_H #include <config.h> #endif +#ifdef BUILDCID +#define XFONT_CID 1 +#endif + #ifndef STATIC #define STATIC static #endif @@ -88,7 +92,7 @@ STATIC unsigned char TheBuffer[F_BUFSIZ]; static int T1Decrypt ( unsigned char *p, int len ); static int T1Fill ( F_FILE *f ); -#ifdef BUILDCID +#if XFONT_CID void resetDecrypt(void) { @@ -254,7 +258,7 @@ T1eexec(F_FILE *f) /* Stream descriptor */ return (T1Feof(f))?NULL:f; } /* end eexec */ -#ifdef BUILDCID +#if XFONT_CID F_FILE * /* Initialization */ CIDeexec(F_FILE *f) /* Stream descriptor */ { diff --git a/src/Type1/t1malloc.c b/src/Type1/t1malloc.c index f59a949..20d4212 100644 --- a/src/Type1/t1malloc.c +++ b/src/Type1/t1malloc.c @@ -41,7 +41,9 @@ routines (malloc/free). #ifdef HAVE_CONFIG_H #include <config.h> #endif -#ifdef FONTMODULE +#ifndef FONTMODULE +#include <stdio.h> +#else #include "Xdefs.h" /* Bool declaration */ #include "Xmd.h" /* INT32 declaration */ #include "os.h" diff --git a/src/Type1/t1stdio.h b/src/Type1/t1stdio.h index cc4ba9d..2ed0832 100644 --- a/src/Type1/t1stdio.h +++ b/src/Type1/t1stdio.h @@ -29,6 +29,10 @@ */ /* $XFree86: xc/lib/font/Type1/t1stdio.h,v 1.9 2001/01/17 19:43:24 dawes Exp $ */ /* T1IO FILE structure and related stuff */ +#ifdef BUILDCID +#define XFONT_CID 1 +#endif + #ifdef XFree86LOADER #undef FILE #endif @@ -68,7 +72,7 @@ typedef struct F_FILE { #define T1Feof(f) (((f)->flags & FIOEOF) && ((f)->b_cnt==0)) -#ifdef BUILDCID +#if XFONT_CID extern F_FILE *CIDeexec ( FILE *f ); #endif diff --git a/src/Type1/type1.c b/src/Type1/type1.c index c929a35..b3fa496 100644 --- a/src/Type1/type1.c +++ b/src/Type1/type1.c @@ -67,6 +67,10 @@ #ifdef HAVE_CONFIG_H #include <config.h> #endif +#ifdef BUILDCID +#define XFONT_CID 1 +#endif + #ifndef FONTMODULE #include <stdio.h> /* a system-dependent include, usually */ #include <math.h> @@ -95,7 +99,7 @@ typedef struct xobject xobject; #define MAXPSFAKESTACK 32 /* Max depth of fake PostScript stack (local) */ #define MAXSTRLEN 512 /* Max length of a Type 1 string (local) */ #define MAXLABEL 256 /* Maximum number of new hints */ -#ifdef BUILDCID +#if XFONT_CID #define MAXSTEMS 500 /* Maximum number of VSTEM and HSTEM hints */ #else #define MAXSTEMS 128 /* Maximum number of VSTEM and HSTEM hints */ @@ -167,7 +171,7 @@ struct stem { /* representation of a STEM hint */ struct xobject *Type1Char(char *env, struct XYspace *S, psobj *charstrP, psobj *subrsP, psobj *osubrsP, struct blues_struct *bluesP, int *modeP); -#ifdef BUILDCID +#if XFONT_CID struct xobject *CIDChar(char *env, struct XYspace *S, psobj *charstrP, psobj *subrsP, psobj *osubrsP, struct blues_struct *bluesP, int *modeP); @@ -1146,7 +1150,7 @@ Escape(int Code) if (Top < Num+1) Error; for (i = 0; i < Num; i++) PSFakePush(Stack[Top - i - 2]); Top -= Num + 2; -#ifdef BUILDCID +#if XFONT_CID if ((int)Stack[Top + Num + 2] > 3) ClearPSFakeStack(); else @@ -1829,7 +1833,7 @@ Type1Char(char *env, struct XYspace *S, psobj *charstrP, psobj *subrsP, return((struct xobject *) path); } -#ifdef BUILDCID +#if XFONT_CID struct xobject * CIDChar(char *env, struct XYspace *S, psobj *charstrP, psobj *subrsP, psobj *osubrsP, diff --git a/src/Type1/util.c b/src/Type1/util.c index 1c6048b..5b6d5a8 100644 --- a/src/Type1/util.c +++ b/src/Type1/util.c @@ -50,6 +50,10 @@ #ifdef HAVE_CONFIG_H #include <config.h> #endif +#ifdef BUILDCID +#define XFONT_CID 1 +#endif + #ifndef FONTMODULE #include <stdio.h> #else @@ -71,7 +75,7 @@ static char *vm_base = NULL; /* Start of virtual memory area */ boolean vm_init(int cnt) { -#ifdef BUILDCID +#if XFONT_CID if (vm_base == NULL || (vm_base != NULL && vm_size != cnt)) { if (vm_base != NULL) xfree(vm_base); vm_next = vm_base = (char *)xalloc (cnt); diff --git a/src/Type1/util.h b/src/Type1/util.h index ad4ad14..a1a8b3e 100644 --- a/src/Type1/util.h +++ b/src/Type1/util.h @@ -49,6 +49,9 @@ #ifndef UTIL_H #define UTIL_H +#ifdef BUILDCID +#define XFONT_CID 1 +#endif #ifndef boolean typedef int boolean; @@ -80,7 +83,7 @@ typedef int boolean; /* this is the size of memory allocated for reading fonts */ -#ifdef BUILDCID +#if XFONT_CID #define VM_SIZE (100*1024) #else #define VM_SIZE (50*1024) |