<!-- DO NOT EDIT BY HAND.
Generated by `cargo xtask gen` (xtask/src/main.rs) from docs-src/models/c-api.json
(clang C inventory) joined with the syn-extracted Rust inventory and the curated,
validated map in docs-src/models/parity.model.json. Run `cargo xtask check` to
verify freshness; it fails if this file drifts or a model invariant is violated. -->

# ncurses C public API → ncurses-native port-parity matrix

A 1:1 completeness catalog of the ncurses public C API surface against its
ncurses-native counterpart, grouped by ncurses man-page functional cluster.
There is no ncurses C source in this repository; the C inventory is the public
declaration surface a curses-compatible library must implement, extracted from
the installed headers by clang.

C inventory provenance: Ubuntu clang version 18.1.3 (1ubuntu1) via clang -Xclang -ast-dump=json on installed ncursesw headers; headers: `curses.h` (456 fns, sha256 `bbdf40f38aef`), `term.h` (33 fns, sha256 `26e32c4d77dc`).

Legend: `*` full = every function in the group reconstructed and admitted by a court · `~` partial = some behavior reconstructed with an executable court (byte/terminfo oracle) · `o` scaffold = a byte-producing stand-in exists, not yet pinned by its own court · `!` divergent = a counterpart exists but a court records a measured divergence from the in-repo oracle · `>` deferred = no immediate terminal output; the function's effect is realized later by refresh/doupdate, proven by an empty-output court · `n` n_a = no terminal-output contract (pure query or state); nothing for a byte-output reconstruction to emit · `.` none = no counterpart.

## Summary

- **C public API functions:** 481 (clang)
- **Functions resolved (counterpart or classified):** 481 / 481 (100.0%)
- **API groups:** 31 (31 fully resolved)
- **Resolutions by status:** full 33, partial 174, scaffold 22, divergent 8, deferred 42, n_a 202

## Groups

| ncurses API group | C fns | resolved | parity % | role | ncurses-native modules | status |
|---|---:|---:|---:|---|---|---|
| Add character (curs_addch) | 6 | 6 | 100.0 | output | `window` | ~ o |
| Add chstr (curs_addchstr) | 8 | 8 | 100.0 | output | `window` | ~ |
| Add string (curs_addstr) | 8 | 8 | 100.0 | output | `window` | ~ |
| Attributes (curs_attr) | 27 | 27 | 100.0 | rendition | `vid`, `window` | ~ |
| Background (curs_bkgd) | 5 | 5 | 100.0 | rendition | — | > n |
| Bell (curs_beep) | 4 | 4 | 100.0 | output | `bell` | * |
| Borders & lines (curs_border) | 11 | 11 | 100.0 | output | `window` | ~ |
| Color (curs_color) | 40 | 40 | 100.0 | rendition | `color`, `terminfo`, `window` | ~ n |
| Cursor move & optimizer (curs_move / mvcur) | 4 | 4 | 100.0 | cursor | `cursor`, `window` | * ~ o |
| Erase (curs_clear) | 10 | 10 | 100.0 | output | `screen`, `window` | ~ > n |
| Input options & key handling (curs_inopts / util) | 56 | 56 | 100.0 | input | `input` | ~ n |
| Input: characters & strings (curs_getch / getstr / scanw) | 22 | 22 | 100.0 | input | `input` | ~ n |
| Insert / delete (curs_insch / insstr / deleteln) | 22 | 22 | 100.0 | output | `window` | ~ |
| Library config & util (curs_util / extensions) | 21 | 21 | 100.0 | config | — | n |
| Modes & terminal state (curs_kernel) | 18 | 18 | 100.0 | substrate | `terminfo` | * n |
| Mouse (curs_mouse) | 13 | 13 | 100.0 | input | `window` | ~ n |
| Overlap (curs_overlay) | 3 | 3 | 100.0 | model | — | > |
| Pads (curs_pad) | 7 | 7 | 100.0 | model | `screen`, `window` | ~ o |
| Read from window (curs_inch / instr) | 20 | 20 | 100.0 | introspection | `window` | ~ o |
| Refresh & doupdate (curs_refresh) | 7 | 7 | 100.0 | screen update | `screen`, `update` | ~ o > |
| Resize & threads (resizeterm / threads) | 8 | 8 | 100.0 | config | — | > n |
| Screen dump (curs_scr_dump) | 10 | 10 | 100.0 | model | — | n |
| Screen init & teardown (curs_initscr) | 11 | 11 | 100.0 | lifecycle | `term` | ! n |
| Scroll & output options (curs_scroll / outopts) | 16 | 16 | 100.0 | screen update | — | > n |
| Soft labels (curs_slk) | 30 | 30 | 100.0 | addon | `slk` | ~ > n |
| Terminal queries (curs_termattrs) | 17 | 17 | 100.0 | substrate | `terminfo` | * n |
| Terminfo & termcap (curs_terminfo / termcap) | 33 | 33 | 100.0 | substrate | `terminfo` | * ~ ! n |
| Touch & sync (curs_touch) | 11 | 11 | 100.0 | screen update | — | > n |
| Trace (curs_trace) | 8 | 8 | 100.0 | diagnostics | — | n |
| Window create & manage (curs_window) | 19 | 19 | 100.0 | model | `window` | ~ o n |
| printw (curs_printw) | 6 | 6 | 100.0 | output | `window` | o |

## What a counterpart means here

A function is 'resolved' when it has a counterpart (full/partial/scaffold/divergent) OR a non-output classification (deferred/n_a) backed by evidence. Resolution is NOT a claim of API equivalence: ncurses-native exposes byte producers, not the ncurses C function signatures. Counterparts marked full/partial/divergent are linked to oracle receipts; scaffold counterparts are honest stand-ins; deferred functions are proven to emit no immediate bytes (their effect is a later refresh); n_a functions are pure queries with no terminal-output contract.

A counterpart is not a claim of equivalence. It means some observable byte
behavior of that ncurses function is reconstructed by the named Rust symbol
and, for `partial`/`divergent` rows, pinned by an oracle receipt under
`reports/oracle/` (see `docs/generated/claim-index.md`). The per-function
breakdown is in `docs/generated/port-parity-functions.md`.
