/* nlsinit.c (emx+gcc) -- Copyright (c) 1992-1993 by Eberhard Mattes */

#include <sys/emx.h>
#include <sys/nls.h>

unsigned char _nls_toupper_tab[256];
unsigned char _nls_tolower_tab[256];

int _nls_init_flag = 0;

void _nls_init (void)
{
  int i;

  for (i = 0; i < 256; ++i)
    {
      _nls_toupper_tab[i] = (unsigned char)i;
      _nls_tolower_tab[i] = (unsigned char)i;
    }
  __nls_memupr (_nls_toupper_tab, 256);
  for (i = 0; i < 256; ++i)
    if (_nls_toupper_tab[i] != i)
      _nls_tolower_tab[_nls_toupper_tab[i]] = (unsigned char)i;
  for (i = 'A'; i <= 'Z'; ++i)
    _nls_tolower_tab[i] = (unsigned char)(i - 'A' + 'a');
  _nls_init_flag = 1;
}
