daisvke / printf_mac

This library contains ft_printf, a function that will mimic the real printf function.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ft_printf_mac

libftprintf.a is a library that contains ft_printf, a function that will mimic the real printf function.

Install

git clone git@github.com:daisvke/printf_linux.git
make

Description

  • The difference with the linux version of printf is how 'null' values are printed
  • The function is declared as follows :
    int ft_printf(const char *, ...);
    
  • the attribute mechanism in the header allows us to attach characteristics to function declarations to allow the compiler to perform more error checking:
    __attribute__((format (printf, 1, 2)));
    

* It does not take care of the buffer management like the real printf.
* It will manage the following conversions: cspdiouxX%n.
* It will manage any combination of the following flags: '-0.*#' and minimum fieldwidth with all conversions.

Validation

This work has been validated by the following tests:

About

This library contains ft_printf, a function that will mimic the real printf function.


Languages

Language:C 96.7%Language:Makefile 3.3%