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 sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read 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 _png_a7_row0 _png_a7_rowi nx_zlib_inflate sys_mmap ↻ nx_deflate_inflate sys_mmap ↻ nx_bitstream_alloc sys_mmap ↻ _deflate_inflate_block nx_bitstream_read_lsb nx_bitstream_byte_align nx_bitstream_read_byte_ali _deflate_build_static_litl _deflate_build_static_dist _deflate_decode_huffman_bl

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