diff options
author | Mattias Andrée <maandree@kth.se> | 2021-09-07 21:19:06 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2021-09-07 21:19:06 +0200 |
commit | a99f76780df899d861b19b35b724ebe37861adec (patch) | |
tree | cb6cb15236935bfee55a8c83110ce5a006e72711 | |
parent | Test denominators (diff) | |
download | libnumtext-a99f76780df899d861b19b35b724ebe37861adec.tar.gz libnumtext-a99f76780df899d861b19b35b724ebe37861adec.tar.bz2 libnumtext-a99f76780df899d861b19b35b724ebe37861adec.tar.xz |
Remove leftover code
Signed-off-by: Mattias Andrée <maandree@kth.se>
-rw-r--r-- | swedish.c | 14 |
1 files changed, 1 insertions, 13 deletions
@@ -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) |