Changes in boot/generic/src/str.c [8e893ae:9d58539] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
boot/generic/src/str.c
r8e893ae r9d58539 100 100 #include <str.h> 101 101 #include <errno.h> 102 103 /** Check the condition if wchar_t is signed */104 #ifdef WCHAR_IS_UNSIGNED105 #define WCHAR_SIGNED_CHECK(cond) (true)106 #else107 #define WCHAR_SIGNED_CHECK(cond) (cond)108 #endif109 102 110 103 /** Byte mask consisting of lowest @n bits (out of 8) */ … … 205 198 * code was invalid. 206 199 */ 207 int chr_encode( constwchar_t ch, char *str, size_t *offset, size_t size)200 int chr_encode(wchar_t ch, char *str, size_t *offset, size_t size) 208 201 { 209 202 if (*offset >= size) … … 332 325 bool ascii_check(wchar_t ch) 333 326 { 334 if ( WCHAR_SIGNED_CHECK(ch >= 0) && (ch <= 127))327 if ((ch >= 0) && (ch <= 127)) 335 328 return true; 336 329 … … 345 338 bool chr_check(wchar_t ch) 346 339 { 347 if ( WCHAR_SIGNED_CHECK(ch >= 0) && (ch <= 1114111))340 if ((ch >= 0) && (ch <= 1114111)) 348 341 return true; 349 342
Note:
See TracChangeset
for help on using the changeset viewer.