~ubuntu-branches/ubuntu/intrepid/xserver-xgl/intrepid

« back to all changes in this revision

Viewing changes to hw/xfree86/parser/xf86Optrec.h

  • Committer: Bazaar Package Importer
  • Author(s): Matthew Garrett
  • Date: 2006-02-13 14:21:43 UTC
  • Revision ID: james.westby@ubuntu.com-20060213142143-mad6z9xzem7hzxz9
Tags: upstream-7.0.0
ImportĀ upstreamĀ versionĀ 7.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* $XFree86: xc/programs/Xserver/hw/xfree86/parser/xf86Optrec.h,v 1.11 2003/08/24 17:37:08 dawes Exp $ */
 
2
/* 
 
3
 * 
 
4
 * Copyright (c) 1997  Metro Link Incorporated
 
5
 * 
 
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:
 
12
 * 
 
13
 * The above copyright notice and this permission notice shall be included in
 
14
 * all copies or substantial portions of the Software.
 
15
 * 
 
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
 
22
 * SOFTWARE.
 
23
 * 
 
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.
 
27
 * 
 
28
 */
 
29
/*
 
30
 * Copyright (c) 1997-2001 by The XFree86 Project, Inc.
 
31
 *
 
32
 * Permission is hereby granted, free of charge, to any person obtaining a
 
33
 * copy of this software and associated documentation files (the "Software"),
 
34
 * to deal in the Software without restriction, including without limitation
 
35
 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
 
36
 * and/or sell copies of the Software, and to permit persons to whom the
 
37
 * Software is furnished to do so, subject to the following conditions:
 
38
 *
 
39
 * The above copyright notice and this permission notice shall be included in
 
40
 * all copies or substantial portions of the Software.
 
41
 *
 
42
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 
43
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 
44
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
 
45
 * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
 
46
 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
 
47
 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 
48
 * OTHER DEALINGS IN THE SOFTWARE.
 
49
 *
 
50
 * Except as contained in this notice, the name of the copyright holder(s)
 
51
 * and author(s) shall not be used in advertising or otherwise to promote
 
52
 * the sale, use or other dealings in this Software without prior written
 
53
 * authorization from the copyright holder(s) and author(s).
 
54
 */
 
55
 
 
56
 
 
57
/* 
 
58
 * This file contains the Option Record that is passed between the Parser,
 
59
 * and Module setup procs.
 
60
 */
 
61
#ifdef HAVE_XORG_CONFIG_H
 
62
#include <xorg-config.h>
 
63
#endif
 
64
 
 
65
#ifndef _xf86Optrec_h_
 
66
#define _xf86Optrec_h_
 
67
#include <stdio.h>
 
68
 
 
69
/* 
 
70
 * all records that need to be linked lists should contain a GenericList as
 
71
 * their first field.
 
72
 */
 
73
typedef struct generic_list_rec
 
74
{
 
75
        void *next;
 
76
}
 
77
GenericListRec, *GenericListPtr, *glp;
 
78
 
 
79
/*
 
80
 * All options are stored using this data type.
 
81
 */
 
82
typedef struct
 
83
{
 
84
        GenericListRec list;
 
85
        char *opt_name;
 
86
        char *opt_val;
 
87
        int opt_used;
 
88
        char *opt_comment;
 
89
}
 
90
XF86OptionRec, *XF86OptionPtr;
 
91
 
 
92
 
 
93
XF86OptionPtr xf86addNewOption(XF86OptionPtr head, char *name, char *val);
 
94
XF86OptionPtr xf86optionListDup(XF86OptionPtr opt);
 
95
void xf86optionListFree(XF86OptionPtr opt);
 
96
char *xf86optionName(XF86OptionPtr opt);
 
97
char *xf86optionValue(XF86OptionPtr opt);
 
98
XF86OptionPtr xf86newOption(char *name, char *value);
 
99
XF86OptionPtr xf86nextOption(XF86OptionPtr list);
 
100
XF86OptionPtr xf86findOption(XF86OptionPtr list, const char *name);
 
101
char *xf86findOptionValue(XF86OptionPtr list, const char *name);
 
102
int xf86findOptionBoolean (XF86OptionPtr, const char *, int);
 
103
XF86OptionPtr xf86optionListCreate(const char **options, int count, int used);
 
104
XF86OptionPtr xf86optionListMerge(XF86OptionPtr head, XF86OptionPtr tail);
 
105
char *xf86configStrdup (const char *s);
 
106
int xf86nameCompare (const char *s1, const char *s2);
 
107
char *xf86uLongToString(unsigned long i);
 
108
void xf86debugListOptions(XF86OptionPtr);
 
109
XF86OptionPtr xf86parseOption(XF86OptionPtr head);
 
110
void xf86printOptionList(FILE *fp, XF86OptionPtr list, int tabs);
 
111
 
 
112
 
 
113
#endif /* _xf86Optrec_h_ */