aboutsummaryrefslogtreecommitdiff
path: root/binutils
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2001-04-27 15:42:21 +0000
committerNick Clifton <nickc@redhat.com>2001-04-27 15:42:21 +0000
commit1c529ca6488b839df9511b0916ea74beade5d799 (patch)
treee853a06aa11bb3dd484fc3cab0285403ae910453 /binutils
parent87e6d782173c2d21d5f7ee1510a3b4f27a1fe68e (diff)
downloadfsf-binutils-gdb-1c529ca6488b839df9511b0916ea74beade5d799.zip
fsf-binutils-gdb-1c529ca6488b839df9511b0916ea74beade5d799.tar.gz
fsf-binutils-gdb-1c529ca6488b839df9511b0916ea74beade5d799.tar.bz2
Support printable characters outside of the ASCII range
Diffstat (limited to 'binutils')
-rw-r--r--binutils/ChangeLog6
-rw-r--r--binutils/strings.c7
2 files changed, 11 insertions, 2 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index 49d5064..73d2c14 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,9 @@
+2001-04-27 Michal Svec <rebel@atrey.karlin.mff.cuni.cz>
+
+ * strings.c (isgraphic): Do not use isascii() unless it is needed
+ for isprint() to work.
+ (main): Set the locale domain to LC_ALL not just LC_MESSAGES.
+
2001-04-27 Johan Rydberg <jrydberg@opencores.org>
* NEWS: Announce support for OpenRISC.
diff --git a/binutils/strings.c b/binutils/strings.c
index d72cd19..5d3aa6d 100644
--- a/binutils/strings.c
+++ b/binutils/strings.c
@@ -76,7 +76,10 @@
#endif
#endif
-#ifdef isascii
+/* Not all printable characters have ASCII codes (depending upon the
+ LOCALE set) but on some older systems it is not safe to test isprint
+ without first testing isascii... */
+#if defined isascii && !defined HAVE_LOCALE_H
#define isgraphic(c) (isascii (c) && (isprint (c) || (c) == '\t'))
#else
#define isgraphic(c) (isprint (c) || (c) == '\t')
@@ -141,7 +144,7 @@ main (argc, argv)
boolean files_given = false;
#if defined (HAVE_SETLOCALE) && defined (HAVE_LC_MESSAGES)
- setlocale (LC_MESSAGES, "");
+ setlocale (LC_ALL, "");
#endif
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);