diff options
author | marha <marha@users.sourceforge.net> | 2011-09-12 11:27:51 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2011-09-12 11:27:51 +0200 |
commit | dafebc5bb70303f0b5baf0b087cf4d9a64b5c7f0 (patch) | |
tree | bdf833cc6a4fc9035411779e10dd9e8478201885 /libXfont/include/X11/fonts | |
parent | 0b40f5f4b54453a77f4b09c431f8efc6875da61f (diff) | |
download | vcxsrv-dafebc5bb70303f0b5baf0b087cf4d9a64b5c7f0.tar.gz vcxsrv-dafebc5bb70303f0b5baf0b087cf4d9a64b5c7f0.tar.bz2 vcxsrv-dafebc5bb70303f0b5baf0b087cf4d9a64b5c7f0.zip |
Synchronised line endinge with release branch
Diffstat (limited to 'libXfont/include/X11/fonts')
-rw-r--r-- | libXfont/include/X11/fonts/bdfint.h | 174 | ||||
-rw-r--r-- | libXfont/include/X11/fonts/bitmap.h | 202 | ||||
-rw-r--r-- | libXfont/include/X11/fonts/bufio.h | 166 | ||||
-rw-r--r-- | libXfont/include/X11/fonts/fntfil.h | 358 | ||||
-rw-r--r-- | libXfont/include/X11/fonts/fntfilio.h | 106 | ||||
-rw-r--r-- | libXfont/include/X11/fonts/fntfilst.h | 386 | ||||
-rw-r--r-- | libXfont/include/X11/fonts/fontencc.h | 70 | ||||
-rw-r--r-- | libXfont/include/X11/fonts/fontmisc.h | 200 | ||||
-rw-r--r-- | libXfont/include/X11/fonts/fontshow.h | 70 | ||||
-rw-r--r-- | libXfont/include/X11/fonts/fontutil.h | 48 | ||||
-rw-r--r-- | libXfont/include/X11/fonts/fontxlfd.h | 194 | ||||
-rw-r--r-- | libXfont/include/X11/fonts/pcf.h | 194 |
12 files changed, 1084 insertions, 1084 deletions
diff --git a/libXfont/include/X11/fonts/bdfint.h b/libXfont/include/X11/fonts/bdfint.h index 3663ed5b7..913f660df 100644 --- a/libXfont/include/X11/fonts/bdfint.h +++ b/libXfont/include/X11/fonts/bdfint.h @@ -1,87 +1,87 @@ -/*
-
-Copyright 1990, 1998 The Open Group
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice shall be included
-in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
-OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of The Open Group shall
-not be used in advertising or otherwise to promote the sale, use or
-other dealings in this Software without prior written authorization
-from The Open Group.
-
-*/
-
-#ifndef BDFINT_H
-#define BDFINT_H
-
-#define bdfIsPrefix(buf,str) (!strncmp((char *)buf,str,strlen(str)))
-#define bdfStrEqual(s1,s2) (!strcmp(s1,s2))
-
-#define BDF_GENPROPS 6
-#define NullProperty ((FontPropPtr)0)
-
-/*
- * This structure holds some properties we need to generate if they aren't
- * specified in the BDF file and some other values read from the file
- * that we'll need to calculate them. We need to keep track of whether
- * or not we've read them.
- */
-typedef struct BDFSTAT {
- int linenum;
- char *fileName;
- char fontName[MAXFONTNAMELEN];
- float pointSize;
- int resolution_x;
- int resolution_y;
- int digitCount;
- int digitWidths;
- int exHeight;
-
- FontPropPtr fontProp;
- FontPropPtr pointSizeProp;
- FontPropPtr resolutionXProp;
- FontPropPtr resolutionYProp;
- FontPropPtr resolutionProp;
- FontPropPtr xHeightProp;
- FontPropPtr weightProp;
- FontPropPtr quadWidthProp;
- BOOL haveFontAscent;
- BOOL haveFontDescent;
- BOOL haveDefaultCh;
-} bdfFileState;
-
-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 FontCharInkMetrics ( FontPtr pFont, CharInfoPtr pCI,
- xCharInfo *pInk );
-extern void FontCharReshape ( FontPtr pFont, CharInfoPtr pSrc,
- CharInfoPtr pDst );
-
-#endif /* BDFINT_H */
+/* + +Copyright 1990, 1998 The Open Group + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall +not be used in advertising or otherwise to promote the sale, use or +other dealings in this Software without prior written authorization +from The Open Group. + +*/ + +#ifndef BDFINT_H +#define BDFINT_H + +#define bdfIsPrefix(buf,str) (!strncmp((char *)buf,str,strlen(str))) +#define bdfStrEqual(s1,s2) (!strcmp(s1,s2)) + +#define BDF_GENPROPS 6 +#define NullProperty ((FontPropPtr)0) + +/* + * This structure holds some properties we need to generate if they aren't + * specified in the BDF file and some other values read from the file + * that we'll need to calculate them. We need to keep track of whether + * or not we've read them. + */ +typedef struct BDFSTAT { + int linenum; + char *fileName; + char fontName[MAXFONTNAMELEN]; + float pointSize; + int resolution_x; + int resolution_y; + int digitCount; + int digitWidths; + int exHeight; + + FontPropPtr fontProp; + FontPropPtr pointSizeProp; + FontPropPtr resolutionXProp; + FontPropPtr resolutionYProp; + FontPropPtr resolutionProp; + FontPropPtr xHeightProp; + FontPropPtr weightProp; + FontPropPtr quadWidthProp; + BOOL haveFontAscent; + BOOL haveFontDescent; + BOOL haveDefaultCh; +} bdfFileState; + +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 FontCharInkMetrics ( FontPtr pFont, CharInfoPtr pCI, + xCharInfo *pInk ); +extern void FontCharReshape ( FontPtr pFont, CharInfoPtr pSrc, + CharInfoPtr pDst ); + +#endif /* BDFINT_H */ diff --git a/libXfont/include/X11/fonts/bitmap.h b/libXfont/include/X11/fonts/bitmap.h index 6a0960485..c02342759 100644 --- a/libXfont/include/X11/fonts/bitmap.h +++ b/libXfont/include/X11/fonts/bitmap.h @@ -1,101 +1,101 @@ -/*
-
-Copyright 1990, 1998 The Open Group
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice shall be included
-in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
-OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of The Open Group shall
-not be used in advertising or otherwise to promote the sale, use or
-other dealings in this Software without prior written authorization
-from The Open Group.
-
-*/
-
-/*
- * Author: Keith Packard, MIT X Consortium
- */
-
-#ifndef _BITMAP_H_
-#define _BITMAP_H_
-
-#include <X11/fonts/fntfilio.h>
-#include <stdio.h> /* just for NULL */
-
-/*
- * 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;
- CARD32 bitmapsSizes[GLYPHPADOPTIONS];
- FontInfoRec info;
-} BitmapExtraRec, *BitmapExtraPtr;
-
-typedef struct _BitmapFont {
- unsigned version_num;
- int num_chars;
- int num_tables;
- 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 arrays of char info pointers */
- CharInfoPtr pDefault; /* default character */
- BitmapExtraPtr bitmapExtra; /* stuff not used by X server */
-} BitmapFontRec, *BitmapFontPtr;
-
-#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 void BitmapRegisterFontFileFunctions ( void );
-
-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_ */
+/* + +Copyright 1990, 1998 The Open Group + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall +not be used in advertising or otherwise to promote the sale, use or +other dealings in this Software without prior written authorization +from The Open Group. + +*/ + +/* + * Author: Keith Packard, MIT X Consortium + */ + +#ifndef _BITMAP_H_ +#define _BITMAP_H_ + +#include <X11/fonts/fntfilio.h> +#include <stdio.h> /* just for NULL */ + +/* + * 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; + CARD32 bitmapsSizes[GLYPHPADOPTIONS]; + FontInfoRec info; +} BitmapExtraRec, *BitmapExtraPtr; + +typedef struct _BitmapFont { + unsigned version_num; + int num_chars; + int num_tables; + 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 arrays of char info pointers */ + CharInfoPtr pDefault; /* default character */ + BitmapExtraPtr bitmapExtra; /* stuff not used by X server */ +} BitmapFontRec, *BitmapFontPtr; + +#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 void BitmapRegisterFontFileFunctions ( void ); + +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/libXfont/include/X11/fonts/bufio.h b/libXfont/include/X11/fonts/bufio.h index 77d9ecee1..e7a9f4a35 100644 --- a/libXfont/include/X11/fonts/bufio.h +++ b/libXfont/include/X11/fonts/bufio.h @@ -1,83 +1,83 @@ -/*
-
-Copyright 1993, 1998 The Open Group
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice shall be included
-in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
-OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of The Open Group shall
-not be used in advertising or otherwise to promote the sale, use or
-other dealings in this Software without prior written authorization
-from The Open Group.
-
-*/
-
-#ifndef ___BUFIO_H___
-#define ___BUFIO_H___ 1
-
-#include <X11/Xfuncproto.h>
-
-#define BUFFILESIZE 8192
-#define BUFFILEEOF -1
-
-typedef unsigned char BufChar;
-typedef struct _buffile *BufFilePtr;
-
-typedef struct _buffile {
- BufChar *bufp;
- int left;
- int eof;
- BufChar buffer[BUFFILESIZE];
- 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;
-
-extern BufFilePtr BufFileCreate (
- char*,
- 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 ( BufFilePtr );
-#endif
-#ifdef X_BZIP2_FONT_COMPRESSION
-extern BufFilePtr BufFilePushBZIP2 ( BufFilePtr );
-#endif
-extern int BufFileClose ( BufFilePtr, int );
-extern int BufFileRead ( BufFilePtr, char*, int );
-extern int BufFileWrite ( BufFilePtr, char*, int );
-
-#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
-#endif
-#ifndef FALSE
-#define FALSE 0
-#endif
-
-#endif /* ___BUFIO_H___ */
-
+/* + +Copyright 1993, 1998 The Open Group + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall +not be used in advertising or otherwise to promote the sale, use or +other dealings in this Software without prior written authorization +from The Open Group. + +*/ + +#ifndef ___BUFIO_H___ +#define ___BUFIO_H___ 1 + +#include <X11/Xfuncproto.h> + +#define BUFFILESIZE 8192 +#define BUFFILEEOF -1 + +typedef unsigned char BufChar; +typedef struct _buffile *BufFilePtr; + +typedef struct _buffile { + BufChar *bufp; + int left; + int eof; + BufChar buffer[BUFFILESIZE]; + 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; + +extern BufFilePtr BufFileCreate ( + char*, + 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 ( BufFilePtr ); +#endif +#ifdef X_BZIP2_FONT_COMPRESSION +extern BufFilePtr BufFilePushBZIP2 ( BufFilePtr ); +#endif +extern int BufFileClose ( BufFilePtr, int ); +extern int BufFileRead ( BufFilePtr, char*, int ); +extern int BufFileWrite ( BufFilePtr, char*, int ); + +#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 +#endif +#ifndef FALSE +#define FALSE 0 +#endif + +#endif /* ___BUFIO_H___ */ + diff --git a/libXfont/include/X11/fonts/fntfil.h b/libXfont/include/X11/fonts/fntfil.h index 63558517c..25d1f3054 100644 --- a/libXfont/include/X11/fonts/fntfil.h +++ b/libXfont/include/X11/fonts/fntfil.h @@ -1,179 +1,179 @@ -/*
-
-Copyright 1991, 1998 The Open Group
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of The Open Group shall not be
-used in advertising or otherwise to promote the sale, use or other dealings
-in this Software without prior written authorization from The Open Group.
-
-*/
-
-/*
- * Author: Keith Packard, MIT X Consortium
- */
-
-#ifndef _FONTFILE_H_
-#define _FONTFILE_H_
-
-#include <X11/fonts/fontxlfd.h>
-
-typedef struct _FontEntry *FontEntryPtr;
-typedef struct _FontTable *FontTablePtr;
-typedef struct _FontName *FontNamePtr;
-typedef struct _FontScaled *FontScaledPtr;
-typedef struct _FontScalableExtra *FontScalableExtraPtr;
-typedef struct _FontScalableEntry *FontScalableEntryPtr;
-typedef struct _FontScaleAliasEntry *FontScaleAliasEntryPtr;
-typedef struct _FontBitmapEntry *FontBitmapEntryPtr;
-typedef struct _FontAliasEntry *FontAliasEntryPtr;
-typedef struct _FontBCEntry *FontBCEntryPtr;
-typedef struct _FontDirectory *FontDirectoryPtr;
-typedef struct _FontRenderer *FontRendererPtr;
-
-#define NullFontEntry ((FontEntryPtr) 0)
-#define NullFontTable ((FontTablePtr) 0)
-#define NullFontName ((FontNamePtr) 0)
-#define NullFontScaled ((FontScaled) 0)
-#define NullFontScalableExtra ((FontScalableExtra) 0)
-#define NullFontscalableEntry ((FontScalableEntry) 0)
-#define NullFontScaleAliasEntry ((FontScaleAliasEntry) 0)
-#define NullFontBitmapEntry ((FontBitmapEntry) 0)
-#define NullFontAliasEntry ((FontAliasEntry) 0)
-#define NullFontBCEntry ((FontBCEntry) 0)
-#define NullFontDirectory ((FontDirectoryPtr) 0)
-#define NullFontRenderer ((FontRendererPtr) 0)
-
-#define FONT_ENTRY_SCALABLE 0
-#define FONT_ENTRY_SCALE_ALIAS 1
-#define FONT_ENTRY_BITMAP 2
-#define FONT_ENTRY_ALIAS 3
-#define FONT_ENTRY_BC 4
-
-#define MAXFONTNAMELEN 1024
-#define MAXFONTFILENAMELEN 1024
-
-#define FontDirFile "fonts.dir"
-#define FontAliasFile "fonts.alias"
-#define FontScalableFile "fonts.scale"
-
-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 FontFileStartListFonts ( pointer client, FontPathElementPtr fpe,
- char *pat, int len, int max,
- pointer *privatep, int mark_aliases );
-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 void CatalogueRegisterLocalFpeFunctions ( 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_ */
+/* + +Copyright 1991, 1998 The Open Group + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from The Open Group. + +*/ + +/* + * Author: Keith Packard, MIT X Consortium + */ + +#ifndef _FONTFILE_H_ +#define _FONTFILE_H_ + +#include <X11/fonts/fontxlfd.h> + +typedef struct _FontEntry *FontEntryPtr; +typedef struct _FontTable *FontTablePtr; +typedef struct _FontName *FontNamePtr; +typedef struct _FontScaled *FontScaledPtr; +typedef struct _FontScalableExtra *FontScalableExtraPtr; +typedef struct _FontScalableEntry *FontScalableEntryPtr; +typedef struct _FontScaleAliasEntry *FontScaleAliasEntryPtr; +typedef struct _FontBitmapEntry *FontBitmapEntryPtr; +typedef struct _FontAliasEntry *FontAliasEntryPtr; +typedef struct _FontBCEntry *FontBCEntryPtr; +typedef struct _FontDirectory *FontDirectoryPtr; +typedef struct _FontRenderer *FontRendererPtr; + +#define NullFontEntry ((FontEntryPtr) 0) +#define NullFontTable ((FontTablePtr) 0) +#define NullFontName ((FontNamePtr) 0) +#define NullFontScaled ((FontScaled) 0) +#define NullFontScalableExtra ((FontScalableExtra) 0) +#define NullFontscalableEntry ((FontScalableEntry) 0) +#define NullFontScaleAliasEntry ((FontScaleAliasEntry) 0) +#define NullFontBitmapEntry ((FontBitmapEntry) 0) +#define NullFontAliasEntry ((FontAliasEntry) 0) +#define NullFontBCEntry ((FontBCEntry) 0) +#define NullFontDirectory ((FontDirectoryPtr) 0) +#define NullFontRenderer ((FontRendererPtr) 0) + +#define FONT_ENTRY_SCALABLE 0 +#define FONT_ENTRY_SCALE_ALIAS 1 +#define FONT_ENTRY_BITMAP 2 +#define FONT_ENTRY_ALIAS 3 +#define FONT_ENTRY_BC 4 + +#define MAXFONTNAMELEN 1024 +#define MAXFONTFILENAMELEN 1024 + +#define FontDirFile "fonts.dir" +#define FontAliasFile "fonts.alias" +#define FontScalableFile "fonts.scale" + +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 FontFileStartListFonts ( pointer client, FontPathElementPtr fpe, + char *pat, int len, int max, + pointer *privatep, int mark_aliases ); +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 void CatalogueRegisterLocalFpeFunctions ( 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/libXfont/include/X11/fonts/fntfilio.h b/libXfont/include/X11/fonts/fntfilio.h index afb71eb68..3a8f4ca35 100644 --- a/libXfont/include/X11/fonts/fntfilio.h +++ b/libXfont/include/X11/fonts/fntfilio.h @@ -1,53 +1,53 @@ -/*
-
-Copyright 1991, 1998 The Open Group
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of The Open Group shall not be
-used in advertising or otherwise to promote the sale, use or other dealings
-in this Software without prior written authorization from The Open Group.
-
-*/
-
-/*
- * Author: Keith Packard, MIT X Consortium
- */
-
-#ifndef _FNTFILIO_H_
-#define _FNTFILIO_H_
-
-#include <X11/fonts/bufio.h>
-
-typedef BufFilePtr FontFilePtr;
-
-#define FontFileGetc(f) BufFileGet(f)
-#define FontFilePutc(c,f) BufFilePut(c,f)
-#define FontFileRead(f,b,n) BufFileRead(f,b,n)
-#define FontFileWrite(f,b,n) BufFileWrite(f,b,n)
-#define FontFileSkip(f,n) (BufFileSkip (f, n) != BUFFILEEOF)
-#define FontFileSeek(f,n) (BufFileSeek (f,n,0) != BUFFILEEOF)
-
-#define FontFileEOF BUFFILEEOF
-
-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_ */
+/* + +Copyright 1991, 1998 The Open Group + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from The Open Group. + +*/ + +/* + * Author: Keith Packard, MIT X Consortium + */ + +#ifndef _FNTFILIO_H_ +#define _FNTFILIO_H_ + +#include <X11/fonts/bufio.h> + +typedef BufFilePtr FontFilePtr; + +#define FontFileGetc(f) BufFileGet(f) +#define FontFilePutc(c,f) BufFilePut(c,f) +#define FontFileRead(f,b,n) BufFileRead(f,b,n) +#define FontFileWrite(f,b,n) BufFileWrite(f,b,n) +#define FontFileSkip(f,n) (BufFileSkip (f, n) != BUFFILEEOF) +#define FontFileSeek(f,n) (BufFileSeek (f,n,0) != BUFFILEEOF) + +#define FontFileEOF BUFFILEEOF + +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/libXfont/include/X11/fonts/fntfilst.h b/libXfont/include/X11/fonts/fntfilst.h index f44d81564..29e0a56fb 100644 --- a/libXfont/include/X11/fonts/fntfilst.h +++ b/libXfont/include/X11/fonts/fntfilst.h @@ -1,193 +1,193 @@ -/*
-
-Copyright 1991, 1998 The Open Group
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of The Open Group shall not be
-used in advertising or otherwise to promote the sale, use or other dealings
-in this Software without prior written authorization from The Open Group.
-
-*/
-
-/*
- * Author: Keith Packard, MIT X Consortium
- */
-
-#ifndef _FONTFILEST_H_
-#define _FONTFILEST_H_
-
-#include <X11/Xos.h>
-#ifndef XP_PSTEXT
-#include <X11/fonts/fontmisc.h>
-#endif
-#include <X11/fonts/fontstruct.h>
-#include <X11/fonts/fontxlfd.h>
-#include <X11/fonts/fntfil.h>
-
-typedef struct _FontName {
- char *name;
- short length;
- short ndashes;
-} FontNameRec;
-
-typedef struct _FontScaled {
- FontScalableRec vals;
- FontEntryPtr bitmap;
- FontPtr pFont;
-} FontScaledRec;
-
-typedef struct _FontScalableExtra {
- FontScalableRec defaults;
- int numScaled;
- int sizeScaled;
- FontScaledPtr scaled;
- pointer private;
-} FontScalableExtraRec;
-
-typedef struct _FontScalableEntry {
- FontRendererPtr renderer;
- char *fileName;
- FontScalableExtraPtr extra;
-} FontScalableEntryRec;
-
-/*
- * This "can't" work yet - the returned alias string must be permanent,
- * but this layer would need to generate the appropriate name from the
- * resolved scalable + the XLFD values passed in. XXX
- */
-
-typedef struct _FontScaleAliasEntry {
- char *resolved;
-} FontScaleAliasEntryRec;
-
-typedef struct _FontBitmapEntry {
- FontRendererPtr renderer;
- char *fileName;
- FontPtr pFont;
-} FontBitmapEntryRec;
-
-typedef struct _FontAliasEntry {
- char *resolved;
-} FontAliasEntryRec;
-
-typedef struct _FontBCEntry {
- FontScalableRec vals;
- FontEntryPtr entry;
-} FontBCEntryRec;
-
-typedef struct _FontEntry {
- FontNameRec name;
- int type;
- union _FontEntryParts {
- FontScalableEntryRec scalable;
- FontBitmapEntryRec bitmap;
- FontAliasEntryRec alias;
- FontBCEntryRec bc;
- } u;
-} FontEntryRec;
-
-typedef struct _FontTable {
- int used;
- int size;
- FontEntryPtr entries;
- Bool sorted;
-} FontTableRec;
-
-typedef struct _FontDirectory {
- char *directory;
- unsigned long dir_mtime;
- unsigned long alias_mtime;
- FontTableRec scalable;
- FontTableRec nonScalable;
- char *attributes;
-} FontDirectoryRec;
-
-/* Capability bits: for definition of capabilities bitmap in the
- FontRendererRec to indicate support of XLFD enhancements */
-
-#define CAP_MATRIX 0x1
-#define CAP_CHARSUBSETTING 0x2
-
-typedef struct _FontRenderer {
- char *fileSuffix;
- int fileSuffixLen;
- 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;
- 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 {
- FontScalableRec vals;
- FontBitmapEntryPtr bitmap;
-} BitmapInstanceRec, *BitmapInstancePtr;
-
-typedef struct _BitmapScalablePrivate {
- int numInstances;
- BitmapInstancePtr instances;
-} BitmapScalablePrivateRec, *BitmapScalablePrivatePtr;
-
-typedef struct _BitmapSources {
- FontPathElementPtr *fpe;
- int size;
- int count;
-} BitmapSourcesRec, *BitmapSourcesPtr;
-
-extern BitmapSourcesRec FontFileBitmapSources;
-
-/* Defines for FontFileFindNamesInScalableDir() behavior */
-#define NORMAL_ALIAS_BEHAVIOR 0
-#define LIST_ALIASES_AND_TARGET_NAMES (1<<0)
-#define IGNORE_SCALABLE_ALIASES (1<<1)
-
-#endif /* _FONTFILEST_H_ */
+/* + +Copyright 1991, 1998 The Open Group + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from The Open Group. + +*/ + +/* + * Author: Keith Packard, MIT X Consortium + */ + +#ifndef _FONTFILEST_H_ +#define _FONTFILEST_H_ + +#include <X11/Xos.h> +#ifndef XP_PSTEXT +#include <X11/fonts/fontmisc.h> +#endif +#include <X11/fonts/fontstruct.h> +#include <X11/fonts/fontxlfd.h> +#include <X11/fonts/fntfil.h> + +typedef struct _FontName { + char *name; + short length; + short ndashes; +} FontNameRec; + +typedef struct _FontScaled { + FontScalableRec vals; + FontEntryPtr bitmap; + FontPtr pFont; +} FontScaledRec; + +typedef struct _FontScalableExtra { + FontScalableRec defaults; + int numScaled; + int sizeScaled; + FontScaledPtr scaled; + pointer private; +} FontScalableExtraRec; + +typedef struct _FontScalableEntry { + FontRendererPtr renderer; + char *fileName; + FontScalableExtraPtr extra; +} FontScalableEntryRec; + +/* + * This "can't" work yet - the returned alias string must be permanent, + * but this layer would need to generate the appropriate name from the + * resolved scalable + the XLFD values passed in. XXX + */ + +typedef struct _FontScaleAliasEntry { + char *resolved; +} FontScaleAliasEntryRec; + +typedef struct _FontBitmapEntry { + FontRendererPtr renderer; + char *fileName; + FontPtr pFont; +} FontBitmapEntryRec; + +typedef struct _FontAliasEntry { + char *resolved; +} FontAliasEntryRec; + +typedef struct _FontBCEntry { + FontScalableRec vals; + FontEntryPtr entry; +} FontBCEntryRec; + +typedef struct _FontEntry { + FontNameRec name; + int type; + union _FontEntryParts { + FontScalableEntryRec scalable; + FontBitmapEntryRec bitmap; + FontAliasEntryRec alias; + FontBCEntryRec bc; + } u; +} FontEntryRec; + +typedef struct _FontTable { + int used; + int size; + FontEntryPtr entries; + Bool sorted; +} FontTableRec; + +typedef struct _FontDirectory { + char *directory; + unsigned long dir_mtime; + unsigned long alias_mtime; + FontTableRec scalable; + FontTableRec nonScalable; + char *attributes; +} FontDirectoryRec; + +/* Capability bits: for definition of capabilities bitmap in the + FontRendererRec to indicate support of XLFD enhancements */ + +#define CAP_MATRIX 0x1 +#define CAP_CHARSUBSETTING 0x2 + +typedef struct _FontRenderer { + char *fileSuffix; + int fileSuffixLen; + 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; + 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 { + FontScalableRec vals; + FontBitmapEntryPtr bitmap; +} BitmapInstanceRec, *BitmapInstancePtr; + +typedef struct _BitmapScalablePrivate { + int numInstances; + BitmapInstancePtr instances; +} BitmapScalablePrivateRec, *BitmapScalablePrivatePtr; + +typedef struct _BitmapSources { + FontPathElementPtr *fpe; + int size; + int count; +} BitmapSourcesRec, *BitmapSourcesPtr; + +extern BitmapSourcesRec FontFileBitmapSources; + +/* Defines for FontFileFindNamesInScalableDir() behavior */ +#define NORMAL_ALIAS_BEHAVIOR 0 +#define LIST_ALIASES_AND_TARGET_NAMES (1<<0) +#define IGNORE_SCALABLE_ALIASES (1<<1) + +#endif /* _FONTFILEST_H_ */ diff --git a/libXfont/include/X11/fonts/fontencc.h b/libXfont/include/X11/fonts/fontencc.h index 98ff1092f..987cbfbed 100644 --- a/libXfont/include/X11/fonts/fontencc.h +++ b/libXfont/include/X11/fonts/fontencc.h @@ -1,35 +1,35 @@ -/*
-Copyright (c) 1998-2001 by Juliusz Chroboczek
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
-*/
-
-/* Binary compatibility entry points. */
-
-/* This file includes code to make modules compiled for earlier
- versions of the fontenc interfaces link with this one. It does
- *not* provide source compatibility, as many of the data structures
- now have different names. */
-
-extern char *font_encoding_from_xlfd(const char*, int);
-extern unsigned font_encoding_recode(unsigned, FontEncPtr, FontMapPtr);
-extern FontEncPtr font_encoding_find(const char*, const char*);
-extern char *font_encoding_name(unsigned, FontEncPtr, FontMapPtr);
-extern char **identifyEncodingFile(const char *fileName);
-
+/* +Copyright (c) 1998-2001 by Juliusz Chroboczek + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. +*/ + +/* Binary compatibility entry points. */ + +/* This file includes code to make modules compiled for earlier + versions of the fontenc interfaces link with this one. It does + *not* provide source compatibility, as many of the data structures + now have different names. */ + +extern char *font_encoding_from_xlfd(const char*, int); +extern unsigned font_encoding_recode(unsigned, FontEncPtr, FontMapPtr); +extern FontEncPtr font_encoding_find(const char*, const char*); +extern char *font_encoding_name(unsigned, FontEncPtr, FontMapPtr); +extern char **identifyEncodingFile(const char *fileName); + diff --git a/libXfont/include/X11/fonts/fontmisc.h b/libXfont/include/X11/fonts/fontmisc.h index ee1d78d7a..cd9d52a64 100644 --- a/libXfont/include/X11/fonts/fontmisc.h +++ b/libXfont/include/X11/fonts/fontmisc.h @@ -1,100 +1,100 @@ -/*
-
-Copyright 1991, 1998 The Open Group
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of The Open Group shall not be
-used in advertising or otherwise to promote the sale, use or other dealings
-in this Software without prior written authorization from The Open Group.
-
-*/
-
-/*
- * Author: Keith Packard, MIT X Consortium
- */
-
-#ifndef _FONTMISC_H_
-#define _FONTMISC_H_
-
-#include <X11/Xfuncs.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <unistd.h>
-#include <X11/Xdefs.h>
-
-
-#ifndef LSBFirst
-#define LSBFirst 0
-#define MSBFirst 1
-#endif
-
-#ifndef None
-#define None 0l
-#endif
-
-#ifndef TRUE
-#define TRUE 1
-#define FALSE 0
-#endif
-
-extern Atom MakeAtom ( char *string, unsigned len, int makeit );
-extern int ValidAtom ( Atom atom );
-extern char *NameForAtom (Atom atom);
-
-#define lowbit(x) ((x) & (~(x) + 1))
-
-#undef assert
-#define assert(x) ((void)0)
-
-extern void
-BitOrderInvert(
- register unsigned char *,
- register int
-);
-
-extern void
-TwoByteSwap(
- register unsigned char *,
- register int
-);
-
-extern void
-FourByteSwap(
- register unsigned char *,
- register int
-);
-
-extern int
-RepadBitmap (
- char*,
- char*,
- unsigned,
- unsigned,
- int,
- int
-);
-
-extern void CopyISOLatin1Lowered(
- char * /*dest*/,
- char * /*source*/,
- int /*length*/
-);
-
-extern void register_fpe_functions(void);
-
-#endif /* _FONTMISC_H_ */
+/* + +Copyright 1991, 1998 The Open Group + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from The Open Group. + +*/ + +/* + * Author: Keith Packard, MIT X Consortium + */ + +#ifndef _FONTMISC_H_ +#define _FONTMISC_H_ + +#include <X11/Xfuncs.h> +#include <stdlib.h> +#include <stdio.h> +#include <unistd.h> +#include <X11/Xdefs.h> + + +#ifndef LSBFirst +#define LSBFirst 0 +#define MSBFirst 1 +#endif + +#ifndef None +#define None 0l +#endif + +#ifndef TRUE +#define TRUE 1 +#define FALSE 0 +#endif + +extern Atom MakeAtom ( char *string, unsigned len, int makeit ); +extern int ValidAtom ( Atom atom ); +extern char *NameForAtom (Atom atom); + +#define lowbit(x) ((x) & (~(x) + 1)) + +#undef assert +#define assert(x) ((void)0) + +extern void +BitOrderInvert( + register unsigned char *, + register int +); + +extern void +TwoByteSwap( + register unsigned char *, + register int +); + +extern void +FourByteSwap( + register unsigned char *, + register int +); + +extern int +RepadBitmap ( + char*, + char*, + unsigned, + unsigned, + int, + int +); + +extern void CopyISOLatin1Lowered( + char * /*dest*/, + char * /*source*/, + int /*length*/ +); + +extern void register_fpe_functions(void); + +#endif /* _FONTMISC_H_ */ diff --git a/libXfont/include/X11/fonts/fontshow.h b/libXfont/include/X11/fonts/fontshow.h index 984b30479..126cab698 100644 --- a/libXfont/include/X11/fonts/fontshow.h +++ b/libXfont/include/X11/fonts/fontshow.h @@ -1,35 +1,35 @@ -/*
-
-Copyright 1990, 1998 The Open Group
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of The Open Group shall not be
-used in advertising or otherwise to promote the sale, use or other dealings
-in this Software without prior written authorization from The Open Group.
-
-*/
-
-/*
- * Author: Keith Packard, MIT X Consortium
- */
-
-#define FONT_SHOW_INFO (1<<0)
-#define FONT_SHOW_PROPS (1<<1)
-#define FONT_SHOW_METRICS (1<<2)
-#define FONT_SHOW_GLYPHS (1<<3)
-#define FONT_SHOW_ALL (FONT_SHOW_INFO|FONT_SHOW_PROPS|FONT_SHOW_GLYPHS)
+/* + +Copyright 1990, 1998 The Open Group + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from The Open Group. + +*/ + +/* + * Author: Keith Packard, MIT X Consortium + */ + +#define FONT_SHOW_INFO (1<<0) +#define FONT_SHOW_PROPS (1<<1) +#define FONT_SHOW_METRICS (1<<2) +#define FONT_SHOW_GLYPHS (1<<3) +#define FONT_SHOW_ALL (FONT_SHOW_INFO|FONT_SHOW_PROPS|FONT_SHOW_GLYPHS) diff --git a/libXfont/include/X11/fonts/fontutil.h b/libXfont/include/X11/fonts/fontutil.h index 4d5264cca..71d507b1a 100644 --- a/libXfont/include/X11/fonts/fontutil.h +++ b/libXfont/include/X11/fonts/fontutil.h @@ -1,24 +1,24 @@ -#ifndef _FONTUTIL_H_
-#define _FONTUTIL_H_
-
-#include <X11/fonts/FSproto.h>
-
-extern int FontCouldBeTerminal(FontInfoPtr);
-extern int CheckFSFormat(fsBitmapFormat, fsBitmapFormatMask, int *, int *,
- int *, int *, int *);
-extern void FontComputeInfoAccelerators(FontInfoPtr);
-
-extern void GetGlyphs ( FontPtr font, unsigned long count,
- unsigned char *chars, FontEncoding fontEncoding,
- unsigned long *glyphcount, CharInfoPtr *glyphs );
-extern void QueryGlyphExtents ( FontPtr pFont, CharInfoPtr *charinfo,
- unsigned long count, ExtentInfoRec *info );
-extern Bool QueryTextExtents ( FontPtr pFont, unsigned long count,
- unsigned char *chars, ExtentInfoRec *info );
-extern Bool ParseGlyphCachingMode ( char *str );
-extern void InitGlyphCaching ( void );
-extern void SetGlyphCachingMode ( int newmode );
-extern int add_range ( fsRange *newrange, int *nranges, fsRange **range,
- Bool charset_subset );
-
-#endif /* _FONTUTIL_H_ */
+#ifndef _FONTUTIL_H_ +#define _FONTUTIL_H_ + +#include <X11/fonts/FSproto.h> + +extern int FontCouldBeTerminal(FontInfoPtr); +extern int CheckFSFormat(fsBitmapFormat, fsBitmapFormatMask, int *, int *, + int *, int *, int *); +extern void FontComputeInfoAccelerators(FontInfoPtr); + +extern void GetGlyphs ( FontPtr font, unsigned long count, + unsigned char *chars, FontEncoding fontEncoding, + unsigned long *glyphcount, CharInfoPtr *glyphs ); +extern void QueryGlyphExtents ( FontPtr pFont, CharInfoPtr *charinfo, + unsigned long count, ExtentInfoRec *info ); +extern Bool QueryTextExtents ( FontPtr pFont, unsigned long count, + unsigned char *chars, ExtentInfoRec *info ); +extern Bool ParseGlyphCachingMode ( char *str ); +extern void InitGlyphCaching ( void ); +extern void SetGlyphCachingMode ( int newmode ); +extern int add_range ( fsRange *newrange, int *nranges, fsRange **range, + Bool charset_subset ); + +#endif /* _FONTUTIL_H_ */ diff --git a/libXfont/include/X11/fonts/fontxlfd.h b/libXfont/include/X11/fonts/fontxlfd.h index 822b1e21e..3555706e6 100644 --- a/libXfont/include/X11/fonts/fontxlfd.h +++ b/libXfont/include/X11/fonts/fontxlfd.h @@ -1,97 +1,97 @@ -/*
-
-Copyright 1990, 1994, 1998 The Open Group
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice shall be included
-in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
-OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of The Open Group shall
-not be used in advertising or otherwise to promote the sale, use or
-other dealings in this Software without prior written authorization
-from The Open Group.
-
-*/
-
-/*
- * Author: Keith Packard, MIT X Consortium
- */
-
-#ifndef _FONTXLFD_H_
-#define _FONTXLFD_H_
-
-#include <X11/fonts/FSproto.h>
-
-/* Constants for values_supplied bitmap */
-
-#define SIZE_SPECIFY_MASK 0xf
-
-#define PIXELSIZE_MASK 0x3
-#define PIXELSIZE_UNDEFINED 0
-#define PIXELSIZE_SCALAR 0x1
-#define PIXELSIZE_ARRAY 0x2
-#define PIXELSIZE_SCALAR_NORMALIZED 0x3 /* Adjusted for resolution */
-
-#define POINTSIZE_MASK 0xc
-#define POINTSIZE_UNDEFINED 0
-#define POINTSIZE_SCALAR 0x4
-#define POINTSIZE_ARRAY 0x8
-
-#define PIXELSIZE_WILDCARD 0x10
-#define POINTSIZE_WILDCARD 0x20
-
-#define ENHANCEMENT_SPECIFY_MASK 0x40
-
-#define CHARSUBSET_SPECIFIED 0x40
-
-#define EPS 1.0e-20
-#define XLFD_NDIGITS 3 /* Round numbers in pixel and
- point arrays to this many
- digits for repeatability */
-
-typedef struct _FontScalable {
- int values_supplied; /* Bitmap identifying what advanced
- capabilities or enhancements
- were specified in the font name */
- double pixel_matrix[4];
- double point_matrix[4];
-
- /* Pixel and point fields are deprecated in favor of the
- transformation matrices. They are provided and filled in for the
- benefit of rasterizers that do not handle the matrices. */
-
- int pixel,
- point;
-
- int x,
- y,
- width;
- char *xlfdName;
- int nranges;
- fsRange *ranges;
-} FontScalableRec, *FontScalablePtr;
-
-
-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
-#define FONT_XLFD_REPLACE_ZERO 2
-#define FONT_XLFD_REPLACE_VALUE 3
-
-#endif /* _FONTXLFD_H_ */
+/* + +Copyright 1990, 1994, 1998 The Open Group + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall +not be used in advertising or otherwise to promote the sale, use or +other dealings in this Software without prior written authorization +from The Open Group. + +*/ + +/* + * Author: Keith Packard, MIT X Consortium + */ + +#ifndef _FONTXLFD_H_ +#define _FONTXLFD_H_ + +#include <X11/fonts/FSproto.h> + +/* Constants for values_supplied bitmap */ + +#define SIZE_SPECIFY_MASK 0xf + +#define PIXELSIZE_MASK 0x3 +#define PIXELSIZE_UNDEFINED 0 +#define PIXELSIZE_SCALAR 0x1 +#define PIXELSIZE_ARRAY 0x2 +#define PIXELSIZE_SCALAR_NORMALIZED 0x3 /* Adjusted for resolution */ + +#define POINTSIZE_MASK 0xc +#define POINTSIZE_UNDEFINED 0 +#define POINTSIZE_SCALAR 0x4 +#define POINTSIZE_ARRAY 0x8 + +#define PIXELSIZE_WILDCARD 0x10 +#define POINTSIZE_WILDCARD 0x20 + +#define ENHANCEMENT_SPECIFY_MASK 0x40 + +#define CHARSUBSET_SPECIFIED 0x40 + +#define EPS 1.0e-20 +#define XLFD_NDIGITS 3 /* Round numbers in pixel and + point arrays to this many + digits for repeatability */ + +typedef struct _FontScalable { + int values_supplied; /* Bitmap identifying what advanced + capabilities or enhancements + were specified in the font name */ + double pixel_matrix[4]; + double point_matrix[4]; + + /* Pixel and point fields are deprecated in favor of the + transformation matrices. They are provided and filled in for the + benefit of rasterizers that do not handle the matrices. */ + + int pixel, + point; + + int x, + y, + width; + char *xlfdName; + int nranges; + fsRange *ranges; +} FontScalableRec, *FontScalablePtr; + + +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 +#define FONT_XLFD_REPLACE_ZERO 2 +#define FONT_XLFD_REPLACE_VALUE 3 + +#endif /* _FONTXLFD_H_ */ diff --git a/libXfont/include/X11/fonts/pcf.h b/libXfont/include/X11/fonts/pcf.h index 6963bb8bd..a5fdbcd01 100644 --- a/libXfont/include/X11/fonts/pcf.h +++ b/libXfont/include/X11/fonts/pcf.h @@ -1,97 +1,97 @@ -/*
-
-Copyright 1991, 1998 The Open Group
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice shall be included
-in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
-OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of The Open Group shall
-not be used in advertising or otherwise to promote the sale, use or
-other dealings in this Software without prior written authorization
-from The Open Group.
-
-*/
-
-/*
- * Author: Keith Packard, MIT X Consortium
- */
-
-#ifndef _PCF_H_
-#define _PCF_H_
-
-#include <X11/fonts/fntfilio.h>
-
-/*
- * Information used to read/write PCF fonts
- */
-
-typedef struct _PCFTable {
- CARD32 type;
- CARD32 format;
- CARD32 size;
- CARD32 offset;
-} PCFTableRec, *PCFTablePtr;
-
-#define PCF_FILE_VERSION (('p'<<24)|('c'<<16)|('f'<<8)|1)
-#define PCF_FORMAT_MASK 0xffffff00
-
-#define PCF_DEFAULT_FORMAT 0x00000000
-#define PCF_INKBOUNDS 0x00000200
-#define PCF_ACCEL_W_INKBOUNDS 0x00000100
-#define PCF_COMPRESSED_METRICS 0x00000100
-
-#define PCF_FORMAT_MATCH(a,b) (((a)&PCF_FORMAT_MASK) == ((b)&PCF_FORMAT_MASK))
-
-#define PCF_GLYPH_PAD_MASK (3<<0)
-#define PCF_BYTE_MASK (1<<2)
-#define PCF_BIT_MASK (1<<3)
-#define PCF_SCAN_UNIT_MASK (3<<4)
-
-#define PCF_BYTE_ORDER(f) (((f) & PCF_BYTE_MASK)?MSBFirst:LSBFirst)
-#define PCF_BIT_ORDER(f) (((f) & PCF_BIT_MASK)?MSBFirst:LSBFirst)
-#define PCF_GLYPH_PAD_INDEX(f) ((f) & PCF_GLYPH_PAD_MASK)
-#define PCF_GLYPH_PAD(f) (1<<PCF_GLYPH_PAD_INDEX(f))
-#define PCF_SCAN_UNIT_INDEX(f) (((f) & PCF_SCAN_UNIT_MASK) >> 4)
-#define PCF_SCAN_UNIT(f) (1<<PCF_SCAN_UNIT_INDEX(f))
-#define PCF_FORMAT_BITS(f) ((f) & (PCF_GLYPH_PAD_MASK|PCF_BYTE_MASK|PCF_BIT_MASK|PCF_SCAN_UNIT_MASK))
-
-#define PCF_SIZE_TO_INDEX(s) ((s) == 4 ? 2 : (s) == 2 ? 1 : 0)
-#define PCF_INDEX_TO_SIZE(b) (1<<b)
-
-#define PCF_FORMAT(bit,byte,glyph,scan) (\
- (PCF_SIZE_TO_INDEX(scan) << 4) | \
- (((bit) == MSBFirst ? 1 : 0) << 3) | \
- (((byte) == MSBFirst ? 1 : 0) << 2) | \
- (PCF_SIZE_TO_INDEX(glyph) << 0))
-
-#define PCF_PROPERTIES (1<<0)
-#define PCF_ACCELERATORS (1<<1)
-#define PCF_METRICS (1<<2)
-#define PCF_BITMAPS (1<<3)
-#define PCF_INK_METRICS (1<<4)
-#define PCF_BDF_ENCODINGS (1<<5)
-#define PCF_SWIDTHS (1<<6)
-#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 pcfWriteFont ( FontPtr pFont, FontFilePtr file );
-extern void pcfError ( const char *, ... );
-
-#endif /* _PCF_H_ */
+/* + +Copyright 1991, 1998 The Open Group + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall +not be used in advertising or otherwise to promote the sale, use or +other dealings in this Software without prior written authorization +from The Open Group. + +*/ + +/* + * Author: Keith Packard, MIT X Consortium + */ + +#ifndef _PCF_H_ +#define _PCF_H_ + +#include <X11/fonts/fntfilio.h> + +/* + * Information used to read/write PCF fonts + */ + +typedef struct _PCFTable { + CARD32 type; + CARD32 format; + CARD32 size; + CARD32 offset; +} PCFTableRec, *PCFTablePtr; + +#define PCF_FILE_VERSION (('p'<<24)|('c'<<16)|('f'<<8)|1) +#define PCF_FORMAT_MASK 0xffffff00 + +#define PCF_DEFAULT_FORMAT 0x00000000 +#define PCF_INKBOUNDS 0x00000200 +#define PCF_ACCEL_W_INKBOUNDS 0x00000100 +#define PCF_COMPRESSED_METRICS 0x00000100 + +#define PCF_FORMAT_MATCH(a,b) (((a)&PCF_FORMAT_MASK) == ((b)&PCF_FORMAT_MASK)) + +#define PCF_GLYPH_PAD_MASK (3<<0) +#define PCF_BYTE_MASK (1<<2) +#define PCF_BIT_MASK (1<<3) +#define PCF_SCAN_UNIT_MASK (3<<4) + +#define PCF_BYTE_ORDER(f) (((f) & PCF_BYTE_MASK)?MSBFirst:LSBFirst) +#define PCF_BIT_ORDER(f) (((f) & PCF_BIT_MASK)?MSBFirst:LSBFirst) +#define PCF_GLYPH_PAD_INDEX(f) ((f) & PCF_GLYPH_PAD_MASK) +#define PCF_GLYPH_PAD(f) (1<<PCF_GLYPH_PAD_INDEX(f)) +#define PCF_SCAN_UNIT_INDEX(f) (((f) & PCF_SCAN_UNIT_MASK) >> 4) +#define PCF_SCAN_UNIT(f) (1<<PCF_SCAN_UNIT_INDEX(f)) +#define PCF_FORMAT_BITS(f) ((f) & (PCF_GLYPH_PAD_MASK|PCF_BYTE_MASK|PCF_BIT_MASK|PCF_SCAN_UNIT_MASK)) + +#define PCF_SIZE_TO_INDEX(s) ((s) == 4 ? 2 : (s) == 2 ? 1 : 0) +#define PCF_INDEX_TO_SIZE(b) (1<<b) + +#define PCF_FORMAT(bit,byte,glyph,scan) (\ + (PCF_SIZE_TO_INDEX(scan) << 4) | \ + (((bit) == MSBFirst ? 1 : 0) << 3) | \ + (((byte) == MSBFirst ? 1 : 0) << 2) | \ + (PCF_SIZE_TO_INDEX(glyph) << 0)) + +#define PCF_PROPERTIES (1<<0) +#define PCF_ACCELERATORS (1<<1) +#define PCF_METRICS (1<<2) +#define PCF_BITMAPS (1<<3) +#define PCF_INK_METRICS (1<<4) +#define PCF_BDF_ENCODINGS (1<<5) +#define PCF_SWIDTHS (1<<6) +#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 pcfWriteFont ( FontPtr pFont, FontFilePtr file ); +extern void pcfError ( const char *, ... ); + +#endif /* _PCF_H_ */ |