code wiki / _hdl_build / nx_nmz_pack.nx
nx_nmz_pack.nx
buildroot/runtime/_hdl_build/nx_nmz_pack.nx
about
nx_nmz_pack.nx -- pack a decoded book/media (reader/<slug>/) into the OMNI Nishi Media container <slug>.nmz, on
the EXISTING sovereign substrate (NXR1 canonical record + nx_uxf_cid multicodec CID -- NOT a new format, the
audit fix). @kind tags the media KIND (default "book" => the .nbk profile). EPUB + MOBI decoders both emit the
same reader/<slug>/ layout, so this is the convergence point. Usage: nx_nmz_pack <slug> [kind]. expect_exit:0
dependencies 4 imports · 0 importers
imports: nx_syscalls.nxnx_itoa_lib.nxnx_canon_bin.nxnx_uxf_cid.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 9 | const K_MAGIC_2048: i64 = 2048 |
| 10 | const K_MAGIC_1024: i64 = 1024 |
| 11 | const K_MAGIC_67108864: i64 = 67108864 |
| 38 | const ECAP: i64 = 1024 |
functions
| 13 | func pk_slen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n } |
| 14 | func pk_p(s: *u8) -> i64 { sys_write(1, s, pk_slen(s)); return 0 } |
| 19 | func pk_n(v: i64) -> i64 { nxi_out(v); return 0 } |
| 20 | func ensure_dir(path: *u8) -> i64 { __syscall(258, 0-100, path, 0x1ed, 0, 0, 0); return 0 } called by 1: main |
| 21 | func cat(dst: *u8, off: i64, s: *u8) -> i64 { var i: i64=0; while s[i]!=(0 as u8){dst[off+i]=s[i];i=i+1} return off+i } |
| 23 | func jfrom(hay: *u8, hl: i64, start: i64, needle: *u8) -> i64 |
| 29 | func jstr(hay: *u8, hl: i64, pos: i64, out: *u8, cap: i64) -> i64 called by 1: main |
| 40 | func add_file(dir: *u8, name: *u8, keys: *i64, vals: *i64, vlens: *i64, idx: i64) -> i64 |
| 52 | func main(argc: i64, argv: *i64) -> i64 |