code wiki / (root) / nx_urf_make.nx

nx_urf_make.nx

buildroot/runtime/nx_urf_make.nx

4335 B99 linesdepth 2pulls 4 transitivereach 0 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

about

nx_urf_make.nx -- generate a real test-pattern page and write a sovereign .urf artifact to disk. Validates the encoder at full-page scale (US Letter @300dpi grayscale) and yields a concrete file ready to print. Writes only a LOCAL file -- no network, no printing. license_tier: ORIGINAL

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_pwg_rle.nx nx_urf.nx nx_urf_make.nx

imports: nx_syscalls.nxnx_pwg_rle.nxnx_urf.nx

imported by: nobody (leaf or entry point)

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

main sys_mmap fill_rect nx_urf_encode_gray_page nx_urf_file_header nx_urf_be32 nx_urf_page_header nx_urf_be32 ↻ nx_rle_encode_page nx_rle_line_eq nx_rle_encode_line nx_rle_px_eq p sys_write pn sys_write ↻ sys_mmap ↻ sys_openat_wr sys_exit write_all sys_write ↻ sys_close nx_rle_decode

structs

none

consts

8const K_MAGIC_2550: i64 = 2550
9const K_MAGIC_3300: i64 = 3300
10const K_MAGIC_1200: i64 = 1200
11const K_MAGIC_1212: i64 = 1212
12const K_MAGIC_1850: i64 = 1850
13const K_MAGIC_2088: i64 = 2088
14const K_MAGIC_2100: i64 = 2100
15const K_MAGIC_1838: i64 = 1838
16const K_MAGIC_65536: i64 = 65536

functions

18func p(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 calls 1: sys_write
19func pn(v: i64) -> i64
called by 1: main calls 2: sys_writesys_mmap
30func fill_rect(bm: *u8, W: i64, y0: i64, y1: i64, x0: i64, x1: i64, val: i64) -> i64
called by 1: main
41func write_all(fd: i64, buf: *u8, len: i64) -> i64
called by 1: main calls 1: sys_write
51func main() -> i64