//your main.c file:
#include "ft_printf.h"
int main()
{
ft_printf("%d LIKE A BOSS %d\n", 1337, 1337);
}
//end of your main.c file
make -C ${PATH_TO_LIB_FOLDER}
gcc ${PATH_TO_LIB_FOLDER}/libftprintf.a -I ${PATH_TO_LIB_FOLDER}/includes main.c
./a.out
#SPACE0-+
hhhllljzL
- char -
%c - string -
%s - pointer -
%p - int -
%d,%i - int in octal system -
%o - unsigned int -
%u - int in hexadecimal system, upper/lower case -
%x,%X. - double -
%f,%F - additional type print int in binary -
%b
- On all types except fractional numbers ft_printf wotk or faster or slower within 10 percent.
- Fractional numbers implemented with long arithmetics.
- There are custom tests for a lot of strange and undefind behavior.
- There are generated tests for types diouxXf, that randomize flags, precision, width, modifier and type for both original and ft_printf and compares output.