Skip to content

This project is pretty straightforward, you have to recode printf. You will learn what is and how to implement variadic functions. Once you validate it, you will reuse this function in your future projects.

Notifications You must be signed in to change notification settings

ayoubabounakif/ft_printf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

42cursus-ft_printf

This project is pretty straight forward. You will recode printf. You will then be allowed to reuse the function in your future projects. You will mainly learn how to use variadic arguments.

MAIN CHANGES:

  • Changes on ft_atoi to work better with this project.
  • Changes on ft_putchar so that ft_printf returns a global variable that gets incremented each time ft_putchar is called.
  • Treatment of NULL on ft_putstr so that it printfs (null) instead of nothing.
  • ft_strlen returns unsigned long long instead of size_t so that It could work with all cases of %p
  • Protection of memory allocations whenever there is a malloc() and changes of the global variable g_error that was set as 0 to -1 in case of errors.
  • I've written the code with the thought of having many files, so that each and every case gets treated by itself to make the code more readable.
  • This code is absolutely free of segmentation faults or aborts... on the cases and flags treated. [ Treated with this flag when compiling testers --> (-fsanitize=address) ] returns no memory problems now.

About

This project is pretty straightforward, you have to recode printf. You will learn what is and how to implement variadic functions. Once you validate it, you will reuse this function in your future projects.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published