summaryrefslogtreecommitdiff
path: root/src/bitmap
diff options
context:
space:
mode:
Diffstat (limited to 'src/bitmap')
-rw-r--r--src/bitmap/bitmapfunc.c100
-rw-r--r--src/bitmap/bitscale.c4
-rw-r--r--src/bitmap/snfread.c2
-rw-r--r--src/bitmap/snfstr.h1
4 files changed, 53 insertions, 54 deletions
diff --git a/src/bitmap/bitmapfunc.c b/src/bitmap/bitmapfunc.c
index e6187e5..81fc5c0 100644
--- a/src/bitmap/bitmapfunc.c
+++ b/src/bitmap/bitmapfunc.c
@@ -103,55 +103,7 @@ static BitmapFileFunctionsRec readers[] = {
#define CAPABILITIES (CAP_MATRIX | CAP_CHARSUBSETTING)
-static FontRendererRec renderers[] = {
-#if XFONT_PCFFORMAT
- { ".pcf", 4, BitmapOpenBitmap, BitmapOpenScalable,
- BitmapGetInfoBitmap, BitmapGetInfoScalable, 0,
- CAPABILITIES },
- { ".pcf.Z", 6, BitmapOpenBitmap, BitmapOpenScalable,
- BitmapGetInfoBitmap, BitmapGetInfoScalable, 0,
- CAPABILITIES },
-#ifdef X_GZIP_FONT_COMPRESSION
- { ".pcf.gz", 7,
- BitmapOpenBitmap, BitmapOpenScalable,
- BitmapGetInfoBitmap, BitmapGetInfoScalable, 0,
- CAPABILITIES },
-#endif
-#endif
-#if XFONT_SNFFORMAT
- { ".snf", 4, BitmapOpenBitmap, BitmapOpenScalable,
- BitmapGetInfoBitmap, BitmapGetInfoScalable, 0,
- CAPABILITIES },
- { ".snf.Z", 6, BitmapOpenBitmap, BitmapOpenScalable,
- BitmapGetInfoBitmap, BitmapGetInfoScalable, 0,
- CAPABILITIES },
-#ifdef X_GZIP_FONT_COMPRESSION
- { ".snf.gz", 7, BitmapOpenBitmap, BitmapOpenScalable,
- BitmapGetInfoBitmap, BitmapGetInfoScalable, 0,
- CAPABILITIES },
-#endif
-#endif
-#if XFONT_BDFFORMAT
- { ".bdf", 4, BitmapOpenBitmap, BitmapOpenScalable,
- BitmapGetInfoBitmap, BitmapGetInfoScalable, 0,
- CAPABILITIES },
- { ".bdf.Z", 6, BitmapOpenBitmap, BitmapOpenScalable,
- BitmapGetInfoBitmap, BitmapGetInfoScalable, 0,
- CAPABILITIES },
-#ifdef X_GZIP_FONT_COMPRESSION
- { ".bdf.gz", 7, BitmapOpenBitmap, BitmapOpenScalable,
- BitmapGetInfoBitmap, BitmapGetInfoScalable, 0,
- CAPABILITIES },
-#endif
-#endif
-#if XFONT_PCFFORMAT
- { ".pmf", 4, BitmapOpenBitmap, BitmapOpenScalable,
- BitmapGetInfoBitmap, BitmapGetInfoScalable, 0,
- CAPABILITIES }
-#endif
-};
-
-int
+static int
BitmapOpenBitmap (FontPathElementPtr fpe, FontPtr *ppFont, int flags,
FontEntryPtr entry, char *fileName,
fsBitmapFormat format, fsBitmapFormatMask fmask,
@@ -196,7 +148,7 @@ BitmapOpenBitmap (FontPathElementPtr fpe, FontPtr *ppFont, int flags,
return ret;
}
-int
+static int
BitmapGetInfoBitmap (FontPathElementPtr fpe, FontInfoPtr pFontInfo,
FontEntryPtr entry, char *fileName)
{
@@ -217,6 +169,54 @@ BitmapGetInfoBitmap (FontPathElementPtr fpe, FontInfoPtr pFontInfo,
return ret;
}
+static FontRendererRec renderers[] = {
+#if XFONT_PCFFORMAT
+ { ".pcf", 4, BitmapOpenBitmap, BitmapOpenScalable,
+ BitmapGetInfoBitmap, BitmapGetInfoScalable, 0,
+ CAPABILITIES },
+ { ".pcf.Z", 6, BitmapOpenBitmap, BitmapOpenScalable,
+ BitmapGetInfoBitmap, BitmapGetInfoScalable, 0,
+ CAPABILITIES },
+#ifdef X_GZIP_FONT_COMPRESSION
+ { ".pcf.gz", 7,
+ BitmapOpenBitmap, BitmapOpenScalable,
+ BitmapGetInfoBitmap, BitmapGetInfoScalable, 0,
+ CAPABILITIES },
+#endif
+#endif
+#if XFONT_SNFFORMAT
+ { ".snf", 4, BitmapOpenBitmap, BitmapOpenScalable,
+ BitmapGetInfoBitmap, BitmapGetInfoScalable, 0,
+ CAPABILITIES },
+ { ".snf.Z", 6, BitmapOpenBitmap, BitmapOpenScalable,
+ BitmapGetInfoBitmap, BitmapGetInfoScalable, 0,
+ CAPABILITIES },
+#ifdef X_GZIP_FONT_COMPRESSION
+ { ".snf.gz", 7, BitmapOpenBitmap, BitmapOpenScalable,
+ BitmapGetInfoBitmap, BitmapGetInfoScalable, 0,
+ CAPABILITIES },
+#endif
+#endif
+#if XFONT_BDFFORMAT
+ { ".bdf", 4, BitmapOpenBitmap, BitmapOpenScalable,
+ BitmapGetInfoBitmap, BitmapGetInfoScalable, 0,
+ CAPABILITIES },
+ { ".bdf.Z", 6, BitmapOpenBitmap, BitmapOpenScalable,
+ BitmapGetInfoBitmap, BitmapGetInfoScalable, 0,
+ CAPABILITIES },
+#ifdef X_GZIP_FONT_COMPRESSION
+ { ".bdf.gz", 7, BitmapOpenBitmap, BitmapOpenScalable,
+ BitmapGetInfoBitmap, BitmapGetInfoScalable, 0,
+ CAPABILITIES },
+#endif
+#endif
+#if XFONT_PCFFORMAT
+ { ".pmf", 4, BitmapOpenBitmap, BitmapOpenScalable,
+ BitmapGetInfoBitmap, BitmapGetInfoScalable, 0,
+ CAPABILITIES }
+#endif
+};
+
#define numRenderers (sizeof renderers / sizeof renderers[0])
void
diff --git a/src/bitmap/bitscale.c b/src/bitmap/bitscale.c
index e60aab5..958dc2d 100644
--- a/src/bitmap/bitscale.c
+++ b/src/bitmap/bitscale.c
@@ -103,7 +103,7 @@ typedef FontPtr (*ScaleFunc) ( FontPtr /* pf */,
FontScalablePtr /* vals */);
/* These next two arrays must be kept in step with the renderer array */
-ScaleFunc scale[] =
+static const ScaleFunc scale[] =
{
#if XFONT_PCFFORMAT
BitmapScaleBitmaps,
@@ -153,7 +153,7 @@ typedef FontEntryPtr (*FindToScale) (FontPathElementPtr fpe,
double *dxp, double *dyp,
double *sdxp, double *sdyp,
FontPathElementPtr *fpep);
-FindToScale find_scale[] =
+static const FindToScale find_scale[] =
{
#if XFONT_PCFFORMAT
FindBestToScale,
diff --git a/src/bitmap/snfread.c b/src/bitmap/snfread.c
index 01b6bf3..f48e2d8 100644
--- a/src/bitmap/snfread.c
+++ b/src/bitmap/snfread.c
@@ -65,7 +65,7 @@ from The Open Group.
#include <stdarg.h>
-void
+static void
snfError(const char* message, ...)
{
va_list args;
diff --git a/src/bitmap/snfstr.h b/src/bitmap/snfstr.h
index 8158089..531b19c 100644
--- a/src/bitmap/snfstr.h
+++ b/src/bitmap/snfstr.h
@@ -180,6 +180,5 @@ extern void SnfSetFormat ( int bit, int byte, int glyph, int scan );
extern int snfReadFont ( FontPtr pFont, FontFilePtr file,
int bit, int byte, int glyph, int scan );
extern int snfReadFontInfo ( FontInfoPtr pFontInfo, FontFilePtr file );
-extern void snfError( const char* message, ... );
#endif /* SNFSTR_H */