code wiki / _hdl_build / nx_visual_diff_cli.nx

nx_visual_diff_cli.nx

buildroot/runtime/_hdl_build/nx_visual_diff_cli.nx

3968 B71 linesdepth 9pulls 13 transitivereach 0 importersview sourcekind tooltopic visual
docsdependenciesstructsconstsfunctions

about

nx_visual_diff_cli.nx -- CLI for the sovereign visual-parity instrument (nx_visual_diff lib). Speaks plain english + numbers. usage: nx_visual_diff_cli grid <A.png> <B.png> <ay> <by> <cmp_w> <cmp_h> <gx> <gy> <thresh> nx_visual_diff_cli extent <A.png> <tol> grid: compare A rows[ay..ay+cmp_h) vs B rows[by..by+cmp_h) over x[0..cmp_w), gx x gy cells; a cell matches when mean-channel delta <= thresh (0..255). extent: last content row vs the page background. license_tier: ORIGINAL

dependencies 2 imports · 0 importers

nx_visual_diff.nx nx_itoa_lib.nx nx_visual_diff_cli.nx

imports: nx_visual_diff.nxnx_itoa_lib.nx

imported by: nobody (leaf or entry point)

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

main vc_w vc_eq vd_load 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_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_munmap sys_close nx_png_decode sys_mmap ↻ _png_check_signature _png_read_u32_be nx_crc32 nx_crc32_update nx_crc32_init nx_crc32_table_at _png_n_channels _png_bytes_per_pixel _png_n_channels ↻ _png_a7_expected _png_a7_col0 _png_a7_coli

structs

none

consts

none

functions

11func vc_w(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
16func vc_n(v: i64) -> i64 { nxi_out(v); return 0 }
called by 1: main calls 1: nxi_out
17func vc_atoi(s: *u8) -> i64 { var v: i64=0; var i: i64=0; var neg: i64=0; if s[0]==(45 as u8){neg=1;i=1} while s[i]!=(0 as u8){ let c: i64=(s[i] as i64)&255; if c>=48 { if c<=57 { v=v*10+(c-48) } } i=i+1 } if neg==1 { return 0-v } return v }
called by 1: main
18func vc_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 1 } return 0 }
called by 1: main
20func main(argc: i64, argv: *i64) -> i64