diff options
author | Ian Lance Taylor <ian@airs.com> | 1999-06-03 00:24:14 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 1999-06-03 00:24:14 +0000 |
commit | 2b47531bf9ef778773831ecb1b43186e95ffe8d7 (patch) | |
tree | 684eca49faf900f0045c5a6c14670c6cb1dcfa51 /gas/input-file.c | |
parent | 1af6dcd2bb59d35b0a2cd2e7898831e685bc043f (diff) | |
download | gdb-2b47531bf9ef778773831ecb1b43186e95ffe8d7.zip gdb-2b47531bf9ef778773831ecb1b43186e95ffe8d7.tar.gz gdb-2b47531bf9ef778773831ecb1b43186e95ffe8d7.tar.bz2 |
* app.c (input_buffer): New static variable.
(app_push): Save saved_input in allocated buffer.
(app_pop): Restored saved_input.
(do_scrub_chars): Change get parameter to take char * and int as
arguments. Change GET macro to pass input_buffer to get
function. Don't save input into allocated buffer.
* as.h (do_scrub_chars): Update declaration.
* input-file.c (input_file_get): Change to take char * and int.
Read data into passed in buffer. Remove static buffer.
* read.c (scrub_from_string): Change to take char * and int. Copy
data into passed in buffer.
Diffstat (limited to 'gas/input-file.c')
-rw-r--r-- | gas/input-file.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/gas/input-file.c b/gas/input-file.c index c63f7c9..634f6f7 100644 --- a/gas/input-file.c +++ b/gas/input-file.c @@ -1,5 +1,6 @@ /* input_file.c - Deal with Input Files - - Copyright (C) 1987, 1990, 1991, 1992, 1998 Free Software Foundation, Inc. + Copyright (C) 1987, 90, 91, 92, 93, 94, 95, 98, 1999 + Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. @@ -14,8 +15,9 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with GAS; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + along with GAS; see the file COPYING. If not, write to the Free + Software Foundation, 59 Temple Place - Suite 330, Boston, MA + 02111-1307, USA. */ /* * Confines all details of reading source bytes to this module. @@ -30,7 +32,7 @@ #include "as.h" #include "input-file.h" -static int input_file_get PARAMS ((char **)); +static int input_file_get PARAMS ((char *, int)); /* This variable is non-zero if the file currently being read should be preprocessed by app. It is zero if the file can be read straight in. @@ -191,19 +193,18 @@ input_file_close () /* This function is passed to do_scrub_chars. */ static int -input_file_get (from) - char **from; +input_file_get (buf, buflen) + char *buf; + int buflen; { - static char buf[BUFFER_SIZE]; int size; - size = fread (buf, sizeof (char), sizeof buf, f_in); + size = fread (buf, sizeof (char), buflen, f_in); if (size < 0) { as_perror (_("Can't read from %s"), file_name); size = 0; } - *from = buf; return size; } |