fontmisc.h revision 23a0898a
1/* $Xorg: fontmisc.h,v 1.4 2001/02/09 02:04:04 xorgcvs Exp $ */ 2 3/* 4 5Copyright 1991, 1998 The Open Group 6 7Permission to use, copy, modify, distribute, and sell this software and its 8documentation for any purpose is hereby granted without fee, provided that 9the above copyright notice appear in all copies and that both that 10copyright notice and this permission notice appear in supporting 11documentation. 12 13The above copyright notice and this permission notice shall be included in 14all copies or substantial portions of the Software. 15 16THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 20AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 23Except as contained in this notice, the name of The Open Group shall not be 24used in advertising or otherwise to promote the sale, use or other dealings 25in this Software without prior written authorization from The Open Group. 26 27*/ 28/* $XFree86: xc/lib/font/include/fontmisc.h,v 3.16 2001/12/14 19:56:54 dawes Exp $ */ 29 30/* 31 * Author: Keith Packard, MIT X Consortium 32 */ 33 34#ifndef _FONTMISC_H_ 35#define _FONTMISC_H_ 36 37#ifndef FONTMODULE 38#include <X11/Xfuncs.h> 39#include <stdlib.h> 40#include <stdio.h> 41 42#ifndef X_NOT_POSIX 43#include <unistd.h> 44#else 45extern int close(); 46#endif 47 48#endif /* FONTMODULE */ 49 50#include <X11/Xdefs.h> 51 52 53#ifndef LSBFirst 54#define LSBFirst 0 55#define MSBFirst 1 56#endif 57 58#ifndef None 59#define None 0l 60#endif 61 62#ifndef TRUE 63#define TRUE 1 64#define FALSE 0 65#endif 66 67extern Atom MakeAtom ( char *string, unsigned len, int makeit ); 68extern int ValidAtom ( Atom atom ); 69extern char *NameForAtom (Atom atom); 70 71#ifndef _HAVE_XALLOC_DECLS 72#define _HAVE_XALLOC_DECLS 73extern pointer Xalloc(unsigned long); 74extern pointer Xrealloc(pointer, unsigned long); 75extern void Xfree(pointer); 76extern pointer Xcalloc(unsigned long); 77#endif 78extern int f_strcasecmp(const char *s1, const char *s2); 79 80#ifndef xalloc 81#define xalloc(n) Xalloc ((unsigned) n) 82#define xfree(p) Xfree ((pointer) p) 83#define xrealloc(p,n) Xrealloc ((pointer)p,n) 84#define xcalloc(n,s) Xcalloc((unsigned) n * (unsigned) s) 85#endif 86#define lowbit(x) ((x) & (~(x) + 1)) 87 88#undef assert 89#define assert(x) ((void)0) 90 91#ifndef strcasecmp 92#if defined(NEED_STRCASECMP) && !defined(FONTMODULE) 93#define strcasecmp(s1,s2) f_strcasecmp(s1,s2) 94#endif 95#endif 96 97extern void 98BitOrderInvert( 99 register unsigned char *, 100 register int 101); 102 103extern void 104TwoByteSwap( 105 register unsigned char *, 106 register int 107); 108 109extern void 110FourByteSwap( 111 register unsigned char *, 112 register int 113); 114 115extern int 116RepadBitmap ( 117 char*, 118 char*, 119 unsigned, 120 unsigned, 121 int, 122 int 123); 124 125extern void CopyISOLatin1Lowered( 126 char * /*dest*/, 127 char * /*source*/, 128 int /*length*/ 129); 130 131extern void register_fpe_functions(void); 132 133#endif /* _FONTMISC_H_ */ 134