code wiki / _hdl_build / nx_wiki_shell.nx

nx_wiki_shell.nx

buildroot/runtime/_hdl_build/nx_wiki_shell.nx

29420 B545 linesdepth 8pulls 12 transitivereach 23 importersview sourcekind librarytopic wiki
docsdependenciesstructsconstsfunctions

about

nx_wiki_shell.nx -- THE AUTOMATIC PAGE BUILDER: the standard wiki-page furniture as reusable emitters, so EVERY Nishi wiki page clears the MediaWiki/Wikipedia feature bar measured by nx_wiki_exceed. Each function appends to a caller buffer and returns the new offset. Features emitted (the census signals): responsive-viewport, print-css (media="print"), lang-links (hreflang=), permalink (rel="bookmark") [sh_head]; navbar (<nav), search (type="search"), wikilinks (href="/wiki/) [sh_nav]; toc (class="toc") [sh_toc_*]; section-anchors (<h2 id=) [sh_section]; infobox (class="infobox") [sh_infobox_*]; references (class="references") [sh_refs_*]; categories (class="catlinks"), seealso (id="seealso"), edit-affordance (class="wiki-edit") [sh_footer]. The page supplies its own <h1> + freshness chip + body. Sovereign: nx_syscalls. license_tier: ORIGINAL

dependencies 3 imports · 13 importers

nx_syscalls.nx nx_wiki_backlinks.nx nx_native_config.nx nx_wiki_shell.nx nx_ims_page.nx nx_status_page.nx nx_wiki_ai_start_page.nx nx_wiki_board_page.nx nx_wiki_charter_page.nx nx_wiki_codec_status_page.nx nx_wiki_devlog.nx nx_wiki_econsim_page.nx nx_wiki_nist_stem_page.nx nx_wiki_products_page.nx

diagram shows first 10 each side; +0 more imports, +3 more importers in the complete lists below.

imports: nx_syscalls.nxnx_wiki_backlinks.nxnx_native_config.nx

imported by: nx_ims_page.nxnx_status_page.nxnx_wiki_ai_start_page.nxnx_wiki_board_page.nxnx_wiki_charter_page.nxnx_wiki_codec_status_page.nxnx_wiki_devlog.nxnx_wiki_econsim_page.nxnx_wiki_nist_stem_page.nxnx_wiki_products_page.nxnx_wiki_roadmap_page.nxnx_wiki_viz_atlas.nxnx_wiki_walk_metrics.nx

structs

113struct NxWikiLinks

consts

109const SH_WL_MAXROWS: i64 = 64
110const SH_WL_MAXBYTES: i64 = 65536
111const SH_WL_NCOLS: i64 = 7
365const SH_BL_CAP: i64 = 32768
382const SH_CORPUS_PATH: *u8 = "knowledge/status/ims_live_corpus.txt"
383const SH_CORPUS_CAP: i64 = 4194304
384const SH_CORPUS_MARKN: i64 = 8 // len("###PAGE ")

functions

16func sh_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != 0 as u8 { n = n + 1 } return n }
17func sh_cat(dst: *u8, off: i64, s: *u8) -> i64 { var i: i64 = 0; while s[i] != 0 as u8 { dst[off + i] = s[i]; i = i + 1 } return off + i }
18func sh_catn(dst: *u8, off: i64, v: i64) -> i64
30func sh_head(buf: *u8, off: i64, title: *u8, slug: *u8) -> i64
called by 12: ip_rendermainmainmainmainmain+6 calls 1: sh_cat
58func sh_nav(buf: *u8, off: i64, slug: *u8) -> i64
called by 12: ip_rendermainmainmainmainmain+6 calls 1: sh_cat
67func sh_toc_open(buf: *u8, off: i64) -> i64 { return sh_cat(buf, off, "<nav class=\"toc\" aria-label=\"Contents\"><b>Contents</b><ol>\n" as *u8) }
called by 10: mainmainmainmainmainmain+4 calls 1: sh_cat
68func sh_toc_item(buf: *u8, off: i64, id: *u8, title: *u8) -> i64
called by 10: mainmainmainmainmainmain+4 calls 1: sh_cat
73func sh_toc_close(buf: *u8, off: i64) -> i64 { return sh_cat(buf, off, "</ol></nav>\n" as *u8) }
called by 10: mainmainmainmainmainmain+4 calls 1: sh_cat
76func sh_section(buf: *u8, off: i64, id: *u8, title: *u8) -> i64
called by 12: ip_rendermainmainmainmainmain+6 calls 1: sh_cat
83func sh_infobox_open(buf: *u8, off: i64, title: *u8) -> i64
called by 12: ip_rendermainmainmainmainmain+6 calls 1: sh_cat
88func sh_infobox_row(buf: *u8, off: i64, k: *u8, v: *u8) -> i64
called by 12: ip_rendermainmainmainmainmain+6 calls 1: sh_cat
93func sh_infobox_close(buf: *u8, off: i64) -> i64 { return sh_cat(buf, off, "</table></aside>\n" as *u8) }
called by 12: ip_rendermainmainmainmainmain+6 calls 1: sh_cat
96func sh_refs_open(buf: *u8, off: i64) -> i64 { return sh_cat(buf, off, "<section class=\"references\"><h2 id=\"refs\"><a href=\"#refs\">References &amp; evidence</a></h2><ol>\n" as *u8) }
called by 8: mainmainmainmainmainmain+2 calls 1: sh_cat
97func sh_refs_close(buf: *u8, off: i64) -> i64 { return sh_cat(buf, off, "</ol></section>\n" as *u8) }
121func sh_wl_field(wl: *NxWikiLinks, row: i64, col: i64) -> *u8
131func sh_streq(a: *u8, b: *u8) -> i64
144func sh_wl_row_of(wl: *NxWikiLinks, slug: *u8) -> i64
157func sh_wl_cell(keys: *i64, vals: *i64, nf: i64, name: *u8) -> i64
called by 1: sh_links_load calls 1: ncfg_field
206func sh_title_of(dst: *u8, off: i64, slug: *u8) -> i64
223func sh_breadcrumb(buf: *u8, off: i64, wl: *NxWikiLinks, slug: *u8) -> i64
264func sh_prevnext(buf: *u8, off: i64, wl: *NxWikiLinks, slug: *u8) -> i64
328func sh_tree(buf: *u8, off: i64, wl: *NxWikiLinks, slug: *u8) -> i64
385func sh_corpus_store() -> *NxWikiDocStore
440func sh_walk_furniture(buf: *u8, off: i64, wl: *NxWikiLinks, store: *NxWikiDocStore, slug: *u8) -> i64