summaryrefslogtreecommitdiff
path: root/binutils/strings.c
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
commit9229e4083b32eae70b2cd33f32160b86e873eaa9 (patch)
treeaea36e9e56347a745a13c6bb08c33a1f36ea4a0b /binutils/strings.c
parent287dadd52fe26153aa1d7f5dd0ded519f7ff8335 (diff)
downloadbinutils-redhat-9229e4083b32eae70b2cd33f32160b86e873eaa9.tar.gz
Support printable characters outside of the ASCII range
Diffstat (limited to 'binutils/strings.c')
-rw-r--r--binutils/strings.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/binutils/strings.c b/binutils/strings.c
index d72cd19286..5d3aa6d4fa 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);