The versatility of the printf function in C represents a great exercise in programming. It one of the main computer science principles discovered in this project are variadic functions. The key to a successful ft_printf is a well-structured and good extensible code. Using jump tables and pointer functions will be essential in achieving this task.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
Tested on macOS High Sierra with gcc version 9.1.0
git clone https://github.com/nikrom17/ft_printf.git
cd ft_printf
- run
make
to compile the library and produce alibftprintf.a
file - to make use of the library run
gcc -L. -lftprintf your_c_file.c
while in theft_printf/
directory- you can move the
libftprintf.a
file into your project repo but you must also copy over thelibft.h
andft_printf.h
header file - if you decide to move the library, run
gcc -L<path_to_library> -lftprintf your_c_file.c
- you can move the
- Makefile commands:
re
,clean
,fclean
, andall
Nik Roman