Back to index

cell-binutils  2.17cvs20070401
input-file.h
Go to the documentation of this file.
00001 /* input_file.h header for input-file.c
00002    Copyright 1987, 1992, 1993, 2000, 2003, 2005, 2006
00003    Free Software Foundation, Inc.
00004 
00005    This file is part of GAS, the GNU Assembler.
00006 
00007    GAS is free software; you can redistribute it and/or modify
00008    it under the terms of the GNU General Public License as published by
00009    the Free Software Foundation; either version 2, or (at your option)
00010    any later version.
00011 
00012    GAS is distributed in the hope that it will be useful,
00013    but WITHOUT ANY WARRANTY; without even the implied warranty of
00014    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015    GNU General Public License for more details.
00016 
00017    You should have received a copy of the GNU General Public License
00018    along with GAS; see the file COPYING.  If not, write to the Free
00019    Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
00020    02110-1301, USA.  */
00021 
00022 /*"input_file.c":Operating-system dependant functions to read source files.*/
00023 
00024 /*
00025  * No matter what the operating system, this module must provide the
00026  * following services to its callers.
00027  *
00028  * input_file_begin()                     Call once before anything else.
00029  *
00030  * input_file_end()                Call once after everything else.
00031  *
00032  * input_file_buffer_size()        Call anytime. Returns largest possible
00033  *                                 delivery from
00034  *                                 input_file_give_next_buffer().
00035  *
00036  * input_file_open(name)           Call once for each input file.
00037  *
00038  * input_file_give_next_buffer(where)     Call once to get each new buffer.
00039  *                                 Return 0: no more chars left in file,
00040  *                                    the file has already been closed.
00041  *                                 Otherwise: return a pointer to just
00042  *                                    after the last character we read
00043  *                                    into the buffer.
00044  *                                 If we can only read 0 characters, then
00045  *                                 end-of-file is faked.
00046  *
00047  * input_file_push()               Push state, which can be restored
00048  *                                 later.  Does implicit input_file_begin.
00049  *                                 Returns char * to saved state.
00050  *
00051  * input_file_pop (arg)                   Pops previously saved state.
00052  *
00053  * input_file_close ()                    Closes opened file.
00054  *
00055  * All errors are reported so caller doesn't have to think
00056  * about I/O errors.
00057  */
00058 
00059 char *input_file_give_next_buffer (char *where);
00060 char *input_file_push (void);
00061 unsigned int input_file_buffer_size (void);
00062 void input_file_begin (void);
00063 void input_file_close (void);
00064 void input_file_end (void);
00065 void input_file_open (char *filename, int pre);
00066 void input_file_pop (char *arg);