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".
Find a file
Raphaël 3ad528e353
ft_printf — Patch Notes (v2.0)
##  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;
}
2025-09-19 17:03:16 +02:00
.github/workflows ci(make): adding the build action to my repository 2025-09-19 16:48:36 +02:00
includes fix: editing the type of stdint 2025-09-19 16:54:40 +02:00
sources fix: editing the type of stdint 2025-09-19 16:54:40 +02:00
.gitignore core(ignore): adding ignore to the repository 2025-09-17 18:07:53 +02:00
flake.nix build(nix/shell): Adding a shell hook to flake 2025-09-19 16:21:43 +02:00
Makefile build(make): adding files to compile 2025-09-19 16:08:07 +02:00