This project is part of the official curriculum at School 42.
In School 42, almost every project must be written to comply with. coding standard (also known as the "Norm"). As a result, the implementation of certain parts may appear strange.
- Official instructions
- Module documentation
- The goal of this project is to practice the following concepts
- variadic functions
- dispatch tables – loose coupling and performance
- void pointers – generic programming
- optimization patterns – buffering
- Only the following functions are allowed
write
malloc
free
exit
- functions of
stdarg
- The project (with the exception of tests) is consistent with the Norme, the code standard accepted at School 42. In particular, this means that
- no comments inline or inside functions
for
loops andswitch
statements are forbidden- each function must be maximum 25 lines
- no functional macros
- As per instructions, the project is realised using
libft
written in a previous project.
Standard
-
csp%
conversions -
diouxX
conversions withhh
,h
,l
,ll
flags -
f
conversion with flagsL
,l
-
#0-+
flag management (when applicable) - minimum field-width
- precision
-
*
flag management
Extra
-
b
conversion to print in binary - variants of
printf
ft_dprintf
ft_vprintf
ft_vdprintf
ft_sprintf
ft_snprintf
ft_vsprintf
ft_vsnprintf
ft_asprintf
ft_vasprintf
- colors
ft_printf("{red} Color-print.{eoc} Normal print.")
- red, blue, yellow, green, cyan, magenta
Run tests with make test
- Behaviour is tested with Unity
- Performance is benchmarked against
printf(3)
Many of the included tests are borrowed from pft by gavinfielder and other contributors and Moulitest by yyang42 and other contributors. My thanks go to them.
If you have any questions, please contact me on Github.