code wiki / (root) / nx_char_verify.nx

nx_char_verify.nx

buildroot/runtime/nx_char_verify.nx

6354 B119 linesdepth 2pulls 2 transitivereach 0 importersview sourcekind tooltopic char
docsdependenciesstructsconstsfunctions

about

nx_char_verify.nx -- sovereign recursive grep over the Elder AI platform tree to VERIFY the real character appearance (operator: "Elara is a blonde, doublecheck"). Reuses the nx_explore getdents64 walk pattern, but rooted at the platform tree and scanning readable/db files (not just .nx) for the character's hair/appearance. Prints path + each matching line so the REAL DNA is read, not assumed. Root + queries baked (nx_sov_build_run does not forward args). Zero egress, sovereign. license_tier: ORIGINAL expect_exit: 0

dependencies 1 imports · 0 importers

nx_syscalls.nx nx_char_verify.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 cv_puts sys_write cv_strlen sys_mmap cv_walk sys_openat_rd sys_mmap ↻ sys_getdents64 dirent_reclen dirent_type dirent_name cv_is_dot cv_join cv_walk ↻ cv_skip cv_ends cv_strlen ↻ cv_scan sys_openat_rd ↻ sys_read sys_close cv_find cv_puts ↻ sys_write ↻ sys_close ↻ cv_strlen ↻ sys_write ↻ sys_exit

structs

none

consts

7const CV_MAGIC_65536: i64 = 65536
8const CV_MAGIC_2048: i64 = 2048
10const CV_ROOT: *u8 = "/mnt/c/Users/elder/elder-ai-platform" as *u8
11const CV_FBUF: i64 = 4194304
12const CV_MAXDEPTH: i64 = 16
13const CV_MAXLINES: i64 = 8 // print at most this many matching lines per file

functions

15func cv_strlen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n }
called by 3: cv_putscv_endsmain
16func cv_puts(s: *u8) -> i64 { sys_write(1, s, cv_strlen(s)); return 0 }
called by 2: cv_scanmain calls 2: sys_writecv_strlen
17func cv_find(buf: *u8, lo: i64, hi: i64, pat: *u8, pl: i64) -> i64
called by 1: cv_scan
23func cv_is_dot(name: *u8) -> i64 { if name[0]==(46 as u8){ if name[1]==(0 as u8){return 1} if name[1]==(46 as u8){ if name[2]==(0 as u8){return 1} } } return 0 }
called by 1: cv_walk
24func cv_join(dirpath: *u8, name: *u8, out: *u8) -> i64 { var p: i64=0; var a: i64=0; while dirpath[a]!=(0 as u8){out[p]=dirpath[a];p=p+1;a=a+1} out[p]=47 as u8; p=p+1; var b: i64=0; while name[b]!=(0 as u8){out[p]=name[b];p=p+1;b=b+1} out[p]=0 as u8; return 0 }
called by 1: cv_walk
26func cv_ends(name: *u8, suf: *u8) -> i64 { let n: i64=cv_strlen(name); let s: i64=cv_strlen(suf); if n<s {return 0} var i: i64=0; while i<s { if name[n-s+i]!=suf[i]{return 0} i=i+1 } return 1 }
called by 1: cv_skip calls 1: cv_strlen
28func cv_skip(name: *u8) -> i64
called by 1: cv_walk calls 1: cv_ends
38func cv_scan(path: *u8, q1: *u8, l1: i64, q2: *u8, l2: i64, fbuf: *u8) -> i64
75func cv_walk(dirpath: *u8, q1: *u8, l1: i64, q2: *u8, l2: i64, fbuf: *u8, depth: i64) -> i64
108func main() -> i64