1/* input_file.h header for input-file.c 2 Copyright (C) 1987 Free Software Foundation, Inc. 3 4This file is part of GAS, the GNU Assembler. 5 6GAS is free software; you can redistribute it and/or modify 7it under the terms of the GNU General Public License as published by 8the Free Software Foundation; either version 1, or (at your option) 9any later version. 10 11GAS is distributed in the hope that it will be useful, 12but WITHOUT ANY WARRANTY; without even the implied warranty of 13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14GNU General Public License for more details. 15 16You should have received a copy of the GNU General Public License 17along with GAS; see the file COPYING. If not, write to 18the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ 19 20/*"input_file.c":Operating-system dependant functions to read source files.*/ 21 22 23/* 24 * No matter what the operating system, this module must provide the 25 * following services to its callers. 26 * 27 * input_file_begin() Call once before anything else. 28 * 29 * input_file_end() Call once after everything else. 30 * 31 * input_file_buffer_size() Call anytime. Returns largest possible 32 * delivery from 33 * input_file_give_next_buffer(). 34 * 35 * input_file_open(name) Call once for each input file. 36 * 37 * input_file_give_next_buffer(where, Call once to get each new buffer. 38 * give_next_size) Return 0: no more chars left in file, 39 * the file has already been closed. 40 * Otherwise: return a pointer to just 41 * after the last character we read 42 * into the buffer. 43 * If we can only read 0 characters, then 44 * end-of-file is faked. 45 * give_next_size is the BUFFER_SIZE it 46 * will use next. 47 * 48 * All errors are reported (using as_perror) so caller doesn't have to think 49 * about I/O errors. No I/O errors are fatal: an end-of-file may be faked. 50 */ 51extern FILE *f_in; 52extern char *file_name; 53 54#ifdef SUSPECT 55extern int preprocess; 56#endif 57 58extern void input_file_begin( 59 void); 60extern void input_file_end( 61 void); 62extern int input_file_buffer_size( 63 void); 64extern int input_file_is_open( 65 void); 66extern void input_file_open( 67 char *filename, 68 int pre); 69extern char *input_file_give_next_buffer( 70 char *where, 71 int *give_next_size); 72