diff options
author | Daniel Stenberg <daniel@haxx.se> | 2005-07-12 11:06:38 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2005-07-12 11:06:38 +0000 |
commit | db4fb9558535d880179701d3bc7520bc8c7d69ce (patch) | |
tree | dd400df2c2bbea0629a5d56976c41dad3ebed2a8 | |
parent | 2d8fd9cf8af10471800745e50895c8e0d90c6bc8 (diff) | |
download | rockbox-db4fb9558535d880179701d3bc7520bc8c7d69ce.tar.gz rockbox-db4fb9558535d880179701d3bc7520bc8c7d69ce.zip |
make the ctype array unsigned so that bit 7 (octal 0200) can be set and
used properly without warnings
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7120 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | apps/plugin.h | 2 | ||||
-rw-r--r-- | firmware/common/ctype.c | 36 | ||||
-rw-r--r-- | firmware/include/ctype.h | 2 |
3 files changed, 20 insertions, 20 deletions
diff --git a/apps/plugin.h b/apps/plugin.h index 36eccfe86f..c572ccbf65 100644 --- a/apps/plugin.h +++ b/apps/plugin.h | |||
@@ -285,7 +285,7 @@ struct plugin_api { | |||
285 | int (*strncasecmp)(const char *s1, const char *s2, size_t n); | 285 | int (*strncasecmp)(const char *s1, const char *s2, size_t n); |
286 | void* (*memset)(void *dst, int c, size_t length); | 286 | void* (*memset)(void *dst, int c, size_t length); |
287 | void* (*memcpy)(void *out, const void *in, size_t n); | 287 | void* (*memcpy)(void *out, const void *in, size_t n); |
288 | const char *_ctype_; | 288 | const unsigned char *_ctype_; |
289 | int (*atoi)(const char *str); | 289 | int (*atoi)(const char *str); |
290 | char *(*strchr)(const char *s, int c); | 290 | char *(*strchr)(const char *s, int c); |
291 | char *(*strcat)(char *s1, const char *s2); | 291 | char *(*strcat)(char *s1, const char *s2); |
diff --git a/firmware/common/ctype.c b/firmware/common/ctype.c index 651dacda86..6e9b4eb601 100644 --- a/firmware/common/ctype.c +++ b/firmware/common/ctype.c | |||
@@ -1,22 +1,22 @@ | |||
1 | #include <ctype.h> | 1 | #include <ctype.h> |
2 | 2 | ||
3 | const char _ctype_[257]={ | 3 | const unsigned char _ctype_[257]={ |
4 | 0, | 4 | 0, |
5 | _C, _C, _C, _C, _C, _C, _C, _C, | 5 | _C, _C, _C, _C, _C, _C, _C, _C, |
6 | _C, _C|_S, _C|_S, _C|_S, _C|_S, _C|_S, _C, _C, | 6 | _C, _C|_S, _C|_S, _C|_S, _C|_S, _C|_S, _C, _C, |
7 | _C, _C, _C, _C, _C, _C, _C, _C, | 7 | _C, _C, _C, _C, _C, _C, _C, _C, |
8 | _C, _C, _C, _C, _C, _C, _C, _C, | 8 | _C, _C, _C, _C, _C, _C, _C, _C, |
9 | _S|_B, _P, _P, _P, _P, _P, _P, _P, | 9 | _S|_B, _P, _P, _P, _P, _P, _P, _P, |
10 | _P, _P, _P, _P, _P, _P, _P, _P, | 10 | _P, _P, _P, _P, _P, _P, _P, _P, |
11 | _N, _N, _N, _N, _N, _N, _N, _N, | 11 | _N, _N, _N, _N, _N, _N, _N, _N, |
12 | _N, _N, _P, _P, _P, _P, _P, _P, | 12 | _N, _N, _P, _P, _P, _P, _P, _P, |
13 | _P, _U|_X, _U|_X, _U|_X, _U|_X, _U|_X, _U|_X, _U, | 13 | _P, _U|_X, _U|_X, _U|_X, _U|_X, _U|_X, _U|_X, _U, |
14 | _U, _U, _U, _U, _U, _U, _U, _U, | 14 | _U, _U, _U, _U, _U, _U, _U, _U, |
15 | _U, _U, _U, _U, _U, _U, _U, _U, | 15 | _U, _U, _U, _U, _U, _U, _U, _U, |
16 | _U, _U, _U, _P, _P, _P, _P, _P, | 16 | _U, _U, _U, _P, _P, _P, _P, _P, |
17 | _P, _L|_X, _L|_X, _L|_X, _L|_X, _L|_X, _L|_X, _L, | 17 | _P, _L|_X, _L|_X, _L|_X, _L|_X, _L|_X, _L|_X, _L, |
18 | _L, _L, _L, _L, _L, _L, _L, _L, | 18 | _L, _L, _L, _L, _L, _L, _L, _L, |
19 | _L, _L, _L, _L, _L, _L, _L, _L, | 19 | _L, _L, _L, _L, _L, _L, _L, _L, |
20 | _L, _L, _L, _P, _P, _P, _P, _C | 20 | _L, _L, _L, _P, _P, _P, _P, _C |
21 | }; | 21 | }; |
22 | 22 | ||
diff --git a/firmware/include/ctype.h b/firmware/include/ctype.h index f884b09f81..e0d20cc672 100644 --- a/firmware/include/ctype.h +++ b/firmware/include/ctype.h | |||
@@ -39,7 +39,7 @@ int _EXFUN(_toupper, (int __c)); | |||
39 | #ifdef PLUGIN | 39 | #ifdef PLUGIN |
40 | #define _ctype_ (rb->_ctype_) | 40 | #define _ctype_ (rb->_ctype_) |
41 | #else | 41 | #else |
42 | extern const char _ctype_[]; | 42 | extern const unsigned char _ctype_[257]; |
43 | #endif | 43 | #endif |
44 | 44 | ||
45 | #ifndef __cplusplus | 45 | #ifndef __cplusplus |