code wiki / (root) / nx_niffacts.nx

nx_niffacts.nx

buildroot/runtime/nx_niffacts.nx

5901 B135 linesdepth 5pulls 5 transitivereach 0 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

about

nx_niffacts.nx -- CLI: NIF container structural facts. nx_niffacts probe|blocks|geom <f.nif> The Bethesda mesh-container dialect beside nx_kkfacts / nx_bspfacts / nx_mhtarget (/compare/koikatsu KK12 legs 1+2). Structure + block-type census + self-verified per-TriShape vertex/triangle counts; full vertex-data extraction is the contract's declared final half. Donor FORM is measured, never shipped. license_tier: ORIGINAL No hw writes (Rule 26). expect_exit: 0

dependencies 2 imports · 0 importers

nx_syscalls.nx nx_nif_lib.nx nx_niffacts.nx

imports: nx_syscalls.nxnx_nif_lib.nx

imported by: nobody (leaf or entry point)

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

main nc_e sys_write nc_slen sys_exit 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_openat_rd sys_lseek sys_read sys_close nif_probe nf_starts sys_mmap ↻ nf_walk kk_find nf_u32 nf_u8 nf_u8 ↻ nf_export nf_u8 ↻ nf_u16 nf_u8 ↻ nf_span_has kk_find ↻ nc_w sys_write ↻

structs

none

consts

10const NFC_CAP: i64 = 134217728 // 128MB refuse-beyond bound; a partial read reports state 2 and abstains
11const NFC_MAX_SHAPES: i64 = 4096 // per-file TriShape bound; overflow visible via shapes vs shown
12const NFC_SHOW: i64 = 8 // per-shape rows printed; the totals carry the population

functions

14func nc_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
called by 2: nc_wnc_e
15func nc_w(s: *u8) -> i64 { sys_write(1, s, nc_slen(s)); return 0 }
called by 1: main calls 2: sys_writenc_slen
16func nc_e(s: *u8) -> i64 { sys_write(2, s, nc_slen(s)); return 0 }
called by 1: main calls 2: sys_writenc_slen
17func nc_span(buf: *u8, off: i64, len: i64) -> i64
called by 1: main calls 1: sys_write
23func nc_num(v: i64) -> i64
called by 1: main calls 2: sys_writesys_mmap
36func nc_eq(a: *u8, b: *u8) -> i64 { var i: i64 = 0; while a[i] != (0 as u8) { if a[i] != b[i] { return 0 } i = i + 1 } if b[i] != (0 as u8) { return 0 } return 1 }
called by 1: main
38func main(argc: i64, argv: *i64) -> i64