1
/* $XFree86: xc/programs/Xserver/hw/xfree86/parser/xf86Optrec.h,v 1.10 2001/06/30 04:00:24 paulo Exp $ */
4
* Copyright (c) 1997 Metro Link Incorporated
6
* Permission is hereby granted, free of charge, to any person obtaining a
7
* copy of this software and associated documentation files (the "Software"),
8
* to deal in the Software without restriction, including without limitation
9
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
10
* and/or sell copies of the Software, and to permit persons to whom the
11
* Software is furnished to do so, subject to the following conditions:
13
* The above copyright notice and this permission notice shall be included in
14
* all copies or substantial portions of the Software.
16
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19
* THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
20
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
21
* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24
* Except as contained in this notice, the name of the Metro Link shall not be
25
* used in advertising or otherwise to promote the sale, use or other dealings
26
* in this Software without prior written authorization from Metro Link.
31
* This file contains the Option Record that is passed between the Parser,
32
* and Module setup procs.
34
#ifndef _xf86Optrec_h_
35
#define _xf86Optrec_h_
39
* all records that need to be linked lists should contain a GenericList as
42
typedef struct generic_list_rec
46
GenericListRec, *GenericListPtr, *glp;
49
* All options are stored using this data type.
59
XF86OptionRec, *XF86OptionPtr;
62
XF86OptionPtr xf86addNewOption(XF86OptionPtr head, char *name, char *val);
63
XF86OptionPtr xf86optionListDup(XF86OptionPtr opt);
64
void xf86optionListFree(XF86OptionPtr opt);
65
char *xf86optionName(XF86OptionPtr opt);
66
char *xf86optionValue(XF86OptionPtr opt);
67
XF86OptionPtr xf86newOption(char *name, char *value);
68
XF86OptionPtr xf86nextOption(XF86OptionPtr list);
69
XF86OptionPtr xf86findOption(XF86OptionPtr list, const char *name);
70
char *xf86findOptionValue(XF86OptionPtr list, const char *name);
71
int xf86findOptionBoolean (XF86OptionPtr, const char *, int);
72
XF86OptionPtr xf86optionListCreate(const char **options, int count, int used);
73
XF86OptionPtr xf86optionListMerge(XF86OptionPtr head, XF86OptionPtr tail);
74
char *xf86configStrdup (const char *s);
75
int xf86nameCompare (const char *s1, const char *s2);
76
char *xf86uLongToString(unsigned long i);
77
void xf86debugListOptions(XF86OptionPtr);
78
XF86OptionPtr xf86parseOption(XF86OptionPtr head);
79
void xf86printOptionList(FILE *fp, XF86OptionPtr list, int tabs);
82
#endif /* _xf86Optrec_h_ */