summaryrefslogtreecommitdiff
path: root/src/Type1/fontfcn.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/Type1/fontfcn.c')
-rw-r--r--src/Type1/fontfcn.c32
1 files changed, 18 insertions, 14 deletions
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,