1 #ifndef _TOKE_STRSUBVOCAB_H 2 #define _TOKE_STRSUBVOCAB_H 3 4 5 /* 6 * OpenBIOS - free your system! 7 * ( FCode tokenizer ) 8 * 9 * This program is part of a free implementation of the IEEE 1275-1994 10 * Standard for Boot (Initialization Configuration) Firmware. 11 * 12 * Copyright (C) 2001-2005 Stefan Reinauer, <stepan@openbios.org> 13 * 14 * This program is free software; you can redistribute it and/or modify 15 * it under the terms of the GNU General Public License as published by 16 * the Free Software Foundation; version 2 of the License. 17 * 18 * This program is distributed in the hope that it will be useful, 19 * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 * GNU General Public License for more details. 22 * 23 * You should have received a copy of the GNU General Public License 24 * along with this program; if not, write to the Free Software 25 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA, 02110-1301 USA 26 * 27 */ 28 29 /* ************************************************************************** 30 * 31 * Headers, general-purpose support structures, function prototypes 32 * and macros for String-Substitution-type vocabularies. 33 * 34 * (C) Copyright 2005 IBM Corporation. All Rights Reserved. 35 * Module Author: David L. Paktor dlpaktor@us.ibm.com 36 * 37 **************************************************************************** */ 38 39 /* ************************************************************************** 40 * 41 * Structures: 42 * str_sub_vocab_t Entry in a String-Substitution-type vocab 43 * 44 * Macros: 45 * BUILTIN_STR_SUB Add an entry to the initial Str-Sub vocab. 46 * 47 **************************************************************************** */ 48 49 #include "types.h" 50 51 52 typedef struct str_sub_vocab { 53 u8 *name; 54 u8 *alias; 55 struct str_sub_vocab *next; 56 } str_sub_vocab_t; 57 58 59 void add_str_sub_entry( char *ename, 60 char *subst_str, 61 str_sub_vocab_t **str_sub_vocab ); 62 str_sub_vocab_t *lookup_str_sub( char *tname, str_sub_vocab_t *str_sub_vocab ); 63 bool exists_in_str_sub( char *tname, str_sub_vocab_t *str_sub_vocab ); 64 65 66 #endif /* _TOKE_STRSUBVOCAB_H */ 67