summaryrefslogtreecommitdiff
path: root/binutils/windres.c
diff options
context:
space:
mode:
authorH.J. Lu <hjl@lucon.org>2001-09-19 05:33:36 +0000
committerH.J. Lu <hjl@lucon.org>2001-09-19 05:33:36 +0000
commit75e56203c5a58ad68a2015e0c7da2590093a3ec0 (patch)
treee91126f6df5579aaae921d5b82dc556b8c174966 /binutils/windres.c
parent196eb9fb0228e90f1f5c43a65372657f443580da (diff)
downloadbinutils-redhat-75e56203c5a58ad68a2015e0c7da2590093a3ec0.tar.gz
Locale changes from Bruno Haible <haible@clisp.cons.org>.
Diffstat (limited to 'binutils/windres.c')
-rw-r--r--binutils/windres.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/binutils/windres.c b/binutils/windres.c
index d76f35e722..f802706e36 100644
--- a/binutils/windres.c
+++ b/binutils/windres.c
@@ -1,5 +1,5 @@
/* windres.c -- a program to manipulate Windows resources
- Copyright 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+ Copyright 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
Written by Ian Lance Taylor, Cygnus Support.
This file is part of GNU Binutils.
@@ -39,11 +39,11 @@
#include "getopt.h"
#include "bucomm.h"
#include "libiberty.h"
+#include "safe-ctype.h"
#include "obstack.h"
#include "windres.h"
#include <assert.h>
-#include <ctype.h>
#include <time.h>
/* used by resrc.c at least */
@@ -679,11 +679,11 @@ format_from_filename (filename, input)
return RES_FORMAT_RES;
/* If every character is printable or space, assume it's an RC file. */
- if ((isprint (b1) || isspace (b1))
- && (isprint (b2) || isspace (b2))
- && (isprint (b3) || isspace (b3))
- && (isprint (b4) || isspace (b4))
- && (isprint (b5) || isspace (b5)))
+ if ((ISPRINT (b1) || ISSPACE (b1))
+ && (ISPRINT (b2) || ISSPACE (b2))
+ && (ISPRINT (b3) || ISSPACE (b3))
+ && (ISPRINT (b4) || ISSPACE (b4))
+ && (ISPRINT (b5) || ISSPACE (b5)))
return RES_FORMAT_RC;
/* Otherwise, we give up. */
@@ -789,6 +789,9 @@ main (argc, argv)
#if defined (HAVE_SETLOCALE) && defined (HAVE_LC_MESSAGES)
setlocale (LC_MESSAGES, "");
#endif
+#if defined (HAVE_SETLOCALE)
+ setlocale (LC_CTYPE, "");
+#endif
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);