42 Málaga Fundación Telefónica Cursus 2nd project.
This repository contains all archives for the project ft_printf in the School 42 Málaga core cursus. It's a library of functions in C language that emulates the printf function. The repository includes the Makefile
and the Libft
library.
About · Index · Requirements · Instructions · Testing · License
This project is a C library that emulates the printf function. The aim of rewrite printf is to get a better understanding of it and to get hablities when working with strings. Also we have worked with variadic The Libft functions can be used, so you can find a folder with the Libft library that we created in the 1st project. The bonus exercices of this porject have not been made. The code in this repository follows the rules of the Norminette.
ft_char
: To process %c optionft_check_input
: To work with the input stringft_hex_mayus
: To process %X optionft_hex
: To process %x optionft_integer
: To process %i or %d optionsft_itoa_hex
: To convert an hex number to stringft_itoa_long
: To convert an unsigned int to stringft_pointer
: To process %p optionft_printf
: To manage the other functionsft_putchar_fd_cont
: To write a char and increment the count of chars writtenft_replace_arg
: To substitute the the %cspdiuxX by the argumentft_string
: To process %s optionft_type
: To check that one of the %cspdiuxX have been pasedft_uint
: To process %u option
The library is written in C language and needs the gcc
compiler, with <stdlib.h>
, <stdarg.h>
and <unistd.h>
standard libraries to run.
To compile the library, go to its path and run:
make all
So you will compile the ft_printf functions and the libft ones.
To delete all files generated with make, go to the path and run:
make fclean
To use the library functions in your code, simply include this header:
#include "ft_printf.h"
ft_printf.h also includes libft.h
This library have been tested with the normal and strict mode of Francinette to the date of 22/12/2022.
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
You are free to:
- Share: copy and redistribute the material in any medium or format.
- Adapt: remix, transform, and build upon the material.
Under the following terms:
- Attribution: You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
- NonCommercial: You may not use the material for commercial purposes.
- ShareAlike: If you remix, transform, or build upon the material, you must distribute your contributions under the same license as the original.