code wiki / (root) / nx_manga_page_gate.nx

nx_manga_page_gate.nx

buildroot/runtime/nx_manga_page_gate.nx

8577 B190 linesdepth 11pulls 52 transitivereach 0 importersview sourcekind gate/prooftopic manga
docsdependenciesstructsconstsfunctions

about

nx_manga_page_gate.nx -- REFEREE for R1 (nx_manga_page), the keystone rung, gated last and owed since it shipped. END-TO-END: paints its own four distinguishable input panels, forks the PROMOTED elf twice (once right-to-left, once left-to-right) and decodes both pages back through our own decoder. It proves the DONE-RULE pre-declared on /compare/mangagen before the organ existed: "page-spec rows (layouts as DATA) + compositor: geometry gate bite-proven (exact rects, uniform gutters, RTL/LTR read order) + every input placed exactly once (partition printed)." THE ANTI-VACUITY TEETH ARE T5 AND T6: a compositor that ignored read order entirely would still place four images and still make the partition sum. Only sampling WHICH colour landed in WHICH panel, and requiring the two orders to DISAGREE, can tell a real RTL implementation from a decorative flag. license_tier: ORIGINAL expect_exit: 0

dependencies 6 imports · 0 importers

nx_str.nx nx_syscalls.nx nx_tool_run.nx nx_img_to_rgb.nx nx_png_write.nx nx_gate_verdict.nx nx_manga_page_gate.nx

imports: nx_str.nxnx_syscalls.nxnx_tool_run.nxnx_img_to_rgb.nxnx_png_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 gv_ctr 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 ↻ gv_head gv_puts sys_write ↻ sys_unlinkat mpg_solid sys_mmap ↻ nx_png_write_rgb sys_openat_wr sys_mmap ↻ sys_write ↻ pw_chunk pw_u32be sys_mmap ↻ sys_write ↻ sys_write ↻ pw_crc_block dfe_compress sys_mmap_try sys_munmap_direct dfe_fill_tables dfe_deflate sys_mmap_try ↻ dfe_bits

structs

none

consts

17const MPG_CAP: i64 = 65536
18const MPG_SW: i64 = 64
19const MPG_PAGEW: i64 = 1400
20const MPG_PAGEH: i64 = 2000

functions

21func mpg_solid(path: *u8, r: i64, g: i64, b: i64) -> i64
called by 1: main calls 2: sys_mmapnx_png_write_rgb
34func mpg_exists(p: *u8) -> i64
called by 1: main calls 2: sys_openat_rdsys_close
40func mpg_count(buf: *u8, n: i64, needle: *u8) -> i64
called by 1: main calls 1: nx_str_len
54func mpg_which(rgb: *u8, w: i64, h: i64, x: i64, y: i64) -> i64
called by 1: main
69func main(argc: i64, argv: *i64) -> i64