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 | 10538a6f4e0d0c5b5ba02c45a5247bcfe220c5ce (patch) | |
tree | 8d233c75550e2fa9ee69fef1e9c657ff2fc263aa /gas/input-file.c | |
parent | 8f014e057489672924efb9ef6a0b92c683f09633 (diff) | |
download | binutils-redhat-10538a6f4e0d0c5b5ba02c45a5247bcfe220c5ce.tar.gz |
* 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 c63f7c9b63..634f6f7393 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; } |