2018-11-11 00:44:04 +01:00
|
|
|
#include <ctype.h>
|
|
|
|
#include <string.h>
|
|
|
|
|
2019-04-17 23:13:07 +02:00
|
|
|
extern "C" {
|
|
|
|
|
|
|
|
const char _ctype_[256] = {
|
|
|
|
_C, _C, _C, _C, _C, _C, _C, _C,
|
|
|
|
_C, _C|_S, _C|_S, _C|_S, _C|_S, _C|_S, _C, _C,
|
|
|
|
_C, _C, _C, _C, _C, _C, _C, _C,
|
|
|
|
_C, _C, _C, _C, _C, _C, _C, _C,
|
|
|
|
(char)(_S|_B), _P, _P, _P, _P, _P, _P, _P,
|
|
|
|
_P, _P, _P, _P, _P, _P, _P, _P,
|
|
|
|
_N, _N, _N, _N, _N, _N, _N, _N,
|
|
|
|
_N, _N, _P, _P, _P, _P, _P, _P,
|
|
|
|
_P, _U|_X, _U|_X, _U|_X, _U|_X, _U|_X, _U|_X, _U,
|
|
|
|
_U, _U, _U, _U, _U, _U, _U, _U,
|
|
|
|
_U, _U, _U, _U, _U, _U, _U, _U,
|
|
|
|
_U, _U, _U, _P, _P, _P, _P, _P,
|
|
|
|
_P, _L|_X, _L|_X, _L|_X, _L|_X, _L|_X, _L|_X, _L,
|
|
|
|
_L, _L, _L, _L, _L, _L, _L, _L,
|
|
|
|
_L, _L, _L, _L, _L, _L, _L, _L,
|
|
|
|
_L, _L, _L, _P, _P, _P, _P, _C
|
|
|
|
};
|
|
|
|
|
|
|
|
int tolower(int c)
|
2019-02-26 15:57:59 +01:00
|
|
|
{
|
|
|
|
if (c >= 'A' && c <= 'Z')
|
|
|
|
return c | 0x20;
|
|
|
|
return c;
|
|
|
|
}
|
|
|
|
|
2019-04-17 23:13:07 +02:00
|
|
|
int toupper(int c)
|
2019-02-26 15:57:59 +01:00
|
|
|
{
|
|
|
|
if (c >= 'a' && c <= 'z')
|
|
|
|
return c & ~0x20;
|
|
|
|
return c;
|
|
|
|
}
|
2019-04-17 23:13:07 +02:00
|
|
|
|
|
|
|
}
|