summaryrefslogtreecommitdiff
path: root/src/bitmap
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2005-07-09 23:31:40 +0000
committerKeith Packard <keithp@keithp.com>2005-07-09 23:31:40 +0000
commitcd24fcabc449bbc701a25e3cad279009dec69032 (patch)
tree376db045ef698d82c05bfe0804472abb849954c3 /src/bitmap
parent428dd333c1c1a96d205d8236c6ecee32dbf7cac9 (diff)
Switch from monolithic configuration symbols to modular ones, add backwardXORG-6_8_99_16XORG-6_8_99_15
compatibility for monolithic symbols
Diffstat (limited to 'src/bitmap')
-rw-r--r--src/bitmap/bitmapfunc.c32
-rw-r--r--src/bitmap/bitscale.c32
2 files changed, 52 insertions, 12 deletions
diff --git a/src/bitmap/bitmapfunc.c b/src/bitmap/bitmapfunc.c
index 36356fd..e6187e5 100644
--- a/src/bitmap/bitmapfunc.c
+++ b/src/bitmap/bitmapfunc.c
@@ -36,6 +36,22 @@ 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>
@@ -58,28 +74,28 @@ typedef struct _BitmapFileFunctions {
*
*/
static BitmapFileFunctionsRec readers[] = {
-#ifdef PCFFORMAT
+#if XFONT_PCFFORMAT
{ pcfReadFont, pcfReadFontInfo} ,
{ pcfReadFont, pcfReadFontInfo} ,
#ifdef X_GZIP_FONT_COMPRESSION
{ pcfReadFont, pcfReadFontInfo} ,
#endif
#endif
-#ifdef SNFFORMAT
+#if XFONT_SNFFORMAT
{ snfReadFont, snfReadFontInfo},
{ snfReadFont, snfReadFontInfo},
#ifdef X_GZIP_FONT_COMPRESSION
{ snfReadFont, snfReadFontInfo} ,
#endif
#endif
-#ifdef BDFFORMAT
+#if XFONT_BDFFORMAT
{ bdfReadFont, bdfReadFontInfo} ,
{ bdfReadFont, bdfReadFontInfo} ,
#ifdef X_GZIP_FONT_COMPRESSION
{ bdfReadFont, bdfReadFontInfo} ,
#endif
#endif
-#ifdef PCFFORMAT
+#if XFONT_PCFFORMAT
{ pmfReadFont, pcfReadFontInfo} ,
#endif
};
@@ -88,7 +104,7 @@ static BitmapFileFunctionsRec readers[] = {
#define CAPABILITIES (CAP_MATRIX | CAP_CHARSUBSETTING)
static FontRendererRec renderers[] = {
-#ifdef PCFFORMAT
+#if XFONT_PCFFORMAT
{ ".pcf", 4, BitmapOpenBitmap, BitmapOpenScalable,
BitmapGetInfoBitmap, BitmapGetInfoScalable, 0,
CAPABILITIES },
@@ -102,7 +118,7 @@ static FontRendererRec renderers[] = {
CAPABILITIES },
#endif
#endif
-#ifdef SNFFORMAT
+#if XFONT_SNFFORMAT
{ ".snf", 4, BitmapOpenBitmap, BitmapOpenScalable,
BitmapGetInfoBitmap, BitmapGetInfoScalable, 0,
CAPABILITIES },
@@ -115,7 +131,7 @@ static FontRendererRec renderers[] = {
CAPABILITIES },
#endif
#endif
-#ifdef BDFFORMAT
+#if XFONT_BDFFORMAT
{ ".bdf", 4, BitmapOpenBitmap, BitmapOpenScalable,
BitmapGetInfoBitmap, BitmapGetInfoScalable, 0,
CAPABILITIES },
@@ -128,7 +144,7 @@ static FontRendererRec renderers[] = {
CAPABILITIES },
#endif
#endif
-#ifdef PCFFORMAT
+#if XFONT_PCFFORMAT
{ ".pmf", 4, BitmapOpenBitmap, BitmapOpenScalable,
BitmapGetInfoBitmap, BitmapGetInfoScalable, 0,
CAPABILITIES }
diff --git a/src/bitmap/bitscale.c b/src/bitmap/bitscale.c
index 3e49ecf..8f7247e 100644
--- a/src/bitmap/bitscale.c
+++ b/src/bitmap/bitscale.c
@@ -36,6 +36,22 @@ 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>
@@ -89,28 +105,28 @@ typedef FontPtr (*ScaleFunc) ( FontPtr /* pf */,
/* These next two arrays must be kept in step with the renderer array */
ScaleFunc scale[] =
{
-#ifdef PCFFORMAT
+#if XFONT_PCFFORMAT
BitmapScaleBitmaps,
BitmapScaleBitmaps,
#ifdef X_GZIP_FONT_COMPRESSION
BitmapScaleBitmaps,
#endif
#endif
-#ifdef SNFFORMAT
+#if XFONT_SNFFORMAT
BitmapScaleBitmaps,
BitmapScaleBitmaps,
#ifdef X_GZIP_FONT_COMPRESSION
BitmapScaleBitmaps,
#endif
#endif
-#ifdef BDFFORMAT
+#if XFONT_BDFFORMAT
BitmapScaleBitmaps,
BitmapScaleBitmaps,
#ifdef X_GZIP_FONT_COMPRESSION
BitmapScaleBitmaps,
#endif
#endif
-#ifdef PCFFORMAT
+#if XFONT_PCFFORMAT
PrinterScaleBitmaps,
#endif
};
@@ -139,22 +155,30 @@ typedef FontEntryPtr (*FindToScale) (FontPathElementPtr fpe,
FontPathElementPtr *fpep);
FindToScale find_scale[] =
{
+#if XFONT_PCFFORMAT
FindBestToScale,
FindBestToScale,
#ifdef X_GZIP_FONT_COMPRESSION
FindBestToScale,
#endif
+#endif
+#if XFONT_SNFFORMAT
FindBestToScale,
FindBestToScale,
#ifdef X_GZIP_FONT_COMPRESSION
FindBestToScale,
#endif
+#endif
+#if XFONT_BDFFORMAT
FindBestToScale,
FindBestToScale,
#ifdef X_GZIP_FONT_COMPRESSION
FindBestToScale,
#endif
+#endif
+#if XFONT_PCFFORMAT
FindPmfToScale,
+#endif
};
static unsigned long bitscaleGeneration = 0; /* initialization flag */