summaryrefslogtreecommitdiffstats
path: root/contrib/binutils/gas/input-file.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/binutils/gas/input-file.c')
-rw-r--r--contrib/binutils/gas/input-file.c29
1 files changed, 15 insertions, 14 deletions
diff --git a/contrib/binutils/gas/input-file.c b/contrib/binutils/gas/input-file.c
index be029c2..634f6f7 100644
--- a/contrib/binutils/gas/input-file.c
+++ b/contrib/binutils/gas/input-file.c
@@ -1,5 +1,6 @@
/* input_file.c - Deal with Input Files -
- Copyright (C) 1987, 1990, 1991, 1992 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.
@@ -145,11 +147,11 @@ input_file_open (filename, pre)
else
{ /* use stdin for the input file. */
f_in = stdin;
- file_name = "{standard input}"; /* For error messages. */
+ file_name = _("{standard input}"); /* For error messages. */
}
if (f_in == (FILE *) 0)
{
- as_bad ("Can't open %s for reading.", file_name);
+ as_bad (_("Can't open %s for reading."), file_name);
as_perror ("%s", file_name);
return;
}
@@ -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);
+ as_perror (_("Can't read from %s"), file_name);
size = 0;
}
- *from = buf;
return size;
}
@@ -230,7 +231,7 @@ input_file_give_next_buffer (where)
size = fread (where, sizeof (char), BUFFER_SIZE, f_in);
if (size < 0)
{
- as_perror ("Can't read from %s", file_name);
+ as_perror (_("Can't read from %s"), file_name);
size = 0;
}
if (size)
@@ -238,7 +239,7 @@ input_file_give_next_buffer (where)
else
{
if (fclose (f_in))
- as_perror ("Can't close %s", file_name);
+ as_perror (_("Can't close %s"), file_name);
f_in = (FILE *) 0;
return_value = 0;
}
OpenPOWER on IntegriCloud