133965Sjdp/* input_file.h header for input-file.c
2218822Sdim   Copyright 1987, 1992, 1993, 2000, 2003, 2005, 2006
3218822Sdim   Free Software Foundation, Inc.
433965Sjdp
533965Sjdp   This file is part of GAS, the GNU Assembler.
633965Sjdp
733965Sjdp   GAS is free software; you can redistribute it and/or modify
833965Sjdp   it under the terms of the GNU General Public License as published by
933965Sjdp   the Free Software Foundation; either version 2, or (at your option)
1033965Sjdp   any later version.
1133965Sjdp
1233965Sjdp   GAS is distributed in the hope that it will be useful,
1333965Sjdp   but WITHOUT ANY WARRANTY; without even the implied warranty of
1433965Sjdp   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1533965Sjdp   GNU General Public License for more details.
1633965Sjdp
1733965Sjdp   You should have received a copy of the GNU General Public License
1877298Sobrien   along with GAS; see the file COPYING.  If not, write to the Free
19218822Sdim   Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
20218822Sdim   02110-1301, USA.  */
2133965Sjdp
2233965Sjdp/*"input_file.c":Operating-system dependant functions to read source files.*/
2333965Sjdp
2433965Sjdp/*
2533965Sjdp * No matter what the operating system, this module must provide the
2633965Sjdp * following services to its callers.
2733965Sjdp *
2833965Sjdp * input_file_begin()			Call once before anything else.
2933965Sjdp *
3033965Sjdp * input_file_end()			Call once after everything else.
3133965Sjdp *
3233965Sjdp * input_file_buffer_size()		Call anytime. Returns largest possible
3333965Sjdp *					delivery from
3433965Sjdp *					input_file_give_next_buffer().
3533965Sjdp *
3633965Sjdp * input_file_open(name)		Call once for each input file.
3733965Sjdp *
3833965Sjdp * input_file_give_next_buffer(where)	Call once to get each new buffer.
3933965Sjdp *					Return 0: no more chars left in file,
4033965Sjdp *					   the file has already been closed.
4133965Sjdp *					Otherwise: return a pointer to just
4233965Sjdp *					   after the last character we read
4333965Sjdp *					   into the buffer.
4433965Sjdp *					If we can only read 0 characters, then
4533965Sjdp *					end-of-file is faked.
4633965Sjdp *
4733965Sjdp * input_file_push()			Push state, which can be restored
4833965Sjdp *					later.  Does implicit input_file_begin.
4933965Sjdp *					Returns char * to saved state.
5033965Sjdp *
5133965Sjdp * input_file_pop (arg)			Pops previously saved state.
5233965Sjdp *
5333965Sjdp * input_file_close ()			Closes opened file.
5433965Sjdp *
55218822Sdim * All errors are reported so caller doesn't have to think
56218822Sdim * about I/O errors.
5733965Sjdp */
5833965Sjdp
59130561Sobrienchar *input_file_give_next_buffer (char *where);
60130561Sobrienchar *input_file_push (void);
61130561Sobrienunsigned int input_file_buffer_size (void);
62130561Sobrienvoid input_file_begin (void);
63130561Sobrienvoid input_file_close (void);
64130561Sobrienvoid input_file_end (void);
65130561Sobrienvoid input_file_open (char *filename, int pre);
66130561Sobrienvoid input_file_pop (char *arg);
67