Changes in boot/generic/src/str.c [8e893ae:4872160] in mainline


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • boot/generic/src/str.c

    r8e893ae r4872160  
    100100#include <str.h>
    101101#include <errno.h>
    102 
    103 /** Check the condition if wchar_t is signed */
    104 #ifdef WCHAR_IS_UNSIGNED
    105         #define WCHAR_SIGNED_CHECK(cond)  (true)
    106 #else
    107         #define WCHAR_SIGNED_CHECK(cond)  (cond)
    108 #endif
    109102
    110103/** Byte mask consisting of lowest @n bits (out of 8) */
     
    205198 *         code was invalid.
    206199 */
    207 int chr_encode(const wchar_t ch, char *str, size_t *offset, size_t size)
     200int chr_encode(wchar_t ch, char *str, size_t *offset, size_t size)
    208201{
    209202        if (*offset >= size)
     
    332325bool ascii_check(wchar_t ch)
    333326{
    334         if (WCHAR_SIGNED_CHECK(ch >= 0) && (ch <= 127))
     327        if ((ch >= 0) && (ch <= 127))
    335328                return true;
    336329       
     
    345338bool chr_check(wchar_t ch)
    346339{
    347         if (WCHAR_SIGNED_CHECK(ch >= 0) && (ch <= 1114111))
     340        if ((ch >= 0) && (ch <= 1114111))
    348341                return true;
    349342       
Note: See TracChangeset for help on using the changeset viewer.