# kennyohhst/ft_printf architecture

> Architecture diagram of the GitHub repository kennyohhst/ft_printf, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-09). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/kennyohhst/ft_printf
- Repository: https://github.com/kennyohhst/ft_printf

## Overview

This is a small C printf-style formatting library. A caller supplies a format string and variadic arguments; `ft_printf` scans the format, dispatches conversions, and writes formatted output to standard output. Conversion rendering uses the numeric and character helpers in `ft_printf_utils.c`. The graph stays focused on this runtime behavior; the excerpts do not show build configuration or additional product subsystems.

Main entry points: [`printf.c`](https://github.com/kennyohhst/ft_printf/blob/main/printf.c) (Format and dispatch), [`ft_printf.h`](https://github.com/kennyohhst/ft_printf/blob/main/ft_printf.h) (Public declarations), [`ft_printf_utils.c`](https://github.com/kennyohhst/ft_printf/blob/main/ft_printf_utils.c) (Output helpers)

## Diagram (Mermaid)

```mermaid
flowchart TD

node_caller(("Library caller"))
node_api["Public declarations<br/>[ft_printf.h]"]
node_formatter["Format and dispatch<br/>[printf.c]"]
node_renderers["Output helpers<br/>[ft_printf_utils.c]"]
node_stdout["Standard output"]

node_caller -->|"uses API"| node_api
node_api -->|"declares"| node_formatter
node_formatter -->|"renders conversions"| node_renderers
node_formatter -->|"writes literals"| node_stdout
node_renderers -->|"writes characters"| node_stdout

click node_api "https://github.com/kennyohhst/ft_printf/blob/main/ft_printf.h"
click node_formatter "https://github.com/kennyohhst/ft_printf/blob/main/printf.c"
click node_renderers "https://github.com/kennyohhst/ft_printf/blob/main/ft_printf_utils.c"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_caller,node_stdout toneIndigo
class node_api,node_formatter,node_renderers toneTeal
```

## Components

### Other components

- **Library caller**
- [Public declarations](https://github.com/kennyohhst/ft_printf/blob/main/ft_printf.h): `ft_printf.h`
- [Format and dispatch](https://github.com/kennyohhst/ft_printf/blob/main/printf.c): `printf.c`
- [Output helpers](https://github.com/kennyohhst/ft_printf/blob/main/ft_printf_utils.c): `ft_printf_utils.c`
- **Standard output**

## Connections

- Library caller → Public declarations: uses API (evidence: `ft_printf.h`)
- Public declarations → Format and dispatch: declares (evidence: `ft_printf.h`)
- Format and dispatch → Output helpers: renders conversions (evidence: `printf.c`)
- Format and dispatch → Standard output: writes literals (evidence: `printf.c`)
- Output helpers → Standard output: writes characters (evidence: `ft_printf_utils.c`)
