Changeset 8e893ae in mainline for boot/generic/src/str.c
- Timestamp:
- 2012-04-07T17:49:43Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- c7afcba7
- Parents:
- a4a0f1d
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
boot/generic/src/str.c
ra4a0f1d r8e893ae 100 100 #include <str.h> 101 101 #include <errno.h> 102 103 /** Check the condition if wchar_t is signed */ 104 #ifdef WCHAR_IS_UNSIGNED 105 #define WCHAR_SIGNED_CHECK(cond) (true) 106 #else 107 #define WCHAR_SIGNED_CHECK(cond) (cond) 108 #endif 102 109 103 110 /** Byte mask consisting of lowest @n bits (out of 8) */ … … 198 205 * code was invalid. 199 206 */ 200 int chr_encode( wchar_t ch, char *str, size_t *offset, size_t size)207 int chr_encode(const wchar_t ch, char *str, size_t *offset, size_t size) 201 208 { 202 209 if (*offset >= size) … … 325 332 bool ascii_check(wchar_t ch) 326 333 { 327 if ( (ch >= 0) && (ch <= 127))334 if (WCHAR_SIGNED_CHECK(ch >= 0) && (ch <= 127)) 328 335 return true; 329 336 … … 338 345 bool chr_check(wchar_t ch) 339 346 { 340 if ( (ch >= 0) && (ch <= 1114111))347 if (WCHAR_SIGNED_CHECK(ch >= 0) && (ch <= 1114111)) 341 348 return true; 342 349
Note:
See TracChangeset
for help on using the changeset viewer.