code wiki / (root) / nx_nxa_check.nx

nx_nxa_check.nx

buildroot/runtime/nx_nxa_check.nx

11565 B255 linesdepth 2pulls 3 transitivereach 0 importersview sourcekind tooltopic nxa
docsdependenciesstructsconstsfunctions

about

nx_nxa_check.nx -- the NXA format's fsck. Validates an .nxa BEYOND the checksums nxa_find already enforces: CLUS coverage invariants (every triangle in exactly one cluster, counts <=128, cluster bounds truly CONTAIN their triangles' vertices). A format is only as strong as the tool that refuses a bad file -- this is that tool ("a session must remember < a tool that cannot do the wrong thing"). usage: nx_nxa_check <file.nxa> rc: 0 green, 1 invariant broken, 5 corrupt, 6 future license_tier: ORIGINAL

dependencies 2 imports · 0 importers

nx_syscalls.nx nx_nxa.nx nx_nxa_check.nx

imports: nx_syscalls.nxnx_nxa.nx

imported by: nobody (leaf or entry point)

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

main ncw sys_write sys_mmap sys_map_file sys_openat_rd sys_lseek sys_close nxa_find nxa_magic nxa_check2 nxa_tag4 ncn sys_mmap ↻ sys_write ↻ nc_i16

structs

none

consts

10const K_MAGIC_65535: i64 = 65535
11const K_MAGIC_32767: i64 = 32767
12const K_MAGIC_65536: i64 = 65536
13const K_MAGIC_4096: i64 = 4096
14const K_MAGIC_13421772: i64 = 13421772
15const K_MAGIC_20132659: i64 = 20132659

functions

17func ncw(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 }
called by 1: main calls 1: sys_write
18func ncn(v: i64) -> i64
called by 1: main calls 2: sys_mmapsys_write
32func nc_i16(w: i64, sh: i64) -> i64
called by 1: main
38func main(argc: i64, argv: *i64) -> i64