0f47f59364
libc: make fprintf actually write to the chosen file
...
Also, printf now is kind of an alias for fprintf(stdout,...), as it should be.
2022-10-11 21:10:19 +02:00
93f6be9319
libc: Implement the start of a FILE* API (the standard, portable C way of doing file stuff)
2022-10-10 21:08:57 +02:00
49c7900407
Add %m to userspace printf
...
%m as a format specifier is a nonstandard glibc extension, but I like it so I'm implementing it.
What it does is print the value of strerror(errno), without consuming any arguments to printf().
2022-10-08 18:44:14 +02:00
3ee1f34bc4
Forgot to add break :)
...
And that, is why you test before pushing and commiting >.<
2022-10-08 18:08:50 +02:00
c67079dd74
Kernel, libc: Implement %p in *printf()
...
So we can avoid writing (unsigned long)ptr or (uint64_t)ptr everywhere when wanting to print a pointer.
2022-10-08 18:07:33 +02:00
028a1b1a3c
libc: Enable even more warnings
2022-10-07 18:19:06 +02:00
48b858af5a
libc: Add strncpy and strncat, and deprecate strcpy and strcat (which, since we're building with -Werror, is an instant ban from using these functions)
2022-10-04 19:08:59 +02:00
885e39f60f
libc: fix printf to actually print correct more-than-one-digit numbers (hint: the bugfix was a very stupid one)
2022-10-03 20:30:12 +02:00
cb60e418b2
Add vprintf, (v)sprintf and (v)snprintf to libc + move the non v-printfs to stdio.cpp, since they can now call their v-variants and thus don't depend on internal_printf
2022-10-03 19:59:33 +02:00
34aa953dbc
Add printf() and puts(), quite primitive, looks like hex printing isn't there yet...
2022-10-03 19:00:10 +02:00