Includes & Portability
Yesterday I made more progress on printf:
It’s already handling all the flags except for the wildcard '*', which is the hardest.
I also learned that some constant are located in different headers depending on the OS.
A good example of this is ARG_MAX, that’s can be found in limits.h on macOS,
and in linux/limits.h on linux.
For portability reasons it’s a really good idea to check and include the
system-appropriate headers in your projects, especially if you’re developing on
linux (like I am).
# include <limits.h>
# ifdef __linux__
# include <linux / limits.h>
# endif
I hope to finish the printf by tomorrow if possible.