nx_docpub_render.nx
buildroot/runtime/nx_docpub_render.nx
about
nx_docpub_render.nx -- the DOC RENDER CORE for nx_docpub_site / nx_docpub_tree: turn a .nx source file
into a zero-JS HTML reference page, plus the byte/file/escape helpers both publishers need.
WHY IT IS A SEPARATE MODULE. Both publishers imported nx_docgen_lib.nx expecting these ten symbols;
that library is a DIFFERENT organ -- legal clause templating (dg_clause_put / dg_tmpl_put / dg_merge /
dg_assemble) -- and never carried them. Verified genuinely UNWRITTEN before writing: `func dg_render`
has ZERO matches across all 19,985 files INCLUDING every .dupe-reconciled / .bak-* artifact, so this is
new code and not a re-implementation of something a dedupe deleted (the mistake made on nx_bom earlier).
The dg_ prefix is heavily overloaded -- ~30 unrelated organs define private dg_puts/dg_cat/dg_num -- so
these live in their own file rather than being bolted onto any of them.
ZERO-JS BY CONSTRUCTION: nothing here ever emits a <script tag, and every byte taken from source goes
through dg_catb_esc. nx_docpub_tree T3 asserts exactly that (page contains `<div class=fn ` and does
NOT contain `<script`), so the guarantee is checked, not promised.
license_tier: ORIGINAL No hw writes (Rule 26).
dependencies 1 imports · 2 importers
imports: nx_syscalls.nx
imported by: nx_docpub_site.nxnx_docpub_tree.nx
structs
| none |
consts
| 18 | const DPR_TAGCAP: i64 = 2048 |
| 19 | const DPR_MODE: i64 = 420 |
functions
| 21 | func dgw(s: *u8) -> i64 |
| 28 | func dgn(v: i64) -> i64 |
| 42 | func dg_cat(dst: *u8, off: i64, s: *u8) -> i64 |
| 49 | func dg_catn(dst: *u8, off: i64, v: i64) -> i64 |
| 65 | func dg_catb_esc(dst: *u8, off: i64, src: *u8, from: i64, to: i64) -> i64 |
| 84 | func dg_rdfile(path: *u8, buf: *u8, cap: i64) -> i64 |
| 100 | func dg_writefile(path: *u8, buf: *u8, len: i64) -> i64 |
| 112 | func dg_contains(hay: *u8, n: i64, needle: *u8) -> i64 |
| 133 | func dg_first_doc_line(src: *u8, n: i64, out: *u8) -> i64 |
| 160 | func dpr_isidc(c: i64) -> i64 called by 1: dg_render |
| 170 | func dpr_atline(src: *u8, i: i64) -> i64 called by 1: dg_render |
| 176 | func dpr_matches(src: *u8, n: i64, i: i64, lit: *u8) -> i64 called by 1: dg_render |
| 192 | func dg_render(src: *u8, n: i64, base: *u8, out: *u8, cnt: *i64) -> i64 |