about summary refs log tree commit diff
path: root/stdio-common/_itoa.c
diff options
context:
space:
mode:
Diffstat (limited to 'stdio-common/_itoa.c')
-rw-r--r--stdio-common/_itoa.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/stdio-common/_itoa.c b/stdio-common/_itoa.c
index 7bc6c08115..e39d88df7f 100644
--- a/stdio-common/_itoa.c
+++ b/stdio-common/_itoa.c
@@ -424,3 +424,23 @@ _itoa (value, buflim, base, upper_case)
 
   return buflim;
 }
+
+char *
+_fitoa_word (unsigned long 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;
+}
+
+char *
+_fitoa (unsigned long long value, char *buf, unsigned int base, int upper_case)
+{
+  char tmpbuf[sizeof (value) * 4];	      /* Worst case length: base 2.  */
+  char *cp = _itoa (value, tmpbuf + sizeof (value) * 4, base, upper_case);
+  while (cp < tmpbuf + sizeof (value) * 4)
+    *buf++ = *cp++;
+  return buf;
+}