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