XKBfileInt.h revision 8c9fbc29
1#ifndef _XKBFILEINT_H_
2#define	_XKBFILEINT_H_ 1
3
4/* $Xorg: XKBfileInt.h,v 1.3 2000/08/17 19:46:43 cpqbld Exp $ */
5/************************************************************
6 Copyright (c) 1994 by Silicon Graphics Computer Systems, Inc.
7
8 Permission to use, copy, modify, and distribute this
9 software and its documentation for any purpose and without
10 fee is hereby granted, provided that the above copyright
11 notice appear in all copies and that both that copyright
12 notice and this permission notice appear in supporting
13 documentation, and that the name of Silicon Graphics not be
14 used in advertising or publicity pertaining to distribution
15 of the software without specific prior written permission.
16 Silicon Graphics makes no representation about the suitability
17 of this software for any purpose. It is provided "as is"
18 without any express or implied warranty.
19
20 SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
21 SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
22 AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
23 GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
24 DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
25 DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
26 OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION  WITH
27 THE USE OR PERFORMANCE OF THIS SOFTWARE.
28
29 ********************************************************/
30/* $XFree86$ */
31
32#include "XKBfile.h"
33
34#ifdef DEBUG
35#define	_XkbLibError(c,l,d) \
36	{ fprintf(stderr,"xkbfile: %s in %s\n",_XkbErrMessages[c],(l)); \
37	 _XkbErrCode= (c); _XkbErrLocation= (l); _XkbErrData= (d); }
38#else
39#define	_XkbLibError(c,l,d) \
40	{ _XkbErrCode= (c); _XkbErrLocation= (l); _XkbErrData= (d); }
41#endif
42
43#ifndef XKB_IN_SERVER
44
45#define	_XkbAlloc(s)		malloc((s))
46#define	_XkbCalloc(n,s)		calloc((n),(s))
47#define	_XkbRealloc(o,s)	realloc((o),(s))
48#define	_XkbTypedAlloc(t)	((t *)malloc(sizeof(t)))
49#define	_XkbTypedCalloc(n,t)	((t *)calloc((n),sizeof(t)))
50#define	_XkbTypedRealloc(o,n,t) \
51	((o)?(t *)realloc((o),(n)*sizeof(t)):_XkbTypedCalloc(n,t))
52#define	_XkbClearElems(a,f,l,t)	bzero(&(a)[f],((l)-(f)+1)*sizeof(t))
53#define	_XkbFree(p)		free(p)
54
55#ifndef PATH_MAX
56#ifdef MAXPATHLEN
57#define PATH_MAX MAXPATHLEN
58#else
59#define PATH_MAX 1024
60#endif
61#endif
62
63#endif
64
65_XFUNCPROTOBEGIN
66
67extern char *	_XkbDupString(
68	char *	/* old_str */
69);
70
71#define _XkbStrCaseEqual(s1,s2)	(_XkbStrCaseCmp(s1,s2)==0)
72
73#ifdef NEED_STRCASECMP
74extern int _XkbStrCaseCmp(char *s1, char *s2);
75#else
76#define _XkbStrCaseCmp strcasecmp
77#endif
78
79_XFUNCPROTOEND
80
81#endif /* _XKBFILEINT_H_ */
82