diff options
Diffstat (limited to 'stdio-common/_itoa.c')
-rw-r--r-- | stdio-common/_itoa.c | 45 |
1 files changed, 1 insertions, 44 deletions
diff --git a/stdio-common/_itoa.c b/stdio-common/_itoa.c index 36f9c17..08859f0 100644 --- a/stdio-common/_itoa.c +++ b/stdio-common/_itoa.c @@ -1,5 +1,5 @@ /* Internal function for converting integers to ASCII. - Copyright (C) 1994-2024 Free Software Foundation, Inc. + Copyright (C) 1994-2025 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -162,38 +162,6 @@ const struct base_table_t _itoa_base_table[] attribute_hidden = }; #endif -#if IS_IN (libc) -char * -_itoa_word (_ITOA_WORD_TYPE value, char *buflim, - unsigned int base, int upper_case) -{ - const char *digits = (upper_case - ? _itoa_upper_digits - : _itoa_lower_digits); - - switch (base) - { -#define SPECIAL(Base) \ - case Base: \ - do \ - *--buflim = digits[value % Base]; \ - while ((value /= Base) != 0); \ - break - - SPECIAL (10); - SPECIAL (16); - SPECIAL (8); - default: - do - *--buflim = digits[value % base]; - while ((value /= base) != 0); - } - return buflim; -} -#undef SPECIAL -#endif /* IS_IN (libc) */ - - #if _ITOA_NEEDED char * _itoa (unsigned long long int value, char *buflim, unsigned int base, @@ -460,17 +428,6 @@ _itoa (unsigned long long int value, char *buflim, unsigned int base, } #endif -char * -_fitoa_word (_ITOA_WORD_TYPE value, char *buf, unsigned int base, - int upper_case) -{ - char tmpbuf[sizeof (value) * 4]; /* Worst case length: base 2. */ - char *cp = _itoa_word (value, tmpbuf + sizeof (value) * 4, base, upper_case); - while (cp < tmpbuf + sizeof (value) * 4) - *buf++ = *cp++; - return buf; -} - #if _ITOA_NEEDED char * _fitoa (unsigned long long value, char *buf, unsigned int base, int upper_case) |