xref: /OK3568_Linux_fs/external/xserver/hw/xfree86/parser/xf86Optrec.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun /*
2*4882a593Smuzhiyun  *
3*4882a593Smuzhiyun  * Copyright (c) 1997  Metro Link Incorporated
4*4882a593Smuzhiyun  *
5*4882a593Smuzhiyun  * Permission is hereby granted, free of charge, to any person obtaining a
6*4882a593Smuzhiyun  * copy of this software and associated documentation files (the "Software"),
7*4882a593Smuzhiyun  * to deal in the Software without restriction, including without limitation
8*4882a593Smuzhiyun  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
9*4882a593Smuzhiyun  * and/or sell copies of the Software, and to permit persons to whom the
10*4882a593Smuzhiyun  * Software is furnished to do so, subject to the following conditions:
11*4882a593Smuzhiyun  *
12*4882a593Smuzhiyun  * The above copyright notice and this permission notice shall be included in
13*4882a593Smuzhiyun  * all copies or substantial portions of the Software.
14*4882a593Smuzhiyun  *
15*4882a593Smuzhiyun  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16*4882a593Smuzhiyun  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17*4882a593Smuzhiyun  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
18*4882a593Smuzhiyun  * THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
19*4882a593Smuzhiyun  * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
20*4882a593Smuzhiyun  * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21*4882a593Smuzhiyun  * SOFTWARE.
22*4882a593Smuzhiyun  *
23*4882a593Smuzhiyun  * Except as contained in this notice, the name of the Metro Link shall not be
24*4882a593Smuzhiyun  * used in advertising or otherwise to promote the sale, use or other dealings
25*4882a593Smuzhiyun  * in this Software without prior written authorization from Metro Link.
26*4882a593Smuzhiyun  *
27*4882a593Smuzhiyun  */
28*4882a593Smuzhiyun /*
29*4882a593Smuzhiyun  * Copyright (c) 1997-2001 by The XFree86 Project, Inc.
30*4882a593Smuzhiyun  *
31*4882a593Smuzhiyun  * Permission is hereby granted, free of charge, to any person obtaining a
32*4882a593Smuzhiyun  * copy of this software and associated documentation files (the "Software"),
33*4882a593Smuzhiyun  * to deal in the Software without restriction, including without limitation
34*4882a593Smuzhiyun  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
35*4882a593Smuzhiyun  * and/or sell copies of the Software, and to permit persons to whom the
36*4882a593Smuzhiyun  * Software is furnished to do so, subject to the following conditions:
37*4882a593Smuzhiyun  *
38*4882a593Smuzhiyun  * The above copyright notice and this permission notice shall be included in
39*4882a593Smuzhiyun  * all copies or substantial portions of the Software.
40*4882a593Smuzhiyun  *
41*4882a593Smuzhiyun  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
42*4882a593Smuzhiyun  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
43*4882a593Smuzhiyun  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
44*4882a593Smuzhiyun  * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
45*4882a593Smuzhiyun  * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
46*4882a593Smuzhiyun  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
47*4882a593Smuzhiyun  * OTHER DEALINGS IN THE SOFTWARE.
48*4882a593Smuzhiyun  *
49*4882a593Smuzhiyun  * Except as contained in this notice, the name of the copyright holder(s)
50*4882a593Smuzhiyun  * and author(s) shall not be used in advertising or otherwise to promote
51*4882a593Smuzhiyun  * the sale, use or other dealings in this Software without prior written
52*4882a593Smuzhiyun  * authorization from the copyright holder(s) and author(s).
53*4882a593Smuzhiyun  */
54*4882a593Smuzhiyun 
55*4882a593Smuzhiyun /*
56*4882a593Smuzhiyun  * This file contains the Option Record that is passed between the Parser,
57*4882a593Smuzhiyun  * and Module setup procs.
58*4882a593Smuzhiyun  */
59*4882a593Smuzhiyun #ifdef HAVE_XORG_CONFIG_H
60*4882a593Smuzhiyun #include <xorg-config.h>
61*4882a593Smuzhiyun #endif
62*4882a593Smuzhiyun 
63*4882a593Smuzhiyun #ifndef _xf86Optrec_h_
64*4882a593Smuzhiyun #define _xf86Optrec_h_
65*4882a593Smuzhiyun #include <stdio.h>
66*4882a593Smuzhiyun #include <string.h>
67*4882a593Smuzhiyun #include "xf86Optionstr.h"
68*4882a593Smuzhiyun 
69*4882a593Smuzhiyun #include <X11/Xfuncproto.h>
70*4882a593Smuzhiyun 
71*4882a593Smuzhiyun extern _X_EXPORT XF86OptionPtr xf86addNewOption(XF86OptionPtr head, char *name,
72*4882a593Smuzhiyun                                                 char *val);
73*4882a593Smuzhiyun extern _X_EXPORT XF86OptionPtr xf86optionListDup(XF86OptionPtr opt);
74*4882a593Smuzhiyun extern _X_EXPORT void xf86optionListFree(XF86OptionPtr opt);
75*4882a593Smuzhiyun extern _X_EXPORT char *xf86optionName(XF86OptionPtr opt);
76*4882a593Smuzhiyun extern _X_EXPORT char *xf86optionValue(XF86OptionPtr opt);
77*4882a593Smuzhiyun extern _X_EXPORT XF86OptionPtr xf86newOption(char *name, char *value);
78*4882a593Smuzhiyun extern _X_EXPORT XF86OptionPtr xf86nextOption(XF86OptionPtr list);
79*4882a593Smuzhiyun extern _X_EXPORT XF86OptionPtr xf86findOption(XF86OptionPtr list,
80*4882a593Smuzhiyun                                               const char *name);
81*4882a593Smuzhiyun extern _X_EXPORT const char *xf86findOptionValue(XF86OptionPtr list,
82*4882a593Smuzhiyun                                                  const char *name);
83*4882a593Smuzhiyun extern _X_EXPORT XF86OptionPtr xf86optionListCreate(const char **options,
84*4882a593Smuzhiyun                                                     int count, int used);
85*4882a593Smuzhiyun extern _X_EXPORT XF86OptionPtr xf86optionListMerge(XF86OptionPtr head,
86*4882a593Smuzhiyun                                                    XF86OptionPtr tail);
87*4882a593Smuzhiyun extern _X_EXPORT int xf86nameCompare(const char *s1, const char *s2);
88*4882a593Smuzhiyun extern _X_EXPORT char *xf86uLongToString(unsigned long i);
89*4882a593Smuzhiyun extern _X_EXPORT XF86OptionPtr xf86parseOption(XF86OptionPtr head);
90*4882a593Smuzhiyun extern _X_EXPORT void xf86printOptionList(FILE * fp, XF86OptionPtr list,
91*4882a593Smuzhiyun                                           int tabs);
92*4882a593Smuzhiyun 
93*4882a593Smuzhiyun #endif                          /* _xf86Optrec_h_ */
94