code wiki / _hdl_build / nx_wiki_page_lib.nx
nx_wiki_page_lib.nx
buildroot/runtime/_hdl_build/nx_wiki_page_lib.nx
about
nx_wiki_page_lib.nx -- the reusable page emitter for the autonomous wiki. wp_emit_page() turns ONE
workstream record (a memory project-*.md = our real work) into an S-class anatomy page (Lead ->
Infobox -> Body[md render w/ [[wikilinks]]] -> See also -> Category) on the shared skin, per the
Wikipedia MoS/Layout the Nishi researcher fetched. Used by nx_wiki_workstream_page (one page) AND
nx_wiki_build (all of them). Sovereign: nx_syscalls + nx_wiki_skin_lib. license_tier: ORIGINAL
dependencies 2 imports · 1 importers
imports: nx_syscalls.nxnx_wiki_skin_lib.nx
imported by: nx_wiki_build.nx
structs
| none |
consts
| 8 | const K_MAGIC_2048: i64 = 2048 |
functions
| 10 | func wp_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n } |
| 11 | func wp_slurp(path: *u8, buf: *u8, cap: i64) -> i64 |
| 20 | func wp_find_from(buf: *u8, len: i64, from: i64, pat: *u8) -> i64 |
| 27 | func wp_line_end(buf: *u8, len: i64, s: i64) -> i64 { var e: i64 = s; while e < len { if buf[e] == (10 as u8) { return e } e = e + 1 } return len } called by 1: wp_body |
| 28 | func wp_fm_field(buf: *u8, len: i64, key: *u8, out: *u8, cap: i64) -> i64 |
| 46 | func wp_esc1(dst: *u8, o: i64, c: i64) -> i64 |
| 52 | func wp_esc(dst: *u8, o: i64, buf: *u8, a: i64, b: i64) -> i64 { var oo: i64 = o; var i: i64 = a; while i < b { oo = wp_esc1(dst, oo, buf[i] as i64); i = i + 1 } return oo } |
| 53 | func wp_find2(buf: *u8, i: i64, end: i64, a: u8, b: u8) -> i64 { var k: i64 = i; while k + 1 < end { if buf[k] == a { if buf[k + 1] == b { return k } } k = k + 1 } return end } |
| 54 | func wp_find1(buf: *u8, i: i64, end: i64, a: u8) -> i64 { var k: i64 = i; while k < end { if buf[k] == a { return k } k = k + 1 } return end } called by 1: wp_inline |
| 55 | func wp_inline(dst: *u8, off: i64, buf: *u8, a: i64, b: i64) -> i64 |
| 82 | func wp_body(dst: *u8, off: i64, buf: *u8, start: i64, len: i64) -> i64 |
| 119 | func wp_seealso(dst: *u8, off: i64, buf: *u8, start: i64, len: i64) -> i64 |
| 139 | func wp_emit_page(out: *u8, rec: *u8, slen: i64) -> i64 |