This project is an exercise of the 42 school. The task is to recode the basics of
the libc printf
function. As a bonus, one can recode some flags as well as the
width and the precision. The projects subject is to teach how variadic functions work
in C, but also to teach how to organize bigger projects.
This repository shows my solutions of this exercise, although I have not done the bonus part.
I used the ModelViewController
principle for this project. The printing part
represents the View, the formatting part follows the model part of the principle.
I have not done the bonus part, it could be added quite easy though. Apart from the
MVC
principle, I used an object-orientied style.
If you wish to use this library, simply include the ft_printf.h
header and use its
Makefile
.
As all other C projects at the 42 school, the code has to written in accordance with the norm:
- Only 25 lines per function,
- only 5 functions per file,
- usage of only the allowed external functions.
© 2021 mhahnFr