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