项目作者: BenSouchet

项目描述 :
School Project - Printf's Refactoring
高级语言: C
项目地址: git://github.com/BenSouchet/ft-printf.git
创建时间: 2017-04-21T10:59:41Z
项目社区:https://github.com/BenSouchet/ft-printf

开源协议:Other

下载


Ft_printf (Printf’s refactoring)

Project Overview

Ft_printf is a 42 Project that aims to mimic the printf function (included in ).





Bonus :
1) ~ at 175% faster than original printf (included in )!.
2) Handles multiple file descriptor (use ft_dprintf(int fd, char const format, …) instead of ft_printf).
3) All flags stored on only 14 bits.
4) Wildcard Length_modifier (%*) : replaces precision and field_width with parameter in va_list ap.
5) print_len with %n.
6) displaying errno with %m.
7) colors with ‘%{‘ (%{red}).
8) %f and %F to handle double and float numbers.

How to use it

Download and compile the library

  1. git clone https://github.com/BenjaminSouchet/Ft_printf.git ~/Ft_printf
  2. cd ~/Ft_printf
  3. make

Compile with your files

If you want to create a quick prog with the static library created before :
Add the include in your header.h or in your file ⇣

  1. #include "ft_printf.h"

Then compile just like that ⇣

  1. gcc -I include -o prog yourfile1.c yourfile2.c -L. -lftprintf

And execute it easily ⇣

  1. ./prog

Credits

This project was done in collaboration with Agav a.k.a Antonin Gavrel

Contact or contribute

If you want to contact me, or fix / improve this project, just send me a mail at bsouchet@student.42.fr