code wiki / _hdl_build / nx_loose_format_census.nx

nx_loose_format_census.nx

buildroot/runtime/_hdl_build/nx_loose_format_census.nx

5427 B99 linesdepth 2pulls 2 transitivereach 0 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

about

nx_loose_format_census.nx -- COORDINATED sweep driver for E-DOCTRINE's consistency sweep: a sovereign scanner that enumerates every organ still touching a loose DATA format (.tsv/.conf string-literal paths), so the "~106" becomes a real, measured, trackable worklist any workstream can pull from. getdents64 over the organ dirs + a bounded read per .nx + substring flag; the flagged list -> knowledge/status/ loose_format_census.log. (.log excluded on purpose -- gate output is fine; the target is DATA in loose files.) Pairs with nx_sprawl_ratchet (the guard): census = what's LEFT, ratchet = no NEW regressions. license_tier: ORIGINAL

dependencies 1 imports · 0 importers

nx_syscalls.nx nx_loose_format_census.nx

imports: nx_syscalls.nx

imported by: nobody (leaf or entry point)

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

main sys_mmap sys_openat_wr lc_scan lc_ends lc_cat sys_openat_rd sys_read sys_close lc_has lc_w sys_write sys_close ↻ lc_w ↻ lc_wn sys_mmap ↻ sys_write ↻

structs

none

consts

9const K_MAGIC_65536: i64 = 65536
10const K_MAGIC_262144: i64 = 262144
11const K_MAGIC_4096: i64 = 4096

functions

13func lc_w(fd: i64, s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(fd,s,n); return 0 }
called by 2: lc_scanmain calls 1: sys_write
14func lc_wn(fd: i64, v: i64) -> i64 { let bb:*u8=sys_mmap(28); var m:i64=v; if m<0{m=0-m;sys_write(fd,"-" as *u8,1)} let t:*u8=sys_mmap(28); var k:i64=0; if m==0{t[0]=48 as u8;k=1} while m>0{t[k]=(48+(m%10)) as u8;m=m/10;k=k+1} var i:i64=0; while i<k{bb[i]=t[k-1-i];i=i+1} sys_write(fd,bb,k); return 0 }
called by 1: main calls 2: sys_mmapsys_write
16func lc_has(buf: *u8, n: i64, pat: *u8, plen: i64) -> i64
called by 1: lc_scan
26func lc_ends(name: *u8, nlen: i64, suf: *u8, slen: i64) -> i64
called by 1: lc_scan
32func lc_cat(dst: *u8, o: i64, s: *u8) -> i64 { var oo:i64=o; var i:i64=0; while s[i]!=(0 as u8){dst[oo]=s[i];oo=oo+1;i=i+1} return oo }
called by 1: lc_scan
34func lc_scan(dirpath: *u8, logfd: i64, cnt: *i64, rbuf: *u8, fullbuf: *u8, dbuf: *u8) -> i64
83func main() -> i64