cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync/*
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync *
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync * Copyright (c) 1997 Metro Link Incorporated
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync *
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync * Permission is hereby granted, free of charge, to any person obtaining a
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync * copy of this software and associated documentation files (the "Software"),
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync * to deal in the Software without restriction, including without limitation
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync * the rights to use, copy, modify, merge, publish, distribute, sublicense,
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync * and/or sell copies of the Software, and to permit persons to whom the
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync * Software is furnished to do so, subject to the following conditions:
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync *
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync * The above copyright notice and this permission notice shall be included in
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync * all copies or substantial portions of the Software.
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync *
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync * THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync * SOFTWARE.
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync *
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync * Except as contained in this notice, the name of the Metro Link shall not be
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync * used in advertising or otherwise to promote the sale, use or other dealings
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync * in this Software without prior written authorization from Metro Link.
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync *
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync */
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync/*
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync * Copyright (c) 1997-2001 by The XFree86 Project, Inc.
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync *
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync * Permission is hereby granted, free of charge, to any person obtaining a
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync * copy of this software and associated documentation files (the "Software"),
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync * to deal in the Software without restriction, including without limitation
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync * the rights to use, copy, modify, merge, publish, distribute, sublicense,
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync * and/or sell copies of the Software, and to permit persons to whom the
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync * Software is furnished to do so, subject to the following conditions:
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync *
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync * The above copyright notice and this permission notice shall be included in
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync * all copies or substantial portions of the Software.
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync *
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync * OTHER DEALINGS IN THE SOFTWARE.
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync *
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync * Except as contained in this notice, the name of the copyright holder(s)
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync * and author(s) shall not be used in advertising or otherwise to promote
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync * the sale, use or other dealings in this Software without prior written
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync * authorization from the copyright holder(s) and author(s).
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync */
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync/*
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync * This file contains the Option Record that is passed between the Parser,
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync * and Module setup procs.
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync */
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync#ifdef HAVE_XORG_CONFIG_H
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync#include <xorg-config.h>
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync#endif
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync#ifndef _xf86Optrec_h_
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync#define _xf86Optrec_h_
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync#include <stdio.h>
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync#include <string.h>
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync#include <X11/Xfuncproto.h>
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync/*
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync * all records that need to be linked lists should contain a GenericList as
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync * their first field.
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync */
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsynctypedef struct generic_list_rec
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync{
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync void *next;
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync}
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsyncGenericListRec, *GenericListPtr, *glp;
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync/*
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync * All options are stored using this data type.
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync */
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsynctypedef struct
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync{
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync GenericListRec list;
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync char *opt_name;
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync char *opt_val;
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync int opt_used;
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync char *opt_comment;
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync}
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsyncXF86OptionRec, *XF86OptionPtr;
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsyncextern _X_EXPORT XF86OptionPtr xf86addNewOption(XF86OptionPtr head, char *name, char *val);
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsyncextern _X_EXPORT XF86OptionPtr xf86optionListDup(XF86OptionPtr opt);
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsyncextern _X_EXPORT void xf86optionListFree(XF86OptionPtr opt);
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsyncextern _X_EXPORT char *xf86optionName(XF86OptionPtr opt);
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsyncextern _X_EXPORT char *xf86optionValue(XF86OptionPtr opt);
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsyncextern _X_EXPORT XF86OptionPtr xf86newOption(char *name, char *value);
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsyncextern _X_EXPORT XF86OptionPtr xf86nextOption(XF86OptionPtr list);
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsyncextern _X_EXPORT XF86OptionPtr xf86findOption(XF86OptionPtr list, const char *name);
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsyncextern _X_EXPORT char *xf86findOptionValue(XF86OptionPtr list, const char *name);
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsyncextern _X_EXPORT XF86OptionPtr xf86optionListCreate(const char **options, int count, int used);
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsyncextern _X_EXPORT XF86OptionPtr xf86optionListMerge(XF86OptionPtr head, XF86OptionPtr tail);
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsyncextern _X_EXPORT int xf86nameCompare (const char *s1, const char *s2);
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsyncextern _X_EXPORT char *xf86uLongToString(unsigned long i);
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsyncextern _X_EXPORT XF86OptionPtr xf86parseOption(XF86OptionPtr head);
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsyncextern _X_EXPORT void xf86printOptionList(FILE *fp, XF86OptionPtr list, int tabs);
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync#endif /* _xf86Optrec_h_ */