ft_print is a project in the common-core of 42school. Where the main goal is to reproduce the function from the stdio library "printf".
## ✨ New Features - **Custom `ft_printf`**: Complete implementation with variadic handling and standard format specifiers. - **Output Modules**: - `print_char.c` — single char writes - `print_number.c` — signed/unsigned, hex, pointer handling - `utils.c` — `itoa_base`, `ft_strlen`, and helpers - **Public Header**: `includes/ft_printf.h` exposes prototypes and shared types. --- ## ⚙️ Build & Tooling Upgrades - **Modernized `Makefile`** - Clean variable management, per-dir object builds, colored logs - Handy targets for dev/clean/rebuild and `.clangd` support - **Reproducible Dev Env**: `flake.nix` adds Nix flake support (clang, norminette, formatter, etc.) for one-command onboarding. 🧊 --- ## 🤖 Continuous Integration - **GitHub Actions**: - `c-cpp.yml` — builds on push/PR - `norminette.yml` — style checks to keep 42-compliant - Automatic gates so broken builds and non-conforming code don’t land. 🧪 --- ## 🧹 Cleanup & Refactors - **Redundant libft bits removed** (now provided internally by `ft_printf` utils): - `ft_strdup.c`, `ft_strlcpy.c`, `ft_strlen.c` - **README refresh**: trimmed outdated content; clearer scope and usage. --- ## 🧨 Breaking Changes - Projects previously including `libft`’s removed functions must now rely on the local utils bundled with `ft_printf` (or provide their own). - Include path is now **`includes/`**; verify your compiler flags (`-Iincludes`). --- ## 🧰 Usage Quickstart ```c #include "ft_printf.h" int main(void) { int n = ft_printf("Hello %s, number: %d, hex: 0x%x, ptr: %p\n", "world", 42, 42, (void*)&n); ft_printf("Printed %d bytes above.\n", n); return 0; } |
||
|---|---|---|
| .github/workflows | ||
| includes | ||
| sources | ||
| .gitignore | ||
| flake.nix | ||
| Makefile | ||