aboutsummaryrefslogtreecommitdiff
path: root/libXfont/src/bitmap/bitmapfunc.c
diff options
context:
space:
mode:
Diffstat (limited to 'libXfont/src/bitmap/bitmapfunc.c')
-rw-r--r--libXfont/src/bitmap/bitmapfunc.c43
1 files changed, 21 insertions, 22 deletions
diff --git a/libXfont/src/bitmap/bitmapfunc.c b/libXfont/src/bitmap/bitmapfunc.c
index 653ff5d55..049c39967 100644
--- a/libXfont/src/bitmap/bitmapfunc.c
+++ b/libXfont/src/bitmap/bitmapfunc.c
@@ -32,34 +32,25 @@ in this Software without prior written authorization from The Open Group.
#include <config.h>
#endif
-/*
- * Translate monolithic #defines to modular definitions
- */
-
-#ifdef PCFFORMAT
-#define XFONT_PCFFORMAT 1
-#endif
-
-#ifdef SNFFORMAT
-#define XFONT_SNFFORMAT 1
-#endif
-
-#ifdef BDFFORMAT
-#define XFONT_BDFFORMAT 1
-#endif
-
#include <X11/fonts/fntfilst.h>
#include <X11/fonts/bitmap.h>
#include <X11/fonts/fontutil.h>
+#if XFONT_BDFFORMAT
#include <X11/fonts/bdfint.h>
+#endif
+#if XFONT_PCFFORMAT
#include <X11/fonts/pcf.h>
+#endif
+#if XFONT_SNFFORMAT
#include "snfstr.h"
+#endif
+#if XFONT_PCFFORMAT || XFONT_SNFFORMAT || XFONT_BDFFORMAT
typedef struct _BitmapFileFunctions {
- int (*ReadFont) (FontPtr /* pFont */, FontFilePtr /* file */,
- int /* bit */, int /* byte */,
+ int (*ReadFont) (FontPtr /* pFont */, FontFilePtr /* file */,
+ int /* bit */, int /* byte */,
int /* glyph */, int /* scan */);
- int (*ReadInfo) ( FontInfoPtr /* pFontInfo */,
+ int (*ReadInfo) ( FontInfoPtr /* pFontInfo */,
FontFilePtr /* file */ );
} BitmapFileFunctionsRec, *BitmapFileFunctionsPtr;
@@ -108,8 +99,8 @@ static BitmapFileFunctionsRec readers[] = {
#define CAPABILITIES (CAP_MATRIX | CAP_CHARSUBSETTING)
static int
-BitmapOpenBitmap (FontPathElementPtr fpe, FontPtr *ppFont, int flags,
- FontEntryPtr entry, char *fileName,
+BitmapOpenBitmap (FontPathElementPtr fpe, FontPtr *ppFont, int flags,
+ FontEntryPtr entry, char *fileName,
fsBitmapFormat format, fsBitmapFormatMask fmask,
FontPtr non_cachable_font) /* We don't do licensing */
{
@@ -153,7 +144,7 @@ BitmapOpenBitmap (FontPathElementPtr fpe, FontPtr *ppFont, int flags,
}
static int
-BitmapGetInfoBitmap (FontPathElementPtr fpe, FontInfoPtr pFontInfo,
+BitmapGetInfoBitmap (FontPathElementPtr fpe, FontInfoPtr pFontInfo,
FontEntryPtr entry, char *fileName)
{
FontFilePtr file;
@@ -254,3 +245,11 @@ BitmapGetRenderIndex(FontRendererPtr renderer)
{
return renderer - renderers;
}
+
+#else
+void
+BitmapRegisterFontFileFunctions (void)
+{
+ /* nothing to do */
+}
+#endif /* XFONT_PCFFORMAT || XFONT_SNFFORMAT || XFONT_BDFFORMAT */