code wiki / _hdl_build / nx_cbz_fixture.nx

nx_cbz_fixture.nx

buildroot/runtime/_hdl_build/nx_cbz_fixture.nx

2306 B33 linesdepth 7pulls 10 transitivereach 0 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

about

nx_cbz_fixture.nx -- build a tiny DRM-free CBZ (comic = a ZIP of page images) via the sovereign OPC zip writer, so the comics->.nmz rung can be gated end-to-end (nx_cbx_pages extracts -> nx_nmz_pack packs @kind=comic). The page bytes start with the JPEG SOI (ff d8) so nx_cbx_pages' no-fake-green magic gate accepts them, and contain EMBEDDED 0x00 bytes -- proving the binary-safe canon (nx_canon_bin) carries real image bytes that string-only canon_encode would truncate. expect_exit: 0 license_tier: ORIGINAL

dependencies 2 imports · 0 importers

nx_syscalls.nx nx_opc.nx nx_cbz_fixture.nx

imports: nx_syscalls.nxnx_opc.nx

imported by: nobody (leaf or entry point)

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

main ensure_dir sys_mmap opc_write sys_mmap ↻ nx_crc32 nx_crc32_update nx_crc32_init nx_crc32_table_at opc_strlen opc_put_u32 opc_put_u16 opc_copy sys_openat_wr sys_write sys_close cf_p sys_write ↻ cf_slen cf_n sys_mmap ↻ sys_write ↻ sys_exit

structs

none

consts

none

functions

9func cf_slen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n }
called by 1: cf_p
10func cf_p(s: *u8) -> i64 { sys_write(1, s, cf_slen(s)); return 0 }
called by 1: main calls 2: sys_writecf_slen
11func cf_n(v: i64) -> i64 { let b: *u8=sys_mmap(24); var m: i64=v; if m<0{m=0-m}; let t: *u8=sys_mmap(24); 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 calls 2: sys_mmapsys_write
12func ensure_dir(path: *u8) -> i64 { __syscall(258, 0-100, path, 0x1ed, 0, 0, 0); return 0 }
called by 1: main
14func main() -> i64