code wiki / _hdl_build / nx_csv.nx

nx_csv.nx

buildroot/runtime/_hdl_build/nx_csv.nx

6104 B97 linesdepth 3pulls 3 transitivereach 0 importersview sourcekind tooltopic csv
docsdependenciesstructsconstsfunctions

about

nx_csv.nx -- sovereign CSV -> HTML table viewer. A Nishi browser document renderer: turns a .csv into a clean 0-JS HTML table the browser shows inline (first row = header). Handles quoted cells ("a,b" and "" escapes). Same `html <in> <out> [dlurl]` interface as nx_docx/nx_md so nx_doc_view routes to it by registry. license_tier: ORIGINAL

dependencies 2 imports · 0 importers

nx_syscalls.nx nx_itoa_lib.nx nx_csv.nx

imports: nx_syscalls.nxnx_itoa_lib.nx

imported by: nobody (leaf or entry point)

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

main cv_puts sys_write cv_slen sys_exit sys_mmap cv_readfile sys_openat_rd sys_read sys_close cv_to_html cv_cat cv_row cv_cat ↻ cv_esc1 cv_cat ↻ sys_openat_wr sys_write ↻ sys_close ↻ cv_num nxi_out nxi_fd sys_mmap ↻ ccz_cat_num sys_write ↻ sys_munmap

structs

none

consts

6const K_MAGIC_4194320: i64 = 4194320
7const K_MAGIC_4194304: i64 = 4194304
8const K_MAGIC_16777216: i64 = 16777216

functions

10func cv_slen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8) { n=n+1 } return n }
called by 1: cv_puts
11func cv_puts(s: *u8) -> i64 { sys_write(1, s, cv_slen(s)); return 0 }
called by 1: main calls 2: sys_writecv_slen
16func cv_num(v: i64) -> i64 { nxi_out(v); return 0 }
called by 1: main calls 1: nxi_out
17func cv_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 cv_esc1(dst: *u8, o: i64, c: i64) -> i64
called by 1: cv_row calls 1: cv_cat
24func cv_readfile(path: *u8, buf: *u8, cap: i64) -> i64
called by 1: main calls 3: sys_openat_rdsys_readsys_close
31func cv_row(out: *u8, off: i64, src: *u8, i: i64, end: i64, isheader: i64) -> i64
called by 1: cv_to_html calls 2: cv_catcv_esc1
59func cv_to_html(src: *u8, slen: i64, out: *u8, dlurl: *u8) -> i64
called by 1: main calls 2: cv_catcv_row
79func main(argc: i64, argv: *i64) -> i64