code wiki / _hdl_build / nx_apng_write_gate.nx

nx_apng_write_gate.nx

buildroot/runtime/_hdl_build/nx_apng_write_gate.nx

8440 B144 linesdepth 4pulls 5 transitivereach 0 importersview sourcekind gate/prooftopic apng
docsdependenciesstructsconstsfunctions

about

nx_apng_write_gate.nx -- gate for the sovereign APNG encoder. Writes a 4-frame moving-square clip, reads the ON-DISK bytes back and verifies the structure a browser needs: PNG signature, acTL with the right frame count, the fcTL/fdAT chain with the SPEC's shared sequence numbering (0,1,2,3,4,5 across fcTL/IDAT/fcTL/fdAT...), CRC of the acTL chunk validates, and the frame PAYLOADS DIFFER (the square really moves -- parsed out of the stored-zlib stream, not assumed). NEG: a plain nx_png_write PNG has NO acTL (the animated check cannot false-fire on a still). expect_exit: 0 license_tier: ORIGINAL

dependencies 2 imports · 0 importers

nx_apng_write.nx nx_gate_verdict.nx nx_apng_write_gate.nx

imports: nx_apng_write.nxnx_gate_verdict.nx

imported by: nobody (leaf or entry point)

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

main ag_puts apng_open sys_openat_wr ap_be32 pw_chunk pw_u32be sys_mmap sys_write sys_write ↻ pw_crc_block apng_frame ap_be32 ↻ ap_be16 pw_chunk ↻ ap_zstream pw_adler32 ap_be32 ↻ apng_close pw_chunk ↻ sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_close ag_num ag_rd32 ag_typ pw_crc_block ↻ nx_png_write_rgb sys_openat_wr ↻ sys_mmap ↻ sys_write ↻ pw_chunk ↻ pw_adler32 ↻ sys_close ↻ gv_ctr sys_mmap ↻ gv_verdict

structs

none

consts

none

functions

10func ag_puts(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
11func ag_num(v: i64) -> i64 { let b: *u8=sys_mmap(28); var m: i64=v; if m<0{m=0-m;sys_write(1,"-" 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{b[i]=t[k-1-i];i=i+1} sys_write(1,b,k); return 0 }
called by 1: main
12func ag_rd32(b: *u8, o: i64) -> i64 { return ((b[o] as i64)<<24)|((b[o+1] as i64)<<16)|((b[o+2] as i64)<<8)|(b[o+3] as i64) }
called by 1: main
13func ag_typ(b: *u8, o: i64, t0: i64, t1: i64, t2: i64, t3: i64) -> i64
called by 1: main
18func main() -> i64