Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/str.c

    r8e893ae r059a8e4  
    4646#include <mem.h>
    4747#include <str.h>
    48 
    49 /** Check the condition if wchar_t is signed */
    50 #ifdef WCHAR_IS_UNSIGNED
    51         #define WCHAR_SIGNED_CHECK(cond)  (true)
    52 #else
    53         #define WCHAR_SIGNED_CHECK(cond)  (cond)
    54 #endif
    5548
    5649/** Byte mask consisting of lowest @n bits (out of 8) */
     
    406399bool ascii_check(wchar_t ch)
    407400{
    408         if (WCHAR_SIGNED_CHECK(ch >= 0) && (ch <= 127))
     401        if ((ch >= 0) && (ch <= 127))
    409402                return true;
    410403       
     
    419412bool chr_check(wchar_t ch)
    420413{
    421         if (WCHAR_SIGNED_CHECK(ch >= 0) && (ch <= 1114111))
     414        if ((ch >= 0) && (ch <= 1114111))
    422415                return true;
    423416       
     
    520513 * @param count Size of the destination buffer (must be > 0).
    521514 * @param src   Source string.
    522  *
    523515 */
    524516void str_cpy(char *dest, size_t size, const char *src)
     
    553545 * @param src   Source string.
    554546 * @param n     Maximum number of bytes to read from @a src.
    555  *
    556547 */
    557548void str_ncpy(char *dest, size_t size, const char *src, size_t n)
Note: See TracChangeset for help on using the changeset viewer.