NSMBW-Decomp
A decompilation of New Super Mario Bros. Wii
Loading...
Searching...
No Matches
ctype.h
1#ifndef MSL_CTYPE_H
2#define MSL_CTYPE_H
3#include <types.h>
4#ifdef __cplusplus
5extern "C" {
6#endif
7
8typedef struct __CMap {
9 char UNK_0x0[0x10];
10 const u8* to_lower_table; // at 0x10
11 const u8* to_upper_table; // at 0x14
12} __CMap;
13
14typedef struct __Locale {
15 char UNK_0x0[0x38];
16 struct __CMap* cmap; // at 0x38
17 char UNK_0x3C[0x44 - 0x3C];
18} __Locale;
19
20extern __Locale _current_locale;
21
22inline int tolower(int x) {
23 return (x < 0 || x >= 256)
24 ? x
25 : (int)(&_current_locale)->cmap->to_lower_table[x];
26}
27
28inline int toupper(int x) {
29 return (x < 0 || x >= 256)
30 ? x
31 : (int)(&_current_locale)->cmap->to_upper_table[x];
32}
33
34#ifdef __cplusplus
35}
36#endif
37#endif
Definition ctype.h:8