diff options
Diffstat (limited to 'node.c')
-rw-r--r-- | node.c | 18 |
1 files changed, 1 insertions, 17 deletions
@@ -281,7 +281,6 @@ r_dupnode(NODE *n) r->flags &= ~FIELD; r->flags |= MALLOC; r->valref = 1; -#if MBS_SUPPORT /* * DON'T call free_wstr(r) here! * r->wstptr still points at n->wstptr's value, and we @@ -289,13 +288,11 @@ r_dupnode(NODE *n) */ r->wstptr = NULL; r->wstlen = 0; -#endif /* MBS_SUPPORT */ if ((n->flags & STRCUR) != 0) { emalloc(r->stptr, char *, n->stlen + 2, "r_dupnode"); memcpy(r->stptr, n->stptr, n->stlen); r->stptr[n->stlen] = '\0'; -#if MBS_SUPPORT if ((n->flags & WSTRCUR) != 0) { r->wstlen = n->wstlen; emalloc(r->wstptr, wchar_t *, sizeof(wchar_t) * (n->wstlen + 2), "r_dupnode"); @@ -303,7 +300,6 @@ r_dupnode(NODE *n) r->wstptr[n->wstlen] = L'\0'; r->flags |= WSTRCUR; } -#endif /* MBS_SUPPORT */ } return r; @@ -322,10 +318,8 @@ r_make_number(double x) r->valref = 1; r->stptr = NULL; r->stlen = 0; -#if MBS_SUPPORT r->wstptr = NULL; r->wstlen = 0; -#endif /* defined MBS_SUPPORT */ return r; } @@ -368,11 +362,8 @@ make_str_node(const char *s, size_t len, int flags) r->flags = (MALLOC|STRING|STRCUR); r->valref = 1; r->stfmt = -1; - -#if MBS_SUPPORT r->wstptr = NULL; r->wstlen = 0; -#endif /* MBS_SUPPORT */ if ((flags & ALREADY_MALLOCED) != 0) r->stptr = (char *) s; @@ -387,15 +378,12 @@ make_str_node(const char *s, size_t len, int flags) char *ptm; int c; const char *end; -#if MBS_SUPPORT mbstate_t cur_state; memset(& cur_state, 0, sizeof(cur_state)); -#endif end = &(r->stptr[len]); for (pf = ptm = r->stptr; pf < end;) { -#if MBS_SUPPORT /* * Keep multibyte characters together. This avoids * problems if a subsequent byte of a multibyte @@ -412,7 +400,7 @@ make_str_node(const char *s, size_t len, int flags) continue; } } -#endif + c = *pf++; if (c == '\\') { c = parse_escape(&pf); @@ -642,7 +630,6 @@ get_numbase(const char *s, bool use_locale) return 8; } -#if MBS_SUPPORT /* str2wstr --- convert a multibyte string to a wide string */ NODE * @@ -891,7 +878,6 @@ out: ; return NULL; } -#endif /* MBS_SUPPORT */ /* is_ieee_magic_val --- return true for +inf, -inf, +nan, -nan */ @@ -938,7 +924,6 @@ get_ieee_magic_val(const char *val) return v; } -#if MBS_SUPPORT wint_t btowc_cache[256]; /* init_btowc_cache --- initialize the cache */ @@ -951,7 +936,6 @@ void init_btowc_cache() btowc_cache[i] = btowc(i); } } -#endif #define BLOCKCHUNK 100 |