diff options
Diffstat (limited to 'newlib/libc/stdlib')
-rw-r--r-- | newlib/libc/stdlib/mbtowc_r.c | 2 | ||||
-rw-r--r-- | newlib/libc/stdlib/mprec.h | 2 | ||||
-rw-r--r-- | newlib/libc/stdlib/wctomb_r.c | 2 |
3 files changed, 2 insertions, 4 deletions
diff --git a/newlib/libc/stdlib/mbtowc_r.c b/newlib/libc/stdlib/mbtowc_r.c index d84fef5a2..7c6be69ea 100644 --- a/newlib/libc/stdlib/mbtowc_r.c +++ b/newlib/libc/stdlib/mbtowc_r.c @@ -78,7 +78,6 @@ typedef enum { COPY_A, COPY_J1, COPY_J2, MAKE_A, NOOP, EMPTY, ERROR } JIS_ACTION * is 2 (switch to JIS) + 2 (JIS characters) + 2 (switch back to ASCII) = 6. *************************************************************************************/ -#ifndef __CYGWIN__ static JIS_STATE JIS_state_table[JIS_S_NUM][JIS_C_NUM] = { /* ESCAPE DOLLAR BRACKET AT B J NUL JIS_CHAR OTHER */ /* ASCII */ { A_ESC, ASCII, ASCII, ASCII, ASCII, ASCII, ASCII, ASCII, ASCII }, @@ -100,7 +99,6 @@ static JIS_ACTION JIS_action_table[JIS_S_NUM][JIS_C_NUM] = { /* J_ESC */ { ERROR, ERROR, NOOP, ERROR, ERROR, ERROR, ERROR, ERROR, ERROR }, /* J_ESC_BR */{ ERROR, ERROR, ERROR, ERROR, MAKE_A, MAKE_A, ERROR, ERROR, ERROR }, }; -#endif /* !__CYGWIN__ */ /* we override the mbstate_t __count field for more complex encodings and use it store a state value */ #define __state __count diff --git a/newlib/libc/stdlib/mprec.h b/newlib/libc/stdlib/mprec.h index 5a71576be..dea89bf11 100644 --- a/newlib/libc/stdlib/mprec.h +++ b/newlib/libc/stdlib/mprec.h @@ -98,7 +98,7 @@ typedef union { double d; __ULong i[2]; } U; #define SI 0 #endif -#define Storeinc(a,b,c) (*(a)++ = ((b) << 16) | ((c) & 0xffff)) +#define Storeinc(a,b,c) (*(a)++ = (b) << 16 | (c) & 0xffff) /* #define P DBL_MANT_DIG */ /* Ten_pmax = floor(P*log(2)/log(5)) */ diff --git a/newlib/libc/stdlib/wctomb_r.c b/newlib/libc/stdlib/wctomb_r.c index 13e1e4c36..98a0b74c0 100644 --- a/newlib/libc/stdlib/wctomb_r.c +++ b/newlib/libc/stdlib/wctomb_r.c @@ -81,7 +81,7 @@ _DEFUN (__utf8_wctomb, (r, s, wchar, charset, state), to return extra 3 bytes. */ wchar_t tmp; tmp = (state->__value.__wchb[0] << 16 | state->__value.__wchb[1] << 8) - - (0x10000 >> 10 | 0xd80d); + - 0x10000 >> 10 | 0xd80d; *s++ = 0xe0 | ((tmp & 0xf000) >> 12); *s++ = 0x80 | ((tmp & 0xfc0) >> 6); *s++ = 0x80 | (tmp & 0x3f); |