code wiki / _hdl_build / nx_md.nx

nx_md.nx

buildroot/runtime/_hdl_build/nx_md.nx

2443 B44 linesdepth 3pulls 4 transitivereach 0 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

about

nx_md.nx -- sovereign Markdown -> HTML viewer CLI. The renderer itself lives in nx_md_lib.nx (rule 15 DRY: shared with the NishiOS app layer, which LINKS renderers instead of exec'ing them). Same `html <in> <out> [dlurl]` interface as nx_docx/nx_csv/nx_pdf, so the nx_doc_view dispatcher routes to it by registry with zero special-casing. license_tier: ORIGINAL

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_itoa_lib.nx nx_md_lib.nx nx_md.nx

imports: nx_syscalls.nxnx_itoa_lib.nxnx_md_lib.nx

imported by: nobody (leaf or entry point)

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

main md_puts sys_write md_slen sys_exit sys_mmap md_readfile sys_openat_rd sys_read sys_close md_to_html md_cat md_esc1 md_cat ↻ md_all_dash md_num_to md_inline md_cat ↻ md_esc1 ↻ sys_openat_wr sys_write ↻ sys_close ↻ md_num nxi_out nxi_fd sys_mmap ↻ ccz_cat_num sys_write ↻ sys_munmap

structs

none

consts

8const K_MAGIC_2097168: i64 = 2097168
9const K_MAGIC_2097152: i64 = 2097152
10const K_MAGIC_8388608: i64 = 8388608

functions

12func md_slen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8) { n=n+1 } return n }
called by 1: md_puts
13func md_puts(s: *u8) -> i64 { sys_write(1, s, md_slen(s)); return 0 }
called by 1: main calls 2: sys_writemd_slen
18func md_num(v: i64) -> i64 { nxi_out(v); return 0 }
called by 1: main calls 1: nxi_out
20func md_readfile(path: *u8, buf: *u8, cap: i64) -> i64
called by 1: main calls 3: sys_openat_rdsys_readsys_close
26func main(argc: i64, argv: *i64) -> i64