PRINTF is a 42 Project that aims to mimic libc printf function
- Basic functions:
- parsing for flags, field_width, precision, length_modifier.
- parsing for conversion specifier.
- displaying UTF-8 characters.
- computing unsigned numbers in base 2, 8, 10 and 16.
- displaying signed numbers.
- displaying pointer address
- Bonus:
- Handles multi fd (use ft_dprintf(int fd, char const format, ...) instead of ft_printf)
- All flags stored on only 14 bits
- wildcard_length_modifier : replaces precision and field_width with parameter in va_list ap.
- print_len with %n (refer to ft_printf.c : *va_arg(ap, int *) = p->len;)
- ft_printf_putstr(strerror(errno), p) with %m
- colors with '{' and '}'
- %f and %F to print double
- At 145% of libc printf speed thanks to buffer addition and functions' optimization.
$> make
$> gcc libftprintf.a srcs/main.c && ./a.out
To contact me and helping me to (fix bugs || improve) FDF, feel free to e-mail me at angavrel at student dot 42 dot fr