# adpatresss/holbertonschool-printf architecture

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

- Interactive diagram: https://gitdiagram.com/adpatresss/holbertonschool-printf
- Repository: https://github.com/adpatresss/holbertonschool-printf

## Overview

_printf is a small C library function that formats variadic arguments and writes the result to stdout. The documented workflow checks the format, scans it, dispatches supported conversion specifiers, and returns the number of bytes written or an error. The repository tree contains only the README, so implementation paths and internal module boundaries cannot be verified; the nodes below describe documented responsibilities, not inspected source files.

## Diagram (Mermaid)

```mermaid
flowchart TD

node_caller(("Caller"))
node_printf["_printf"]
node_scanner["Format scanner"]
node_conversions["Format conversions"]
node_stdout["stdout"]
node_result["Write count or error"]

node_caller -->|"passes format and arguments"| node_printf
node_printf -->|"scans format"| node_scanner
node_printf -->|"dispatches specifiers"| node_conversions
node_scanner -->|"writes literals"| node_stdout
node_conversions -->|"writes converted values"| node_stdout
node_printf -->|"returns count or error"| node_result

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_printf,node_scanner,node_conversions,node_stdout,node_result toneIndigo
```

## Components

### Other components

- **Caller**
- **_printf**
- **Format scanner**
- **Format conversions**
- **stdout**
- **Write count or error**

## Connections

- Caller → _printf: passes format and arguments (evidence: `README.md`)
- _printf → Format scanner: scans format (evidence: `README.md`)
- _printf → Format conversions: dispatches specifiers (evidence: `README.md`)
- Format scanner → stdout: writes literals (evidence: `README.md`)
- Format conversions → stdout: writes converted values (evidence: `README.md`)
- _printf → Write count or error: returns count or error (evidence: `README.md`)
