Changes in uspace/lib/c/generic/str.c [8e893ae:059a8e4] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/str.c
r8e893ae r059a8e4 46 46 #include <mem.h> 47 47 #include <str.h> 48 49 /** Check the condition if wchar_t is signed */50 #ifdef WCHAR_IS_UNSIGNED51 #define WCHAR_SIGNED_CHECK(cond) (true)52 #else53 #define WCHAR_SIGNED_CHECK(cond) (cond)54 #endif55 48 56 49 /** Byte mask consisting of lowest @n bits (out of 8) */ … … 406 399 bool ascii_check(wchar_t ch) 407 400 { 408 if ( WCHAR_SIGNED_CHECK(ch >= 0) && (ch <= 127))401 if ((ch >= 0) && (ch <= 127)) 409 402 return true; 410 403 … … 419 412 bool chr_check(wchar_t ch) 420 413 { 421 if ( WCHAR_SIGNED_CHECK(ch >= 0) && (ch <= 1114111))414 if ((ch >= 0) && (ch <= 1114111)) 422 415 return true; 423 416 … … 520 513 * @param count Size of the destination buffer (must be > 0). 521 514 * @param src Source string. 522 *523 515 */ 524 516 void str_cpy(char *dest, size_t size, const char *src) … … 553 545 * @param src Source string. 554 546 * @param n Maximum number of bytes to read from @a src. 555 *556 547 */ 557 548 void str_ncpy(char *dest, size_t size, const char *src, size_t n)
Note:
See TracChangeset
for help on using the changeset viewer.