code wiki / _hdl_build / nx_docx_rich_gate.nx

nx_docx_rich_gate.nx

buildroot/runtime/_hdl_build/nx_docx_rich_gate.nx

8781 B236 linesdepth 2pulls 2 transitivereach 0 importersview sourcekind gate/prooftopic docx
docsdependenciesstructsconstsfunctions

about

nx_docx_rich_gate.nx -- gate for RICH .docx (formatting runs + tables), the office-census gap-closer for OF-W3 (formatting) + OF-W4 (tables). The OPC writer uses STORED (uncompressed) ZIP, so the raw .docx bytes contain word/document.xml VERBATIM -- the gate greps them to prove the markup is really EMITTED (not just that a symbol name appears in source), and reads the text back through the real docx reader (which unzips + parses -> proves the OPC package is structurally valid). spec fixture: H heading / B bold / I italic / P plain / a 3x3 bordered TABLE / trailing plain. Rows: 1 rich-write 2 text-roundtrip(heading+plain+table-cell+trailing) 3 formatting-emitted(w:rPr+w:b+w:sz) 4 table-emitted(w:tbl+w:tblPr+w:tr+w:tc) 5 italic-emitted 6 determinism 7 loud-fail-missing-spec[neg] Evidence: DOCX-RICH-GATE -> stdout + knowledge/status/vizsla_gate.log; exit 0 iff 7/7. license_tier: ORIGINAL

dependencies 1 imports · 0 importers

nx_syscalls.nx nx_docx_rich_gate.nx

imports: nx_syscalls.nx

imported by: nobody (leaf or entry point)

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

main rg_p sys_write rg_slen sys_openat_rd sys_close rg_runv sys_fork sys_openat_wr sys_dup3 sys_mmap sys_execve sys_exit sys_wait4 rg_args sys_mmap ↻ rg_write sys_openat_wr ↻ sys_write ↻ rg_slen ↻ sys_close ↻ rg_has sys_mmap ↻ rg_readall sys_openat_rd ↻ sys_lseek sys_mmap ↻ sys_read sys_close ↻ rg_slen ↻ rg_row rg_p ↻ rg_fileeq sys_mmap ↻ rg_readall ↻ sys_openat_append sys_mmap ↻ rg_cat rg_catn sys_mmap ↻

structs

none

consts

none

functions

14func rg_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
called by 3: rg_prg_writerg_has
15func rg_p(s: *u8) -> i64 { sys_write(1, s, rg_slen(s)); return 0 }
called by 2: rg_rowmain calls 2: sys_writerg_slen
17func rg_cat(dst: *u8, off: i64, s: *u8) -> i64
called by 1: main
23func rg_catn(dst: *u8, off: i64, v: i64) -> i64
called by 1: main calls 1: sys_mmap
36func rg_write(path: *u8, content: *u8) -> i64
44func rg_readall(path: *u8, szout: *i64) -> *u8
61func rg_runv(elf: *u8, args: *i64, outpath: *u8) -> i64
91func rg_has(path: *u8, needle: *u8) -> i64
called by 1: main calls 3: sys_mmaprg_readallrg_slen
110func rg_fileeq(p1: *u8, p2: *u8) -> i64
called by 1: main calls 2: sys_mmaprg_readall
125func rg_row(name: *u8, pass: i64) -> i64
called by 1: main calls 1: rg_p
132func rg_args(a1: *u8, a2: *u8, a3: *u8, a4: *u8) -> *i64
called by 1: main calls 1: sys_mmap
142func main(argc: i64, argv: *i64) -> i64