summaryrefslogtreecommitdiffstats
path: root/contrib/binutils/gas/listing.c
diff options
context:
space:
mode:
authorobrien <obrien@FreeBSD.org>2002-01-27 12:00:11 +0000
committerobrien <obrien@FreeBSD.org>2002-01-27 12:00:11 +0000
commitfc89183cdc6be5afa8deb7250fd15a20832ab528 (patch)
tree5c493199a70976c54e1b9c6a7804a3de85b43e84 /contrib/binutils/gas/listing.c
parent94820fd8060f6f43089d1a3ddb8a482402e7e494 (diff)
downloadFreeBSD-src-fc89183cdc6be5afa8deb7250fd15a20832ab528.zip
FreeBSD-src-fc89183cdc6be5afa8deb7250fd15a20832ab528.tar.gz
Enlist the FreeBSD-CURRENT users as testers of what is to become Binutils
version 2.12.0. These bits are taken from the FSF anoncvs repo on 27-January-2002 03:41 PST.
Diffstat (limited to 'contrib/binutils/gas/listing.c')
-rw-r--r--contrib/binutils/gas/listing.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/contrib/binutils/gas/listing.c b/contrib/binutils/gas/listing.c
index 8168ebe..c92f2db 100644
--- a/contrib/binutils/gas/listing.c
+++ b/contrib/binutils/gas/listing.c
@@ -91,10 +91,9 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
on a line
*/
-#include <ctype.h>
-
#include "as.h"
#include <obstack.h>
+#include "safe-ctype.h"
#include "input-file.h"
#include "subsegs.h"
@@ -370,7 +369,7 @@ listing_newline (ps)
unsigned char c = *src++;
/* Omit control characters in the listing. */
- if (isascii (c) && ! iscntrl (c))
+ if (!ISCNTRL (c))
*dest++ = c;
}
@@ -485,7 +484,7 @@ buffer_line (file, line, size)
}
last_open_file_info = file;
- last_open_file = fopen (file->filename, "r");
+ last_open_file = fopen (file->filename, FOPEN_RT);
if (last_open_file == NULL)
{
file->at_end = 1;
@@ -514,9 +513,12 @@ buffer_line (file, line, size)
if (c == EOF)
{
file->at_end = 1;
- *p++ = '.';
- *p++ = '.';
- *p++ = '.';
+ if (count + 2 < size)
+ {
+ *p++ = '.';
+ *p++ = '.';
+ *p++ = '.';
+ }
}
file->linenum++;
*p++ = 0;
@@ -908,7 +910,7 @@ debugging_pseudo (list, line)
was_debug = in_debug;
in_debug = 0;
- while (isspace ((unsigned char) *line))
+ while (ISSPACE (*line))
line++;
if (*line != '.')
@@ -1121,7 +1123,7 @@ listing_print (name)
}
else
{
- list_file = fopen (name, "w");
+ list_file = fopen (name, FOPEN_WT);
if (list_file != NULL)
using_stdout = 0;
else
@@ -1295,7 +1297,7 @@ listing_title (depth)
}
else if (*input_line_pointer == '\n')
{
- as_bad (_("New line in title"));
+ as_bad (_("new line in title"));
demand_empty_rest_of_line ();
return;
}
OpenPOWER on IntegriCloud