From a99f76780df899d861b19b35b724ebe37861adec Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Tue, 7 Sep 2021 21:19:06 +0200 Subject: Remove leftover code MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- swedish.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/swedish.c b/swedish.c index 0322b2d..ac080a0 100644 --- a/swedish.c +++ b/swedish.c @@ -229,8 +229,7 @@ libnumtext_num2text_swedish__(char *outbuf, size_t outbuf_size, const char *num, const char *great_10, *great_10_prefix, *gsuffix; const char *great_100, *great_100_prefix, *gprefix; char affix[2] = {[1] = 0}; - size_t great_order, small_order, great_order_suffix; - size_t i, offset; + size_t great_order, small_order, great_order_suffix, i; const char *append_for_ordinal = NULL; size_t trailing_zeroes; struct state state; @@ -252,19 +251,10 @@ libnumtext_num2text_swedish__(char *outbuf, size_t outbuf_size, const char *num, append(&state, num[0] == '+' ? "Plus-" : "Min¦us-"); else append(&state, num[0] == '+' ? "Plus " : "Min¦us "); - offset = state.len; - if (offset > state.outbuf_size) - offset = state.outbuf_size; - state.outbuf += offset; - state.outbuf_size -= offset; - offset = state.len; - state.len = 0; do { num++; num_len--; } while ((*num & 0xC0) == 0x80); - } else { - offset = 0; } while (num_len > 1 && num[0] == '0') { @@ -509,8 +499,6 @@ libnumtext_num2text_swedish__(char *outbuf, size_t outbuf_size, const char *num, suffix(&state); out: - state.len += offset; - if (state.len < outbuf_size) outbuf[state.len] = '\0'; else if (outbuf_size) -- cgit v1.2.3-70-g09d2