Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/lib/str.c

    r8e893ae r933cadf  
    111111#include <debug.h>
    112112#include <macros.h>
    113 
    114 /** Check the condition if wchar_t is signed */
    115 #ifdef WCHAR_IS_UNSIGNED
    116         #define WCHAR_SIGNED_CHECK(cond)  (true)
    117 #else
    118         #define WCHAR_SIGNED_CHECK(cond)  (cond)
    119 #endif
    120113
    121114/** Byte mask consisting of lowest @n bits (out of 8) */
     
    213206 *
    214207 * @return EOK if the character was encoded successfully, EOVERFLOW if there
    215  *         was not enough space in the output buffer or EINVAL if the character
    216  *         code was invalid.
    217  */
    218 int chr_encode(const wchar_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 */
     211int chr_encode(wchar_t ch, char *str, size_t *offset, size_t size)
    219212{
    220213        if (*offset >= size)
     
    434427bool ascii_check(wchar_t ch)
    435428{
    436         if (WCHAR_SIGNED_CHECK(ch >= 0) && (ch <= 127))
     429        if ((ch >= 0) && (ch <= 127))
    437430                return true;
    438431       
     
    447440bool chr_check(wchar_t ch)
    448441{
    449         if (WCHAR_SIGNED_CHECK(ch >= 0) && (ch <= 1114111))
     442        if ((ch >= 0) && (ch <= 1114111))
    450443                return true;
    451444       
     
    900893 *
    901894 */
    902 int str_uint64_t(const char *nptr, char **endptr, unsigned int base,
     895int str_uint64(const char *nptr, char **endptr, unsigned int base,
    903896    bool strict, uint64_t *result)
    904897{
Note: See TracChangeset for help on using the changeset viewer.