misc.h revision f46a6179
1/* $Xorg: misc.h,v 1.3 2000/08/17 19:54:33 cpqbld Exp $ */
2/************************************************************
3 Copyright (c) 1994 by Silicon Graphics Computer Systems, Inc.
4
5 Permission to use, copy, modify, and distribute this
6 software and its documentation for any purpose and without
7 fee is hereby granted, provided that the above copyright
8 notice appear in all copies and that both that copyright
9 notice and this permission notice appear in supporting
10 documentation, and that the name of Silicon Graphics not be
11 used in advertising or publicity pertaining to distribution
12 of the software without specific prior written permission.
13 Silicon Graphics makes no representation about the suitability
14 of this software for any purpose. It is provided "as is"
15 without any express or implied warranty.
16
17 SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
18 SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
19 AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
20 GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
21 DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
22 DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
23 OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION  WITH
24 THE USE OR PERFORMANCE OF THIS SOFTWARE.
25
26 ********************************************************/
27/* $XFree86$ */
28
29#ifndef MISC_H
30#define MISC_H 1
31
32typedef	struct	_CommonInfo {
33    unsigned short		defined;
34    unsigned char		fileID;
35    unsigned char		merge;
36    struct _CommonInfo *	next;
37} CommonInfo;
38
39extern Bool	UseNewField(
40    unsigned		/* field */,
41    CommonInfo * 	/* oldDefs */,
42    CommonInfo *	/* newDefs */,
43    unsigned *		/* pCollide */
44);
45
46extern Bool	MergeNewField(
47    unsigned		/* field */,
48    CommonInfo * 	/* oldDefs */,
49    CommonInfo *	/* newDefs */,
50    unsigned *		/* pCollide */
51);
52
53extern XPointer ClearCommonInfo(
54    CommonInfo *	/* cmn */
55);
56
57extern XPointer AddCommonInfo(
58    CommonInfo *	/* old */,
59    CommonInfo *	/* new */
60);
61
62extern int	ReportNotArray(
63    const char * /* type */,
64    const char * /* field */,
65    const char * /* name */
66);
67
68extern int	ReportShouldBeArray(
69    const char * /* type */,
70    const char * /* field */,
71    char *	/* name */
72);
73
74extern int	ReportBadType(
75    const char * /* type */,
76    const char * /* field */,
77    const char * /* name */,
78    const char * /* wanted */
79);
80
81extern int	ReportBadIndexType(
82    char *	/* type */,
83    char *	/* field */,
84    char *	/* name */,
85    char *	/* wanted */
86);
87
88extern int	ReportBadField(
89    const char * /* type */,
90    const char * /* field */,
91    const char * /* name */
92);
93
94extern int	ReportMultipleDefs(
95    char *	/* type */,
96    char *	/* field */,
97    char *	/* which */
98);
99
100extern Bool	ProcessIncludeFile(
101    IncludeStmt	*	/* stmt */,
102    unsigned		/* file_type */,
103    XkbFile **		/* file_rtrn */,
104    unsigned *		/* merge_rtrn */
105);
106
107extern Status	ComputeKbdDefaults(
108    XkbDescPtr		/* xkb */
109);
110
111extern Bool FindNamedKey(
112    XkbDescPtr		/* xkb */,
113    unsigned long	/* name */,
114    unsigned int *	/* kc_rtrn */,
115    Bool		/* use_aliases */,
116    Bool		/* create */,
117    int			/* start_from */
118);
119
120extern Bool FindKeyNameForAlias(
121    XkbDescPtr		/* xkb */,
122    unsigned long	/* lname */,
123    unsigned long *	/* real_name */
124);
125
126#endif /* MISC_H */
127