summaryrefslogtreecommitdiff
path: root/libc/misc/internals/ltostr.c
diff options
context:
space:
mode:
authorManuel Novoa III <mjn3@codepoet.org>2002-03-12 01:18:50 +0000
committerManuel Novoa III <mjn3@codepoet.org>2002-03-12 01:18:50 +0000
commit03e039820dc5092e27e81f3671652f25da7f25f1 (patch)
tree37bddad6951b8a6aa5d75184353705f672217812 /libc/misc/internals/ltostr.c
parentff3e48d94097ed02480bb0df538620b221ccd72f (diff)
Swap in the new stdio code.
Diffstat (limited to 'libc/misc/internals/ltostr.c')
-rw-r--r--libc/misc/internals/ltostr.c39
1 files changed, 0 insertions, 39 deletions
diff --git a/libc/misc/internals/ltostr.c b/libc/misc/internals/ltostr.c
deleted file mode 100644
index 7e45fec30..000000000
--- a/libc/misc/internals/ltostr.c
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright (C) 2000 Manuel Novoa III
- *
- * Note: buf is a pointer to the END of the buffer passed.
- * Call like this:
- * char buf[SIZE], *p;
- * p = __ltostr(buf + sizeof(buf) - 1, ...)
- *
- * For longs of 32 bits, appropriate buffer sizes are:
- * base = 2 34 = 1 (possible -) sign + 32 digits + 1 nul
- * base = 10 12 = 1 (possible -) sign + 10 digits + 1 nul
- * base = 16 10 = 1 (possible -) sign + 8 hex digits + 1 nul
- */
-
-extern char *__ultostr(char *buf, unsigned long uval, int base, int uppercase);
-
-char *__ltostr(char *buf, long val, int base, int uppercase)
-{
- unsigned long uval;
- char *pos;
- int negative;
-
- negative = 0;
- if (val < 0) {
- negative = 1;
- uval = ((unsigned long)(-(1+val))) + 1;
- } else {
- uval = val;
- }
-
-
- pos = __ultostr(buf, uval, base, uppercase);
-
- if (pos && negative) {
- *--pos = '-';
- }
-
- return pos;
-}