Loading...
--- Libc/Libc-1725.40.4/stdio/FreeBSD/printfcommon.h
+++ Libc/Libc-763.12/stdio/FreeBSD/printfcommon.h
@@ -79,14 +79,14 @@
* remain valid until io_flush() is called.
*/
static inline int
-io_print(struct io_state *iop, const CHAR * __restrict ptr, int len, locale_t loc)
+io_print(struct io_state *iop, const CHAR * __restrict ptr, int len)
{
iop->iov[iop->uio.uio_iovcnt].iov_base = (char *)ptr;
iop->iov[iop->uio.uio_iovcnt].iov_len = len;
iop->uio.uio_resid += len;
if (++iop->uio.uio_iovcnt >= NIOV)
- return (__sprint(iop->fp, loc, &iop->uio));
+ return (__sprint(iop->fp, &iop->uio));
else
return (0);
}
@@ -107,13 +107,13 @@
* or the zeroes array.
*/
static inline int
-io_pad(struct io_state *iop, int howmany, const CHAR * __restrict with, locale_t loc)
+io_pad(struct io_state *iop, int howmany, const CHAR * __restrict with)
{
int n;
while (howmany > 0) {
n = (howmany >= PADSIZE) ? PADSIZE : howmany;
- if (io_print(iop, with, n, loc))
+ if (io_print(iop, with, n))
return (-1);
howmany -= n;
}
@@ -126,27 +126,27 @@
*/
static inline int
io_printandpad(struct io_state *iop, const CHAR *p, const CHAR *ep,
- int len, const CHAR * __restrict with, locale_t loc)
+ int len, const CHAR * __restrict with)
{
int p_len;
- p_len = (int)(ep - p);
+ p_len = ep - p;
if (p_len > len)
p_len = len;
if (p_len > 0) {
- if (io_print(iop, p, p_len, loc))
+ if (io_print(iop, p, p_len))
return (-1);
} else {
p_len = 0;
}
- return (io_pad(iop, len - p_len, with, loc));
+ return (io_pad(iop, len - p_len, with));
}
static inline int
-io_flush(struct io_state *iop, locale_t loc)
-{
-
- return (__sprint(iop->fp, loc, &iop->uio));
+io_flush(struct io_state *iop)
+{
+
+ return (__sprint(iop->fp, &iop->uio));
}
/*
@@ -168,7 +168,7 @@
switch (base) {
case 10:
if (val < 10) { /* many numbers are 1 digit */
- *--cp = (CHAR)to_char(val);
+ *--cp = to_char(val);
return (cp);
}
/*
@@ -205,7 +205,7 @@
break;
default: /* oops */
- LIBC_ABORT("__ultoa: invalid base=%d", base);
+ abort();
}
return (cp);
}
@@ -255,7 +255,7 @@
break;
default:
- LIBC_ABORT("__ujtoa: invalid base=%d", base);
+ abort();
}
return (cp);
}
@@ -295,7 +295,7 @@
*p++ = '0';
*p++ = to_char(exp);
}
- return (int)(p - p0);
+ return (p - p0);
}
#endif /* !NO_FLOATING_POINT */