1117N/A * Copyright (c) 1997 Metro Link Incorporated 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 * The above copyright notice and this permission notice shall be included in 1117N/A * all copies or substantial portions of the Software. 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 * 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 * Copyright (c) 1997-2003 by The XFree86 Project, Inc. 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 * The above copyright notice and this permission notice shall be included in 1117N/A * all copies or substantial portions of the Software. 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 * 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 * these old keywords are turned into standard generic options. 1117N/A * we fall through here on purpose 1117N/A /* can't use strdup because it calls malloc */ 1117N/A * xf86addNewOptionOrValue() 1117N/A * Append a new Option record to the specified Option list if the 1117N/A * option name is not already present in the list. If the option 1117N/A * name is already present, replace the value, etc. of the existing 1117N/A * option. Return a pointer to the head of the list. 1117N/A char *
name,
/* Ptr to new option name string */ 1117N/A char *
val,
/* Ptr to new option value string */ 1117N/A * Disallow duplicate option names, discarding any but the last one 1117N/A * Note that xf86findOption() accepts NULL as the list head 1117N/A * and returns NULL in that case. 1117N/A//??? Memory leak in some or all cases (e.g. when old->used==1) ??? 1117N/A//??? xf86freeconfig(old->opt_name); 1117N/A//??? xf86freeconfig(old->opt_val); 1117N/A//??? Memory leak in some or all cases (e.g. when old->used==1) ??? 1117N/A * Insert and link the External Representation of this option 1117N/A * The External Representation of this new Option 1117N/A * line will be inserted just before the EndSection 1117N/A * or EndSubSection line (assuming our caller has 1117N/A * provided a pointer to the ER for the end line). 1117N/A * Add the new option and return the (new) list head 1117N/A * Mark the External Representation of this option as modified 1117N/A * If our caller hasn't provided a pointer (end_line_er) to 1117N/A * the External Representation of an EndSection or 1117N/A * EndSubSection line then it's likely that our caller isn't 1117N/A * on an SMI_FBCONFIG code path. 1117N/A * Return the unchanged list head, having modified an existing option 1117N/A * Append a new Option record to the specified Option list if the 1117N/A * option name is not already present in the list. If the option 1117N/A * name is already present, replace the value, etc. of the existing 1117N/A * option. Return a pointer to the head of the list. 1117N/A * This function searches the given option list for the named option and 1117N/A * returns a pointer to the option rec if found. If not found, it returns 1117N/A * Known Boolean option names, which accept a "No" prefix 1117N/A * merely for ease of its creation and potential maintenance. 1117N/A * What should the opposites of the following Boolean option 1117N/A * "NoTrapSignals" - "NoNoTrapSignals" or "TrapSignals" 1117N/A * "NoPM" - "NoNoPM" or "PM" 1117N/A * "NoInt10" - "NoNoInt10" or "Int10" 1117N/A "NoTrapSignals",
/* ??? Not a negated option name */ 1117N/A "NoPM",
/* ??? Not a negated option name */ 1117N/A "NoInt10",
/* ??? Not a negated option name */ 1117N/A * This function searches the given option list for the named option. If 1117N/A * found and the option has a parameter, a pointer to the parameter is 1117N/A * returned. If the option does not have a parameter, an empty string 1117N/A * is returned. If the option is not found, a NULL is returned. 1117N/A * Create and return a list of options from an array of option & 1117N/A * value string pairs. The size of the array is specified by a 1117N/A * non-negative "count" value or else by a NULL as the last element 1117N/A * of the array. The purpose of "used," which appears to be Boolean, 1117N/A * has been documented only by its name. 1117N/A /* can't use strdup because it calls malloc */ 1117N/A/* the 2 given lists are merged. If an option with the same name is present in 1117N/A * both, the option from the user list - specified in the second argument - 1117N/A * is used. The end result is a single valid list of options. Duplicates 1117N/A * are freed, and the original lists are no longer guaranteed to be complete. 1117N/A * Parse the current Option line. Complain about bad Option lines. 1117N/A * Discard duplicate option names. Otherwise, append the new option 1117N/A * to the Option list specified by "head." 1117N/A * Get a pointer to the External Representation of this Option line 1117N/A * Get the option name token 1117N/A * Get the option value token, if any, and comment string, if any 1117N/A * Disallow duplicate option names, discarding any but the first one 1117N/A * Note that xf86findOption() accepts NULL as the list head 1117N/A * and returns NULL in that case. 1117N/A * Link the Internal and External Representations of this Option line 1117N/A * Write an Option line to the output configuration file. 1117N/A * Comment or end-of-line text 1117N/A * Write the Option line, which may include an Option value 1117N/A * Write all of the Option lines of a (sub)section to the output