Commit Graph

4 Commits

Author SHA1 Message Date
Lephe a05d3416f0
std: support integer size formats (hh, h, l, ll) 2019-09-19 15:58:35 +02:00
lephe c80debacd7 keyboard stdio: some fixes 2019-07-17 19:29:12 -04:00
lephe 1685813078 libc: fix a pointer overflow in kprint
When the size of the input buffer is not specified, the default was
INT_MAX; however this will cause the pointer value to overflow in many
situations, causing kprint_flush() to flush prematurely and write NUL
bytes at inappropriate places.

This commit changes the default size to 65535. Morale: never use
sprintf() or vsprintf()...
2019-07-16 19:13:26 -04:00
lephe 2d7a6f154e libc: implement a compliant formatted printer
This is based on a port of kprint, which supports standard formats and
options, except for:

* Large parameters (ll)
* Floating-point types (%e, %E, %f, %F, %g, %G, %a, %A)
2019-07-16 16:14:13 -04:00