https://github.com/semx2a/ft_printf
Reverse engineering printf
https://github.com/semx2a/ft_printf
c library makefile reverse-engineering
Last synced: about 1 year ago
JSON representation
Reverse engineering printf
- Host: GitHub
- URL: https://github.com/semx2a/ft_printf
- Owner: semx2a
- License: mit
- Created: 2024-01-29T15:59:30.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-02-08T16:21:52.000Z (about 2 years ago)
- Last Synced: 2025-01-04T09:13:46.722Z (about 1 year ago)
- Topics: c, library, makefile, reverse-engineering
- Language: C
- Homepage:
- Size: 10.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ft_printf
## Summary
The goal of this project is to retro-engineer the `printf()` function in C, providing a deep understanding of variadic functions in C.
## Git Repository Contents
- `Makefile`: Script for compiling source files with necessary flags.
- `*.h` : Header files containing function prototypes.
- `*.c` : Source files implementing the `ft_printf()` function and any additional features.
## Acquired Skills
### C Programming
- Implementation of a complex function (`ft_printf()`) in C.
- Adherence to the `School 42` C coding standard.
- Handling of variadic functions.
- Unit testing.
### Memory Management
- Dynamic memory allocation and deallocation.
- Prevention of memory leaks through proper memory management.
### String Formatting
- Usage of external functions: `write`, `va_start`, `va_arg`, `va_copy`, `va_end`.
- Mimicking the behavior of the original `printf()` function.
- Handling conversions such as `%c`, `%s`, `%p`, `%d`, `%i`, `%u`, `%x`, `%X`, `%%`.