Main Page | Data Structures | File List | Data Fields | Globals

stream.h

Go to the documentation of this file.
00001 #ifndef _H_STREAM
00002 #define _H_STREAM
00003 
00004 /*
00005  *                     OpenBIOS - free your system! 
00006  *                         ( FCode tokenizer )
00007  *                          
00008  *  stream.h - prototypes for streaming functions. 
00009  *  
00010  *  This program is part of a free implementation of the IEEE 1275-1994 
00011  *  Standard for Boot (Initialization Configuration) Firmware.
00012  *
00013  *  Copyright (C) 2001-2005 Stefan Reinauer, <stepan@openbios.org>
00014  *
00015  *  This program is free software; you can redistribute it and/or modify
00016  *  it under the terms of the GNU General Public License as published by
00017  *  the Free Software Foundation; version 2 of the License.
00018  *
00019  *  This program is distributed in the hope that it will be useful,
00020  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00021  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00022  *  GNU General Public License for more details.
00023  *
00024  *  You should have received a copy of the GNU General Public License
00025  *  along with this program; if not, write to the Free Software
00026  *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA, 02110-1301 USA
00027  *
00028  */
00029 
00030 /* **************************************************************************
00031  *         Modifications made in 2005 by IBM Corporation
00032  *      (C) Copyright 2005 IBM Corporation.  All Rights Reserved.
00033  *      Modifications Author:  David L. Paktor    dlpaktor@us.ibm.com
00034  **************************************************************************** */
00035 
00036 #include "types.h"
00037 
00038 /* **************************************************************************
00039  *
00040  *          Exported Global Variables
00041  *
00042  **************************************************************************** */
00043 
00044 /* input pointers */
00045 extern u8 *start;
00046 extern u8 *pc;
00047 extern u8 *end;
00048 extern char             *iname;
00049 extern unsigned int lineno;         /* Line Number within current input file  */
00050 extern unsigned int abs_token_no;   /* Absolute Token Number in Source Input  */
00051 
00052 /* output pointers */
00053 extern char *oname;         /* output file name  */
00054 
00055 extern unsigned int opc;    /* output buffer position counter  */
00056 
00057 /* **************************************************************************
00058  *
00059  *    Note that the variables  ostart  and  olen , as well as the routine
00060  *         increase_output_buffer  are not listed here.
00061  *
00062  *    We would have preferred to isolate them completely, but we would have
00063  *        to disrupt the organization of  emit.c  (which we'd rather not);
00064  *        in order to avoid exporting them any more widely than necessary,
00065  *        we will declare them  extern  only in the file where they are
00066  *        unavoidably needed.
00067  *
00068  **************************************************************************** */
00069 
00070 /* **************************************************************************
00071  *          Macro Name:    OUTPUT_SIZE
00072  *                        Initial size of the Output Buffer
00073  *
00074  **************************************************************************** */
00075 
00076 #define OUTPUT_SIZE     131072
00077 
00078 
00079 /* **************************************************************************
00080  *
00081  *          Exported Functions
00082  *
00083  **************************************************************************** */
00084 
00085 void add_to_include_list( char *dir_compt);
00086 void display_include_list( void);
00087 FILE *open_expanded_file( const char *path_name, char *mode, char *for_what);
00088 bool init_stream( const char *name );
00089 void close_stream( _PTR dummy);
00090 void init_output( const char *inname, const char *outname );
00091 bool close_output(void);
00092 void init_inbuf(char *inbuf, unsigned int buflen);
00093 
00094 #endif   /* _H_STREAM */

Generated on Fri Aug 18 14:03:39 2006 for Toke1.0 by  doxygen 1.4.4