diff options
Diffstat (limited to 'hw/xfree86/common/xf86Opt.h')
-rw-r--r-- | hw/xfree86/common/xf86Opt.h | 42 |
1 files changed, 37 insertions, 5 deletions
diff --git a/hw/xfree86/common/xf86Opt.h b/hw/xfree86/common/xf86Opt.h index dc5c2ca67..718732353 100644 --- a/hw/xfree86/common/xf86Opt.h +++ b/hw/xfree86/common/xf86Opt.h @@ -1,4 +1,31 @@ -/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86Opt.h,v 1.12 2001/05/04 19:05:30 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86Opt.h,v 1.15 2003/10/08 14:30:38 dawes Exp $ */ + +/* + * Copyright (c) 1998-2003 by The XFree86 Project, Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + * + * Except as contained in this notice, the name of the copyright holder(s) + * and author(s) shall not be used in advertising or otherwise to promote + * the sale, use or other dealings in this Software without prior written + * authorization from the copyright holder(s) and author(s). + */ /* Option handling things that ModuleSetup procs can use */ @@ -46,7 +73,11 @@ int xf86SetIntOption(pointer optlist, const char *name, int deflt); double xf86SetRealOption(pointer optlist, const char *name, double deflt); char *xf86SetStrOption(pointer optlist, const char *name, char *deflt); int xf86SetBoolOption(pointer list, const char *name, int deflt ); -pointer xf86AddNewOption(pointer head, char *name, char *val ); +int xf86CheckIntOption(pointer optlist, const char *name, int deflt); +double xf86CheckRealOption(pointer optlist, const char *name, double deflt); +char *xf86CheckStrOption(pointer optlist, const char *name, char *deflt); +int xf86CheckBoolOption(pointer list, const char *name, int deflt ); +pointer xf86AddNewOption(pointer head, const char *name, const char *val ); pointer xf86NewOption(char *name, char *value ); pointer xf86NextOption(pointer list ); pointer xf86OptionListCreate(const char **options, int count, int used); @@ -76,7 +107,8 @@ Bool xf86GetOptValBool(const OptionInfoRec *table, int token, Bool *value); Bool xf86ReturnOptValBool(const OptionInfoRec *table, int token, Bool def); int xf86NameCmp(const char *s1, const char *s2); char *xf86NormalizeName(const char *s); -pointer xf86ReplaceIntOption(pointer optlist, char *name, int val); -pointer xf86ReplaceBoolOption(pointer optlist, char *name, Bool val); -pointer xf86ReplaceStrOption(pointer optlist, char *name, char* val); +pointer xf86ReplaceIntOption(pointer optlist, const char *name, const int val); +pointer xf86ReplaceRealOption(pointer optlist, const char *name, const double val); +pointer xf86ReplaceBoolOption(pointer optlist, const char *name, const Bool val); +pointer xf86ReplaceStrOption(pointer optlist, const char *name, const char* val); #endif |