Skip to content

Commit 41e0af1

Browse files
authored
Merge pull request #815 from fjtrujy/clean_sysclib
sysclib/ctype: add extern declaration for look_ctype_table in header
2 parents 8f8386b + caa3353 commit 41e0af1

3 files changed

Lines changed: 8 additions & 9 deletions

File tree

iop/system/sysclib/include/ctype.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,13 @@
2020
extern "C" {
2121
#endif
2222

23+
extern unsigned char look_ctype_table(char character);
24+
extern void *get_ctype_table();
25+
26+
/* These functions are non-standardized (char instead of int) */
27+
extern char _toupper(char c);
28+
extern char _tolower(char c);
29+
2330
#define isascii(c) ((unsigned int)(c) <= 127)
2431
#define toascii(c) ((unsigned char)(c) & 127)
2532

iop/system/sysclib/include/sysclib.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,6 @@ typedef void (*print_callback_t)(void *context, int c);
3030

3131
/* setjmp/longjmp are already defined in setjmp.h */
3232

33-
/* These functions are non-standardized (char instead of int) */
34-
extern char _toupper(char c);
35-
extern char _tolower(char c);
36-
3733
/* These functions are non-standardized (IOP-only functions operating on 32-bit integers instead of wchar_t) */
3834
extern void *_wmemcopy(u32 *dest, const u32 *src, size_t size);
3935
extern void *_wmemset(u32 *dest, u32 c, size_t size);
@@ -45,10 +41,6 @@ extern void *_wmemset(u32 *dest, u32 c, size_t size);
4541
/* This function is non-standard. */
4642
extern int prnt(print_callback_t, void *context, const char * format, va_list ap);
4743

48-
/* These functions are used in the process of ctype.h and is non-standard. */
49-
extern unsigned char look_ctype_table(char character);
50-
extern void *get_ctype_table();
51-
5244
/* This function is non-standard. */
5345
extern char *atob(char *s, int *i);
5446

iop/system/sysclib/src/nonstd/ctype.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#define SYSCLIB_DISABLE_BUILTINS
1212
#include <sysclib.h>
1313

14-
unsigned char ctype_table[128] = {
14+
static unsigned char ctype_table[128] = {
1515
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
1616
0x20, 0x08, 0x08, 0x08, 0x08, 0x08, 0x20, 0x20,
1717
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,

0 commit comments

Comments
 (0)