00001 #ifndef _TOKE_STRSUBVOCAB_H 00002 #define _TOKE_STRSUBVOCAB_H 00003 00004 00005 /* 00006 * OpenBIOS - free your system! 00007 * ( FCode tokenizer ) 00008 * 00009 * This program is part of a free implementation of the IEEE 1275-1994 00010 * Standard for Boot (Initialization Configuration) Firmware. 00011 * 00012 * Copyright (C) 2001-2005 Stefan Reinauer, <stepan@openbios.org> 00013 * 00014 * This program is free software; you can redistribute it and/or modify 00015 * it under the terms of the GNU General Public License as published by 00016 * the Free Software Foundation; version 2 of the License. 00017 * 00018 * This program is distributed in the hope that it will be useful, 00019 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00020 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00021 * GNU General Public License for more details. 00022 * 00023 * You should have received a copy of the GNU General Public License 00024 * along with this program; if not, write to the Free Software 00025 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA, 02110-1301 USA 00026 * 00027 */ 00028 00029 /* ************************************************************************** 00030 * 00031 * Headers, general-purpose support structures, function prototypes 00032 * and macros for String-Substitution-type vocabularies. 00033 * 00034 * (C) Copyright 2005 IBM Corporation. All Rights Reserved. 00035 * Module Author: David L. Paktor dlpaktor@us.ibm.com 00036 * 00037 **************************************************************************** */ 00038 00039 /* ************************************************************************** 00040 * 00041 * Structures: 00042 * str_sub_vocab_t Entry in a String-Substitution-type vocab 00043 * 00044 * Macros: 00045 * BUILTIN_STR_SUB Add an entry to the initial Str-Sub vocab. 00046 * 00047 **************************************************************************** */ 00048 00049 #include "types.h" 00050 00051 00052 typedef struct str_sub_vocab { 00053 u8 *name; 00054 u8 *alias; 00055 struct str_sub_vocab *next; 00056 } str_sub_vocab_t; 00057 00058 #if 0 /* On the way out */ 00059 /* 00060 * BUILTIN_STR_SUB Add an entry to the initial Str-Sub vocab. 00061 * 00062 * Arguments: (Both are strings) 00063 * princ Principal name by which the string is known 00064 * subst Substitution-string that replaces the Principal. 00065 */ 00066 #define BUILTIN_STR_SUB(princ, subst) \ 00067 { princ , subst , (str_sub_vocab_t *)NULL } 00068 #endif /* On the way out */ 00069 00070 00071 void init_str_sub_vocab( str_sub_vocab_t *str_sub_vocab_tbl, 00072 int max_indx); 00073 void add_str_sub_entry( char *ename, 00074 char *subst_str, 00075 str_sub_vocab_t **str_sub_vocab ); 00076 char *lookup_str_sub( char *tname, str_sub_vocab_t *str_sub_vocab ); 00077 bool create_str_sub_alias(char *new_name, 00078 char *old_name, 00079 str_sub_vocab_t **str_sub_vocab ); 00080 bool exists_in_str_sub( char *tname, str_sub_vocab_t *str_sub_vocab ); 00081 void reset_str_sub_vocab( str_sub_vocab_t **str_sub_vocab , 00082 str_sub_vocab_t *reset_position ); 00083 00084 00085 #endif /* _TOKE_STRSUBVOCAB_H */