Add setlocale LC_CTYPE

This commit is contained in:
Andrey A. Chernov 1995-10-28 14:30:50 +00:00
parent ff501b3580
commit 404392d45c
2 changed files with 12 additions and 0 deletions

View File

@ -19,6 +19,9 @@ with groff; see the file COPYING. If not, write to the Free Software
Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#include <ctype.h>
#ifdef __FreeBSD__
#include <locale.h>
#endif
#include "cmap.h"
cmap cmlower(CMAP_BUILTIN);
@ -49,6 +52,9 @@ cmap_init::cmap_init()
if (initialised)
return;
initialised = 1;
#ifdef __FreeBSD__
(void) setlocale(LC_CTYPE, "");
#endif
for (int i = 0; i <= UCHAR_MAX; i++) {
cmupper.v[i] = ISASCII(i) && islower(i) ? toupper(i) : i;
cmlower.v[i] = ISASCII(i) && isupper(i) ? tolower(i) : i;

View File

@ -19,6 +19,9 @@ with groff; see the file COPYING. If not, write to the Free Software
Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#include <ctype.h>
#ifdef __FreeBSD__
#include <locale.h>
#endif
#include "cset.h"
cset csalpha(CSET_BUILTIN);
@ -86,6 +89,9 @@ cset_init::cset_init()
if (initialised)
return;
initialised = 1;
#ifdef __FreeBSD__
(void) setlocale(LC_CTYPE, "");
#endif
for (int i = 0; i <= UCHAR_MAX; i++) {
csalpha.v[i] = ISASCII(i) && isalpha(i);
csupper.v[i] = ISASCII(i) && isupper(i);