Improve performance of printf functions

This commit is contained in:
Justine Tunney 2021-04-24 13:58:34 -07:00
parent b107d2709f
commit dc6d11a031
39 changed files with 577 additions and 650 deletions

View file

@ -18,8 +18,9 @@
*/
#include "libc/fmt/fmts.h"
int __fmt_pad(int out(long, void *), void *arg, unsigned long n) {
int __fmt_pad(int out(const char *, void *, size_t), void *arg,
unsigned long n) {
int i, rc;
for (rc = i = 0; i < n; ++i) rc |= out(' ', arg);
for (rc = i = 0; i < n; ++i) rc |= out(" ", arg, 1);
return rc;
}