summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorKaleb Keithley <kaleb@freedesktop.org>2003-11-17 19:03:42 +0000
committerKaleb Keithley <kaleb@freedesktop.org>2003-11-17 19:03:42 +0000
commit94817d4f3277d927bf96431c24033d8cd67d9a30 (patch)
tree2e4b857f2103cfbcdfcfd53b47334166e139a273 /include
parent3795e9702b3b3a6fe0594d09cdd110adeb5e42f9 (diff)
merge XFree86 4.3.0.1 to -CURRENT
Diffstat (limited to 'include')
-rw-r--r--include/X11/fonts/bdfint.h28
-rw-r--r--include/X11/fonts/bitmap.h62
-rw-r--r--include/X11/fonts/bufio.h96
-rw-r--r--include/X11/fonts/fntfil.h110
-rw-r--r--include/X11/fonts/fntfilio.h18
-rw-r--r--include/X11/fonts/fntfilst.h44
-rw-r--r--include/X11/fonts/fontmisc.h62
-rw-r--r--include/X11/fonts/fontxlfd.h8
-rw-r--r--include/X11/fonts/pcf.h8
9 files changed, 306 insertions, 130 deletions
diff --git a/include/X11/fonts/bdfint.h b/include/X11/fonts/bdfint.h
index 04e4c41..c389bfb 100644
--- a/include/X11/fonts/bdfint.h
+++ b/include/X11/fonts/bdfint.h
@@ -27,6 +27,7 @@ other dealings in this Software without prior written authorization
from The Open Group.
*/
+/* $XFree86: xc/lib/font/bitmap/bdfint.h,v 1.5 2001/12/14 19:56:45 dawes Exp $ */
#ifndef BDFINT_H
#define BDFINT_H
@@ -67,16 +68,23 @@ typedef struct BDFSTAT {
BOOL haveDefaultCh;
} bdfFileState;
-extern unsigned char *bdfGetLine();
+extern void bdfError ( char * message, ... );
+extern void bdfWarning ( char *message, ... );
+extern unsigned char * bdfGetLine ( FontFilePtr file, unsigned char *buf,
+ int len );
+extern Atom bdfForceMakeAtom ( char *str, int *size );
+extern Atom bdfGetPropertyValue ( char *s );
+extern int bdfIsInteger ( char *str );
+extern unsigned char bdfHexByte ( unsigned char *s );
+extern Bool bdfSpecialProperty ( FontPtr pFont, FontPropPtr prop,
+ char isString, bdfFileState *bdfState );
+extern int bdfReadFont( FontPtr pFont, FontFilePtr file,
+ int bit, int byte, int glyph, int scan );
+extern int bdfReadFontInfo( FontInfoPtr pFontInfo, FontFilePtr file );
-extern void bdfError(
-#if NeedVarargsPrototypes
- char* message, ...
-#endif
-);
-extern void bdfWarning();
-extern Atom bdfForceMakeAtom();
-extern Atom bdfGetPropertyValue();
-extern unsigned char bdfHexByte();
+extern void FontCharInkMetrics ( FontPtr pFont, CharInfoPtr pCI,
+ xCharInfo *pInk );
+extern void FontCharReshape ( FontPtr pFont, CharInfoPtr pSrc,
+ CharInfoPtr pDst );
#endif /* BDFINT_H */
diff --git a/include/X11/fonts/bitmap.h b/include/X11/fonts/bitmap.h
index 027b869..29989e3 100644
--- a/include/X11/fonts/bitmap.h
+++ b/include/X11/fonts/bitmap.h
@@ -27,6 +27,7 @@ other dealings in this Software without prior written authorization
from The Open Group.
*/
+/* $XFree86: xc/lib/font/include/bitmap.h,v 1.10 2001/12/14 19:56:53 dawes Exp $ */
/*
* Author: Keith Packard, MIT X Consortium
@@ -35,13 +36,20 @@ from The Open Group.
#ifndef _BITMAP_H_
#define _BITMAP_H_
-#include <fntfilio.h>
+#include "fntfilio.h"
+#ifndef FONTMODULE
#include <stdio.h> /* just for NULL */
+#else
+#include "xf86_ansic.h"
+#endif
/*
* Internal format used to store bitmap fonts
*/
+/* number of encoding entries in one segment */
+#define BITMAP_FONT_SEGMENT_SIZE 128
+
typedef struct _BitmapExtra {
Atom *glyphNames;
int *sWidths;
@@ -56,17 +64,53 @@ typedef struct _BitmapFont {
CharInfoPtr metrics; /* font metrics, including glyph pointers */
xCharInfo *ink_metrics; /* ink metrics */
char *bitmaps; /* base of bitmaps, useful only to free */
- CharInfoPtr *encoding; /* array of char info pointers */
+ CharInfoPtr **encoding; /* array of arrays of char info pointers */
CharInfoPtr pDefault; /* default character */
BitmapExtraPtr bitmapExtra; /* stuff not used by X server */
} BitmapFontRec, *BitmapFontPtr;
-extern int bitmapReadFont(), bitmapReadFontInfo();
-extern int bitmapGetGlyphs(), bitmapGetMetrics();
-extern int bitmapGetBitmaps(), bitmapGetExtents();
-extern void bitmapUnloadFont();
-
-extern void bitmapComputeFontBounds();
-extern void bitmapComputeFontInkBounds();
+#define ACCESSENCODING(enc,i) \
+(enc[(i)/BITMAP_FONT_SEGMENT_SIZE]?\
+(enc[(i)/BITMAP_FONT_SEGMENT_SIZE][(i)%BITMAP_FONT_SEGMENT_SIZE]):\
+0)
+#define ACCESSENCODINGL(enc,i) \
+(enc[(i)/BITMAP_FONT_SEGMENT_SIZE][(i)%BITMAP_FONT_SEGMENT_SIZE])
+
+#define SEGMENT_MAJOR(n) ((n)/BITMAP_FONT_SEGMENT_SIZE)
+#define SEGMENT_MINOR(n) ((n)%BITMAP_FONT_SEGMENT_SIZE)
+#define NUM_SEGMENTS(n) \
+ (((n)+BITMAP_FONT_SEGMENT_SIZE-1)/BITMAP_FONT_SEGMENT_SIZE)
+
+extern int bitmapGetGlyphs ( FontPtr pFont, unsigned long count,
+ unsigned char *chars, FontEncoding charEncoding,
+ unsigned long *glyphCount, CharInfoPtr *glyphs );
+extern int bitmapGetMetrics ( FontPtr pFont, unsigned long count,
+ unsigned char *chars, FontEncoding charEncoding,
+ unsigned long *glyphCount, xCharInfo **glyphs );
+
+extern void bitmapComputeFontBounds ( FontPtr pFont );
+extern void bitmapComputeFontInkBounds ( FontPtr pFont );
+extern Bool bitmapAddInkMetrics ( FontPtr pFont );
+extern int bitmapComputeWeight ( FontPtr pFont );
+
+extern int BitmapOpenBitmap ( FontPathElementPtr fpe, FontPtr *ppFont,
+ int flags, FontEntryPtr entry, char *fileName,
+ fsBitmapFormat format, fsBitmapFormatMask fmask,
+ FontPtr non_cachable_font );
+extern int BitmapGetInfoBitmap ( FontPathElementPtr fpe,
+ FontInfoPtr pFontInfo, FontEntryPtr entry,
+ char *fileName );
+extern void BitmapRegisterFontFileFunctions ( void );
+extern int BitmapGetRenderIndex ( FontRendererPtr renderer );
+
+extern int BitmapOpenScalable ( FontPathElementPtr fpe, FontPtr *pFont,
+ int flags, FontEntryPtr entry, char *fileName,
+ FontScalablePtr vals, fsBitmapFormat format,
+ fsBitmapFormatMask fmask,
+ FontPtr non_cachable_font );
+extern int BitmapGetInfoScalable ( FontPathElementPtr fpe,
+ FontInfoPtr pFontInfo, FontEntryPtr entry,
+ FontNamePtr fontName, char *fileName,
+ FontScalablePtr vals );
#endif /* _BITMAP_H_ */
diff --git a/include/X11/fonts/bufio.h b/include/X11/fonts/bufio.h
index 493f3ce..402685f 100644
--- a/include/X11/fonts/bufio.h
+++ b/include/X11/fonts/bufio.h
@@ -27,6 +27,12 @@ other dealings in this Software without prior written authorization
from The Open Group.
*/
+/* $XFree86: xc/lib/font/include/bufio.h,v 1.7 2001/12/14 19:56:53 dawes Exp $ */
+
+#ifndef ___BUFIO_H___
+#define ___BUFIO_H___ 1
+
+#include <X11/Xfuncproto.h>
#ifdef TEST
@@ -39,80 +45,41 @@ from The Open Group.
#define BUFFILEEOF -1
typedef unsigned char BufChar;
+typedef struct _buffile *BufFilePtr;
typedef struct _buffile {
BufChar *bufp;
int left;
+ int eof;
BufChar buffer[BUFFILESIZE];
- int (*io)(/* BufFilePtr f */);
- int (*skip)(/* BufFilePtr f, int count */);
- int (*close)(/* BufFilePtr f */);
+ int (*input)( BufFilePtr /* f */);
+ int (*output)( int /* c */, BufFilePtr /* f */);
+ int (*skip)( BufFilePtr /* f */, int /* count */);
+ int (*close)( BufFilePtr /* f */, int /* doClose */);
char *private;
-} BufFileRec, *BufFilePtr;
+} BufFileRec;
-extern BufFilePtr BufFileCreate (
-#if NeedFunctionPrototypes
+extern BufFilePtr BufFileCreate (
char*,
- int (*)(),
- int (*)(),
- int (*)()
-#endif
-);
-extern BufFilePtr BufFileOpenRead (
-#if NeedFunctionPrototypes
- int
-#endif
-);
-
-extern BufFilePtr BufFileOpenWrite (
-#if NeedFunctionPrototypes
- int
-#endif
-);
-
-extern BufFilePtr BufFilePushCompressed (
-#if NeedFunctionPrototypes
- BufFilePtr
-#endif
-);
+ int (*)(BufFilePtr),
+ int (*)(int, BufFilePtr),
+ int (*)(BufFilePtr, int),
+ int (*)(BufFilePtr, int));
+extern BufFilePtr BufFileOpenRead ( int );
+extern BufFilePtr BufFileOpenWrite ( int );
+extern BufFilePtr BufFilePushCompressed ( BufFilePtr );
#ifdef X_GZIP_FONT_COMPRESSION
-extern BufFilePtr BufFilePushZIP (
-#if NeedFunctionPrototypes
- BufFilePtr
-#endif
-);
-#endif
-extern int BufFileClose (
-#if NeedFunctionPrototypes
- BufFilePtr,
- int
+extern BufFilePtr BufFilePushZIP ( BufFilePtr );
#endif
-);
-extern int BufFileFlush (
-#if NeedFunctionPrototypes
- BufFilePtr
-#endif
-);
+extern int BufFileClose ( BufFilePtr, int );
+extern int BufFileFlush ( BufFilePtr, int );
+extern int BufFileRead ( BufFilePtr, char*, int );
+extern int BufFileWrite ( BufFilePtr, char*, int );
+extern void BufFileFree ( BufFilePtr );
-extern int BufFileRead (
-#if NeedFunctionPrototypes
- BufFilePtr,
- char*,
- int
-#endif
-);
-
-extern int BufFileWrite (
-#if NeedFunctionPrototypes
- BufFilePtr,
- char*,
- int
-#endif
-);
-
-#define BufFileGet(f) ((f)->left-- ? *(f)->bufp++ : (*(f)->io) (f))
-#define BufFilePut(c,f) (--(f)->left ? *(f)->bufp++ = (c) : (*(f)->io) (c,f))
-#define BufFileSkip(f,c) ((*(f)->skip) (f, c))
+#define BufFileGet(f) ((f)->left-- ? *(f)->bufp++ : ((f)->eof = (*(f)->input) (f)))
+#define BufFilePut(c,f) (--(f)->left ? *(f)->bufp++ = ((unsigned char)(c)) : (*(f)->output) ((unsigned char)(c),f))
+#define BufFileSkip(f,c) ((f)->eof = (*(f)->skip) (f, c))
#ifndef TRUE
#define TRUE 1
@@ -120,3 +87,6 @@ extern int BufFileWrite (
#ifndef FALSE
#define FALSE 0
#endif
+
+#endif /* ___BUFIO_H___ */
+
diff --git a/include/X11/fonts/fntfil.h b/include/X11/fonts/fntfil.h
index 6999e51..a8d9780 100644
--- a/include/X11/fonts/fntfil.h
+++ b/include/X11/fonts/fntfil.h
@@ -25,6 +25,7 @@ used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
*/
+/* $XFree86: xc/lib/font/include/fntfil.h,v 1.10 2002/12/09 17:30:00 dawes Exp $ */
/*
* Author: Keith Packard, MIT X Consortium
@@ -32,6 +33,9 @@ in this Software without prior written authorization from The Open Group.
#ifndef _FONTFILE_H_
#define _FONTFILE_H_
+
+#include "fontxlfd.h"
+
typedef struct _FontEntry *FontEntryPtr;
typedef struct _FontTable *FontTablePtr;
typedef struct _FontName *FontNamePtr;
@@ -71,10 +75,104 @@ typedef struct _FontRenderer *FontRendererPtr;
#define FontAliasFile "fonts.alias"
#define FontScalableFile "fonts.scale"
-extern FontEntryPtr FontFileFindNameInDir ();
-extern FontEntryPtr FontFileFindNameInScalableDir ();
-extern FontDirectoryPtr FontFileMakeDir ();
-extern FontRendererPtr FontFileMatchRenderer ();
-extern char *FontFileSaveString ();
-extern FontScaledPtr FontFileFindScaledInstance ();
+extern int FontFileNameCheck ( char *name );
+extern int FontFileInitFPE ( FontPathElementPtr fpe );
+extern int FontFileResetFPE ( FontPathElementPtr fpe );
+extern int FontFileFreeFPE ( FontPathElementPtr fpe );
+extern int FontFileOpenFont ( pointer client, FontPathElementPtr fpe,
+ Mask flags, char *name, int namelen,
+ fsBitmapFormat format, fsBitmapFormatMask fmask,
+ XID id, FontPtr *pFont, char **aliasName,
+ FontPtr non_cachable_font );
+extern void FontFileCloseFont ( FontPathElementPtr fpe, FontPtr pFont );
+extern int FontFileOpenBitmap ( FontPathElementPtr fpe, FontPtr *pFont,
+ int flags, FontEntryPtr entry,
+ fsBitmapFormat format,
+ fsBitmapFormatMask fmask );
+extern int FontFileListFonts ( pointer client, FontPathElementPtr fpe,
+ char *pat, int len, int max,
+ FontNamesPtr names );
+extern int FontFileStartListFontsWithInfo ( pointer client,
+ FontPathElementPtr fpe,
+ char *pat, int len, int max,
+ pointer *privatep );
+extern int FontFileListNextFontWithInfo ( pointer client,
+ FontPathElementPtr fpe,
+ char **namep, int *namelenp,
+ FontInfoPtr *pFontInfo,
+ int *numFonts, pointer private );
+extern int FontFileStartListFontsAndAliases ( pointer client,
+ FontPathElementPtr fpe,
+ char *pat, int len, int max,
+ pointer *privatep );
+extern int FontFileListNextFontOrAlias ( pointer client,
+ FontPathElementPtr fpe,
+ char **namep, int *namelenp,
+ char **resolvedp, int *resolvedlenp,
+ pointer private );
+extern void FontFileRegisterLocalFpeFunctions ( void );
+
+
+extern FontEntryPtr FontFileAddEntry ( FontTablePtr table,
+ FontEntryPtr prototype );
+extern Bool FontFileAddFontAlias ( FontDirectoryPtr dir, char *aliasName,
+ char *fontName );
+extern Bool FontFileAddFontFile ( FontDirectoryPtr dir, char *fontName,
+ char *fileName );
+extern int FontFileCountDashes ( char *name, int namelen );
+extern FontEntryPtr FontFileFindNameInDir ( FontTablePtr table,
+ FontNamePtr pat );
+extern FontEntryPtr FontFileFindNameInScalableDir ( FontTablePtr table,
+ FontNamePtr pat,
+ FontScalablePtr vals );
+extern int FontFileFindNamesInDir ( FontTablePtr table, FontNamePtr pat,
+ int max, FontNamesPtr names );
+extern int FontFileFindNamesInScalableDir ( FontTablePtr table,
+ FontNamePtr pat, int max,
+ FontNamesPtr names,
+ FontScalablePtr vals,
+ int alias_behavior, int *newmax );
+
+extern void FontFileFreeDir ( FontDirectoryPtr dir );
+extern void FontFileFreeEntry ( FontEntryPtr entry );
+extern void FontFileFreeTable ( FontTablePtr table );
+extern Bool FontFileInitTable ( FontTablePtr table, int size );
+extern FontDirectoryPtr FontFileMakeDir ( char *dirName, int size );
+extern Bool FontFileMatchName ( char *name, int length, FontNamePtr pat );
+extern char * FontFileSaveString ( char *s );
+extern void FontFileSortDir ( FontDirectoryPtr dir );
+extern void FontFileSortTable ( FontTablePtr table );
+
+extern void FontDefaultFormat ( int *bit, int *byte, int *glyph, int *scan );
+
+extern Bool FontFileRegisterRenderer ( FontRendererPtr renderer );
+extern Bool FontFilePriorityRegisterRenderer ( FontRendererPtr renderer,
+ int priority );
+extern FontRendererPtr FontFileMatchRenderer ( char *fileName );
+
+extern Bool FontFileAddScaledInstance ( FontEntryPtr entry,
+ FontScalablePtr vals, FontPtr pFont,
+ char *bitmapName );
+extern void FontFileSwitchStringsToBitmapPointers ( FontDirectoryPtr dir );
+extern void FontFileRemoveScaledInstance ( FontEntryPtr entry, FontPtr pFont );
+extern Bool FontFileCompleteXLFD ( FontScalablePtr vals, FontScalablePtr def );
+extern FontScaledPtr FontFileFindScaledInstance ( FontEntryPtr entry,
+ FontScalablePtr vals,
+ int noSpecificSize );
+
+extern Bool FontFileRegisterBitmapSource ( FontPathElementPtr fpe );
+extern void FontFileUnregisterBitmapSource ( FontPathElementPtr fpe );
+extern void FontFileEmptyBitmapSource ( void );
+extern int FontFileMatchBitmapSource ( FontPathElementPtr fpe,
+ FontPtr *pFont, int flags,
+ FontEntryPtr entry,
+ FontNamePtr zeroPat,
+ FontScalablePtr vals,
+ fsBitmapFormat format,
+ fsBitmapFormatMask fmask,
+ Bool noSpecificSize );
+
+extern int FontFileReadDirectory ( char *directory, FontDirectoryPtr *pdir );
+extern Bool FontFileDirectoryChanged ( FontDirectoryPtr dir );
+
#endif /* _FONTFILE_H_ */
diff --git a/include/X11/fonts/fntfilio.h b/include/X11/fonts/fntfilio.h
index ffb146b..1044da0 100644
--- a/include/X11/fonts/fntfilio.h
+++ b/include/X11/fonts/fntfilio.h
@@ -25,12 +25,16 @@ used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
*/
+/* $XFree86: xc/lib/font/include/fntfilio.h,v 1.7 2001/12/14 19:56:54 dawes Exp $ */
/*
* Author: Keith Packard, MIT X Consortium
*/
-#include <bufio.h>
+#ifndef _FNTFILIO_H_
+#define _FNTFILIO_H_
+
+#include "bufio.h"
typedef BufFilePtr FontFilePtr;
@@ -43,8 +47,10 @@ typedef BufFilePtr FontFilePtr;
#define FontFileEOF BUFFILEEOF
-extern FontFilePtr FontFileOpen ();
-extern FontFilePtr FontFileOpenWrite ();
-extern FontFilePtr FontFileOpenFd ();
-extern FontFilePtr FontFileOpenWriteFd ();
-extern int FontFileClose ();
+extern FontFilePtr FontFileOpen ( const char *name );
+extern int FontFileClose ( FontFilePtr f );
+extern FontFilePtr FontFileOpenWrite ( const char *name );
+extern FontFilePtr FontFileOpenWriteFd ( int fd );
+extern FontFilePtr FontFileOpenFd ( int fd );
+
+#endif /* _FNTFILIO_H_ */
diff --git a/include/X11/fonts/fntfilst.h b/include/X11/fonts/fntfilst.h
index 8e90090..8be46f2 100644
--- a/include/X11/fonts/fntfilst.h
+++ b/include/X11/fonts/fntfilst.h
@@ -25,6 +25,7 @@ used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
*/
+/* $XFree86: xc/lib/font/include/fntfilst.h,v 3.9 2002/12/10 22:23:52 tsi Exp $ */
/*
* Author: Keith Packard, MIT X Consortium
@@ -33,13 +34,15 @@ in this Software without prior written authorization from The Open Group.
#ifndef _FONTFILEST_H_
#define _FONTFILEST_H_
+#ifndef FONTMODULE
#include <X11/Xos.h>
+#endif
#ifndef XP_PSTEXT
#include "fontmisc.h"
#endif
#include "fontstruct.h"
-#include "fntfil.h"
#include "fontxlfd.h"
+#include "fntfil.h"
typedef struct _FontName {
char *name;
@@ -116,6 +119,7 @@ typedef struct _FontDirectory {
unsigned long alias_mtime;
FontTableRec scalable;
FontTableRec nonScalable;
+ char *attributes;
} FontDirectoryRec;
/* Capability bits: for definition of capabilities bitmap in the
@@ -127,17 +131,45 @@ typedef struct _FontDirectory {
typedef struct _FontRenderer {
char *fileSuffix;
int fileSuffixLen;
- int (*OpenBitmap)(/* fpe, pFont, flags, entry, fileName, format, fmask */);
- int (*OpenScalable)(/* fpe, pFont, flags, entry, fileName, vals, format, fmask */);
- int (*GetInfoBitmap)(/* fpe, pFontInfo, entry, fileName */);
- int (*GetInfoScalable)(/* fpe, pFontInfo, entry, fileName, vals */);
+ int (*OpenBitmap)(FontPathElementPtr /* fpe */,
+ FontPtr * /* pFont */,
+ int /* flags */,
+ FontEntryPtr /* entry */,
+ char * /* fileName */,
+ fsBitmapFormat /* format */,
+ fsBitmapFormatMask /* mask */,
+ FontPtr /* non_cachable_font */);
+ int (*OpenScalable)(FontPathElementPtr /* fpe */,
+ FontPtr * /* pFont */,
+ int /* flags */,
+ FontEntryPtr /* entry */,
+ char * /* fileName */,
+ FontScalablePtr /* vals */,
+ fsBitmapFormat /* format */,
+ fsBitmapFormatMask /* fmask */,
+ FontPtr /* non_cachable_font */);
+ int (*GetInfoBitmap)(FontPathElementPtr /* fpe */,
+ FontInfoPtr /* pFontInfo */,
+ FontEntryPtr /* entry */,
+ char * /*fileName */);
+ int (*GetInfoScalable)(FontPathElementPtr /* fpe */,
+ FontInfoPtr /* pFontInfo */,
+ FontEntryPtr /* entry */,
+ FontNamePtr /* fontName */,
+ char * /* fileName */,
+ FontScalablePtr /* vals */);
int number;
int capabilities; /* Bitmap components defined above */
} FontRendererRec;
typedef struct _FontRenders {
int number;
- FontRendererPtr *renderers;
+ struct _FontRenderersElement {
+ /* In order to preserve backward compatibility, the
+ priority field is made invisible to renderers */
+ FontRendererPtr renderer;
+ int priority;
+ } *renderers;
} FontRenderersRec, *FontRenderersPtr;
typedef struct _BitmapInstance {
diff --git a/include/X11/fonts/fontmisc.h b/include/X11/fonts/fontmisc.h
index 22ee61e..6439ba1 100644
--- a/include/X11/fonts/fontmisc.h
+++ b/include/X11/fonts/fontmisc.h
@@ -25,6 +25,7 @@ used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
*/
+/* $XFree86: xc/lib/font/include/fontmisc.h,v 3.16 2001/12/14 19:56:54 dawes Exp $ */
/*
* Author: Keith Packard, MIT X Consortium
@@ -33,13 +34,9 @@ in this Software without prior written authorization from The Open Group.
#ifndef _FONTMISC_H_
#define _FONTMISC_H_
+#ifndef FONTMODULE
#include <X11/Xfuncs.h>
-
-#ifndef X_NOT_STDC_ENV
#include <stdlib.h>
-#else
-extern int rand();
-#endif
#include <stdio.h>
#ifndef X_NOT_POSIX
@@ -48,19 +45,10 @@ extern int rand();
extern int close();
#endif
-typedef unsigned char *pointer;
-typedef int Bool;
+#endif /* FONTMODULE */
+
+#include "X11/Xdefs.h"
-#ifndef X_PROTOCOL
-#ifndef _XSERVER64
-typedef unsigned long Atom;
-typedef unsigned long XID;
-#else
-#include <X11/Xmd.h>
-typedef CARD32 XID;
-typedef CARD32 Atom;
-#endif
-#endif
#ifndef LSBFirst
#define LSBFirst 0
@@ -76,49 +64,69 @@ typedef CARD32 Atom;
#define FALSE 0
#endif
-extern char *NameForAtom ();
+extern Atom MakeAtom ( char *string, unsigned len, int makeit );
+extern int ValidAtom ( Atom atom );
+extern char *NameForAtom (Atom atom);
+
+#ifndef OS_H
+extern pointer Xalloc(unsigned long);
+extern pointer Xrealloc(pointer, unsigned long);
+extern void Xfree(pointer);
+extern pointer Xcalloc(unsigned long);
+#endif
+extern int f_strcasecmp(const char *s1, const char *s2);
+#ifndef xalloc
#define xalloc(n) Xalloc ((unsigned) n)
#define xfree(p) Xfree ((pointer) p)
#define xrealloc(p,n) Xrealloc ((pointer)p,n)
+#define xcalloc(n,s) Xcalloc((unsigned) n * (unsigned) s)
+#endif
#define lowbit(x) ((x) & (~(x) + 1))
-#define assert(x)
+#undef assert
+#define assert(x) ((void)0)
+
+#ifndef strcasecmp
+#if defined(NEED_STRCASECMP) && !defined(FONTMODULE)
+#define strcasecmp(s1,s2) f_strcasecmp(s1,s2)
+#endif
+#endif
extern void
BitOrderInvert(
-#if NeedFunctionPrototypes
register unsigned char *,
register int
-#endif
);
extern void
TwoByteSwap(
-#if NeedFunctionPrototypes
register unsigned char *,
register int
-#endif
);
extern void
FourByteSwap(
-#if NeedFunctionPrototypes
register unsigned char *,
register int
-#endif
);
extern int
RepadBitmap (
-#if NeedFunctionPrototypes
char*,
char*,
unsigned,
unsigned,
int,
int
-#endif
);
+extern void CopyISOLatin1Lowered(
+ char * /*dest*/,
+ char * /*source*/,
+ int /*length*/
+);
+
+extern void register_fpe_functions(void);
+
#endif /* _FONTMISC_H_ */
diff --git a/include/X11/fonts/fontxlfd.h b/include/X11/fonts/fontxlfd.h
index 759d41e..49769bc 100644
--- a/include/X11/fonts/fontxlfd.h
+++ b/include/X11/fonts/fontxlfd.h
@@ -27,6 +27,7 @@ other dealings in this Software without prior written authorization
from The Open Group.
*/
+/* $XFree86: xc/lib/font/include/fontxlfd.h,v 1.6 2001/12/14 19:56:55 dawes Exp $ */
/*
* Author: Keith Packard, MIT X Consortium
@@ -63,7 +64,6 @@ from The Open Group.
#define XLFD_NDIGITS 3 /* Round numbers in pixel and
point arrays to this many
digits for repeatability */
-double xlfd_round_double();
typedef struct _FontScalable {
int values_supplied; /* Bitmap identifying what advanced
@@ -87,8 +87,10 @@ typedef struct _FontScalable {
fsRange *ranges;
} FontScalableRec, *FontScalablePtr;
-extern Bool FontParseXLFDName();
-extern fsRange *FontParseRanges();
+
+extern double xlfd_round_double ( double x );
+extern Bool FontParseXLFDName ( char *fname, FontScalablePtr vals, int subst );
+extern fsRange *FontParseRanges ( char *name, int *nranges );
#define FONT_XLFD_REPLACE_NONE 0
#define FONT_XLFD_REPLACE_STAR 1
diff --git a/include/X11/fonts/pcf.h b/include/X11/fonts/pcf.h
index 510a8a6..57f739d 100644
--- a/include/X11/fonts/pcf.h
+++ b/include/X11/fonts/pcf.h
@@ -27,6 +27,7 @@ other dealings in this Software without prior written authorization
from The Open Group.
*/
+/* $XFree86: xc/lib/font/bitmap/pcf.h,v 1.4 2001/12/14 19:56:47 dawes Exp $ */
/*
* Author: Keith Packard, MIT X Consortium
@@ -88,4 +89,11 @@ typedef struct _PCFTable {
#define PCF_GLYPH_NAMES (1<<7)
#define PCF_BDF_ACCELERATORS (1<<8)
+extern int pcfReadFont ( FontPtr pFont, FontFilePtr file,
+ int bit, int byte, int glyph, int scan );
+extern int pcfReadFontInfo ( FontInfoPtr pFontInfo, FontFilePtr file );
+extern int pmfReadFont ( FontPtr pFont, FontFilePtr file,
+ int bit, int byte, int glyph, int scan );
+extern int pcfWriteFont ( FontPtr pFont, FontFilePtr file );
+
#endif /* _PCF_H_ */