This _printf project is about building a function as similar as possible to the original printf.
- The main function uses structures to call the function corresponding to the case.
- The function has a buffer that stores and prints the output strings every 1024 bytes just like the original printf.
- The returns of our function are the number of characters printed, and when there's an incorrect input the return is going to be -1 as an error, just like the original printf.
FILE | DESCRIPTION |
---|---|
_printf | Function that prints like printf |
holberton.h | Header file that contains our prototypes and includes. |
get_format | Chooses the format to be used. |
formats.c | Contains main function formats to print: %c, %s, '%', %d. |
formats_advanced_1.c | Contains %R format specifier to encode to rot13, and %r to reverse a string |
formats_advanced_2.c | Contains advanced function formats to print: %b, %u, %o, %X, %x |
_string.c | Concatenates a string to the buffer to print the strings you want. |
memory.c | Checks size of buffer and allocates memory to be printed |
utilities.c | Contains: _itoa, _uitoa_b_o_h, rev_string, and rot13 functions |
man_3_printf | Our manual with documentation about the function _printf |
- Planned modules for printf (Miro).
- First draft of flowchart.
- Proof of concept for task 1 (basic printf with `%c`, `%s` and `%%`).
- Function pointers for proof of concept.
- Structure for printf's modules.
- Function pointers implementation of proof of concept for task 1.
- Edge cases for printf's function pointer implementation.
- Implementation of %d and %i.
- Buffer allocation.
- Edge cases for printf's function pointer implementation.
- Implementation of %d and %i.
- Buffer allocation.
- Buffer allocation.
- Planning for split work, implementation of other formats.
- Discussion about flags, width and precision
- Implementation of strconcat
- Plan how to implement more than two characters after the format %
- Alfredo will work in: %b, %X, %x, %R
- Daniel will work in %u, %o, %r