PS2SDK
PS2 Homebrew Libraries
ctype.c
1 /*
2 # _____ ___ ____ ___ ____
3 # ____| | ____| | | |____|
4 # | ___| |____ ___| ____| | \ PS2DEV Open Source Project.
5 #-----------------------------------------------------------------------
6 # Copyright 2001-2004, ps2dev - http://www.ps2dev.org
7 # Licenced under Academic Free License version 2.0
8 # Review ps2sdk README & LICENSE files for further details.
9 */
10 
11 #define SYSCLIB_DISABLE_BUILTINS
12 #include <sysclib.h>
13 
14 static unsigned char ctype_table[128] = {
15  0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
16  0x20, 0x08, 0x08, 0x08, 0x08, 0x08, 0x20, 0x20,
17  0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
18  0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
19 
20  0x18, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10,
21  0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10,
22  0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,
23  0x04, 0x04, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10,
24 
25  0x10, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x01,
26  0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
27  0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
28  0x01, 0x01, 0x01, 0x10, 0x10, 0x10, 0x10, 0x10,
29 
30  0x10, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x02,
31  0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,
32  0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,
33  0x02, 0x02, 0x02, 0x10, 0x10, 0x10, 0x10, 0x20};
34 
35 // non-standard function
36 unsigned char look_ctype_table(char character) {
37  return ctype_table[(unsigned char)character];
38 }
39 
40 // non-standard function
41 void *get_ctype_table() {
42  return ctype_table;
43 }
sysclib.h