code wiki / (root) / nx_capres.nx

nx_capres.nx

buildroot/runtime/nx_capres.nx

8518 B192 linesdepth 3pulls 3 transitivereach 0 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

about

nx_capres.nx -- CLI for the CAPTURE-RESOLUTION RULER (core = nx_capres_lib, gate = nx_capres_gate). Operator standing order 2026-08-28: full resolution everywhere, and the cost is accepted. ONE QUESTION THIS ESTATE COULD NOT ANSWER BEFORE: "is this capture full resolution?" Every capture organ announced w= and h=; not one said what FULL was, so a 240x150 frame and a 1920x1200 frame read identically to every downstream consumer and to every reader of a verdict built on them. VERBS nx_capres dims <artifact> what resolution IS this file (PNG or NXFH1) nx_capres check <artifact> <subject> is it the subject's declared FULL resolution nx_capres judge <artifact> <judge-organ> can that judge SEE this many pixels nx_capres selftest KATs over the pure predicates EXIT CODES ARE THE VERDICT, one scale shared with the lib: 0 FULL / JUDGE-SEES-ALL 1 REDUCED / UNJUDGED-AT-RESOLUTION 2 usage 3 UNPROVEN UNPROVEN covers unreadable artifact, unknown subject and unknown judge. Abstaining is not acquitting: a caller must never be able to read "I could not look" as "it is fine". The final line is always "verdict=<TOKEN>" so a reader can anchor BY POSITION rather than by matching text that also appears in the diagnostics above it. license_tier: ORIGINAL No hw writes (Rule 26).

dependencies 2 imports · 0 importers

nx_syscalls.nx nx_capres_lib.nx nx_capres.nx

imports: nx_syscalls.nxnx_capres_lib.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main cx_usage cx_p sys_write cx_streq cx_selftest cr_permil cr_verdict cr_judge cx_p ↻ cx_n sys_write ↻ sys_mmap nxa_die sys_write ↻ sys_exit nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give nxa_lock_addr ↻ nxa_report_overrun sys_write ↻ nxa_dump_printable sys_write ↻ nxa_dump_sizes sys_write ↻ sys_mmap ↻ cr_dims_of_file sys_mmap ↻ cr_read_hdr sys_openat_rd sys_read sys_close cr_dims cr_be32 sys_mmap ↻ cr_num_at sys_munmap sys_munmap ↻

structs

none

consts

25const CX_OUT_BYTES: i64 = 64
26const CX_KEY_BYTES: i64 = 256
27const CX_USAGE: i64 = 2
28const CX_JUDGE_PREFIX: *u8 = "judge." as *u8
29const CX_KAT_TOTAL: i64 = 12

functions

31func cx_p(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 }
32func cx_n(v: i64) -> i64
called by 2: cx_selftestmain calls 2: sys_writesys_mmap
45func cx_streq(a: *u8, b: *u8) -> i64
called by 1: main
54func cx_cat(d: *u8, o: i64, s: *u8) -> i64
called by 1: main
61func cx_kind_name(k: i64) -> i64
called by 1: main calls 1: cx_p
67func cx_usage() -> i64
called by 1: main calls 1: cx_p
78func cx_selftest() -> i64
106func main(argc: i64, argv: *i64) -> i64