summaryrefslogtreecommitdiffstats
path: root/contrib/binutils/binutils/strings.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/binutils/binutils/strings.c')
-rw-r--r--contrib/binutils/binutils/strings.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/contrib/binutils/binutils/strings.c b/contrib/binutils/binutils/strings.c
index 8bc618a..10dc05f 100644
--- a/contrib/binutils/binutils/strings.c
+++ b/contrib/binutils/binutils/strings.c
@@ -1,5 +1,5 @@
/* strings -- print the strings of printable characters in files
- Copyright (C) 1993, 94, 95, 96, 97, 98, 99, 2000
+ Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
@@ -78,7 +78,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')
@@ -143,7 +146,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);
OpenPOWER on IntegriCloud