Changes in kernel/generic/src/lib/str.c [8e893ae:933cadf] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/lib/str.c
r8e893ae r933cadf 111 111 #include <debug.h> 112 112 #include <macros.h> 113 114 /** Check the condition if wchar_t is signed */115 #ifdef WCHAR_IS_UNSIGNED116 #define WCHAR_SIGNED_CHECK(cond) (true)117 #else118 #define WCHAR_SIGNED_CHECK(cond) (cond)119 #endif120 113 121 114 /** Byte mask consisting of lowest @n bits (out of 8) */ … … 213 206 * 214 207 * @return EOK if the character was encoded successfully, EOVERFLOW if there 215 * 216 * 217 */ 218 int chr_encode( constwchar_t ch, char *str, size_t *offset, size_t size)208 * was not enough space in the output buffer or EINVAL if the character 209 * code was invalid. 210 */ 211 int chr_encode(wchar_t ch, char *str, size_t *offset, size_t size) 219 212 { 220 213 if (*offset >= size) … … 434 427 bool ascii_check(wchar_t ch) 435 428 { 436 if ( WCHAR_SIGNED_CHECK(ch >= 0) && (ch <= 127))429 if ((ch >= 0) && (ch <= 127)) 437 430 return true; 438 431 … … 447 440 bool chr_check(wchar_t ch) 448 441 { 449 if ( WCHAR_SIGNED_CHECK(ch >= 0) && (ch <= 1114111))442 if ((ch >= 0) && (ch <= 1114111)) 450 443 return true; 451 444 … … 900 893 * 901 894 */ 902 int str_uint64 _t(const char *nptr, char **endptr, unsigned int base,895 int str_uint64(const char *nptr, char **endptr, unsigned int base, 903 896 bool strict, uint64_t *result) 904 897 {
Note:
See TracChangeset
for help on using the changeset viewer.