00001 #ifndef _TOKE_DEVNODE_H 00002 #define _TOKE_DEVNODE_H 00003 00004 /* 00005 * OpenBIOS - free your system! 00006 * ( FCode tokenizer ) 00007 * 00008 * This program is part of a free implementation of the IEEE 1275-1994 00009 * Standard for Boot (Initialization Configuration) Firmware. 00010 * 00011 * Copyright (C) 2001-2005 Stefan Reinauer, <stepan@openbios.org> 00012 * 00013 * This program is free software; you can redistribute it and/or modify 00014 * it under the terms of the GNU General Public License as published by 00015 * the Free Software Foundation; version 2 of the License. 00016 * 00017 * This program is distributed in the hope that it will be useful, 00018 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00019 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00020 * GNU General Public License for more details. 00021 * 00022 * You should have received a copy of the GNU General Public License 00023 * along with this program; if not, write to the Free Software 00024 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA, 02110-1301 USA 00025 * 00026 */ 00027 00028 /* ************************************************************************** 00029 * 00030 * External/Prototype/Structure definitions for device-node management 00031 * 00032 * (C) Copyright 2005 IBM Corporation. All Rights Reserved. 00033 * Module Author: David L. Paktor dlpaktor@us.ibm.com 00034 * 00035 **************************************************************************** */ 00036 00037 #include <stdio.h> 00038 #include <stdlib.h> 00039 00040 #include "types.h" 00041 #include "ticvocab.h" 00042 00043 /* ************************************************************************** 00044 * Structure Name: device_node_t 00045 * Data for managing a device node; pointers 00046 * to vocabs, data for messaging. 00047 * 00048 * Fields: 00049 * parent_node Pointer to similar data for parent node 00050 * line_no Copy of Line Number where "new-device" was invoked 00051 * ifile_name Name of Input File where "new-device" was invoked 00052 * tokens_vocab Pointer to vocab for this device's tokens 00053 * 00054 **************************************************************************** */ 00055 00056 typedef struct device_node { 00057 struct device_node *parent_node ; 00058 char *ifile_name ; 00059 unsigned int line_no ; 00060 tic_hdr_t *tokens_vocab ; 00061 } device_node_t; 00062 00063 00064 /* ************************************************************************** * 00065 * 00066 * Global Variables Exported 00067 * 00068 **************************************************************************** */ 00069 00070 extern char default_top_dev_ifile_name[]; 00071 extern device_node_t *current_device_node; 00072 extern tic_hdr_t **current_definitions; 00073 00074 /* ************************************************************************** * 00075 * 00076 * Function Prototypes / Functions Exported: 00077 * 00078 **************************************************************************** */ 00079 void new_device_vocab( void ); 00080 void delete_device_vocab( void ); 00081 void finish_device_vocab( void ); 00082 char *in_what_node(device_node_t *the_node); 00083 void show_node_start( void); 00084 bool exists_in_ancestor( char *m_name); 00085 00086 #endif /* _TOKE_DEVNODE_H */