Add setlocale LC_CTYPE

Fix icase searches for 8bit charsets
This commit is contained in:
Andrey A. Chernov 1995-10-28 19:16:14 +00:00
parent efce212686
commit 9203a11a55
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=11887
2 changed files with 7 additions and 1 deletions

View file

@ -19,6 +19,9 @@
#include <errno.h>
#include <stdio.h>
#ifdef __FreeBSD__
#include <locale.h>
#endif
#ifndef errno
extern int errno;
@ -606,6 +609,9 @@ main(argc, argv)
extern char *optarg;
extern int optind;
#ifdef __FreeBSD__
(void) setlocale(LC_CTYPE, "");
#endif
prog = argv[0];
if (prog && strrchr(prog, '/'))
prog = strrchr(prog, '/') + 1;

View file

@ -46,7 +46,7 @@ extern char *memchr();
#define bcopy(s, d, n) memcpy((d), (s), (n))
#endif
#ifdef isascii
#if defined(isascii) && !defined(__FreeBSD__)
#define ISALNUM(C) (isascii(C) && isalnum(C))
#define ISUPPER(C) (isascii(C) && isupper(C))
#else