code wiki / (root) / nx_cdmap_pixjudge.nx

nx_cdmap_pixjudge.nx

buildroot/runtime/nx_cdmap_pixjudge.nx

10472 B176 linesdepth 9pulls 23 transitivereach 0 importersview sourcekind tooltopic cdmap
docsdependenciesstructsconstsfunctions

about

nx_cdmap_pixjudge.nx -- the position map's PIXEL REFEREE as a program (datavis DV2, 2026-09-15). Reads an emitted compare page and its api.json, redraws the cdmap's labels and marks as INK through the sovereign font engine, counts the readability defects on the pixels and compares DEFECTS with the grade the page published about itself. usage: nx_cdmap_pixjudge <index.html> <api.json> <regular.ttf> <bold.ttf> [journal] exit 0 AGREE the pixel defect count equals the published one 1 DISAGREE the picture holds a defect the self-grade cannot see, or the reverse; every offender is named above 2 usage 3 UNPROVEN no cdmap, no labels, unpaired labels, unreadable frame or canvas, unreadable face, no ink drawn, or an api.json without the grade -- named, never acquitted [journal]: when given, ONE row is appended per run so a beat leaves a per-day ledger of agreement (the DV2 done-rule's second clause): pj|<epoch>|<page>|<ll>|<lm>|<off>|<mm>|<inkpx>|<published defects>|<verdict> Every number the verdict rests on is printed above it; the verdict line is LAST. license_tier: ORIGINAL

dependencies 3 imports · 0 importers

nx_cdmap_pixjudge_lib.nx nx_fsops_lib.nx nx_gate_verdict.nx nx_cdmap_pixjudge.nx

imports: nx_cdmap_pixjudge_lib.nxnx_fsops_lib.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_puts sys_write crg_i64 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 ↻ pj_kv gv_puts ↻ gv_num sys_mmap ↻ sys_write ↻ sys_munmap pj_unproven gv_puts ↻ tf_load sys_mmap ↻ sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_munmap ↻ sys_close tf_load_buf tf_rd16 tf_find_table tf_rd16 ↻

structs

none

consts

17const PJ_ARGC: i64 = 5
18const PJ_ARGC_JOURNAL: i64 = 6
19const PJ_EXIT_AGREE: i64 = 0
20const PJ_EXIT_DISAGREE: i64 = 1
21const PJ_EXIT_USAGE: i64 = 2
22const PJ_EXIT_UNPROVEN: i64 = 3
23const PJ_BLOCK: *u8 = "readability_cut"
24const PJ_ROW_BYTES: i64 = 1024
25const PJ_CH_PIPE: i64 = 124
26const PJ_CH_NL: i64 = 10

functions

28func pj_kv(k: *u8, v: i64) -> i64 { gv_puts(" " as *u8); gv_puts(k); gv_puts("=" as *u8); gv_num(v); return 0 }
29func pj_unproven(why: *u8) -> i64 { gv_puts(" UNPROVEN: " as *u8); gv_puts(why); gv_puts("\nverdict=UNPROVEN\n" as *u8); sys_exit(PJ_EXIT_UNPROVEN); return PJ_EXIT_UNPROVEN }
called by 1: main calls 1: gv_puts
30func pj_pipe(d: *u8, o: i64) -> i64 { d[o] = PJ_CH_PIPE as u8; return o + 1 }
called by 1: pj_journal
31func pj_journal(path: *u8, page: *u8, vec: *i64, pub: i64, verdict: *u8) -> i64
50func pj_explain(r: *i64) -> i64
107func main(argc: i64, argv: *i64) -> i64