code wiki / _hdl_build / nx_meet_lib.nx
nx_meet_lib.nx
buildroot/runtime/_hdl_build/nx_meet_lib.nx
about
nx_meet_lib.nx -- shared helpers for the NISHI MEET PLATFORM organs (LIBRARY, no main; rule 15 DRY, so R2..R8
don't each re-implement them). String/io utils + .meet config lookup (meet|key|value) + |-delimited field
extraction + HTML-escape (escape DATA values, never the organ's own markup) + slug sanitation. 100% sovereign
(nx_cc->nxasm, no gcc/JS). license_tier: ORIGINAL
dependencies 1 imports · 24 importers
diagram shows first 10 each side; +0 more imports, +14 more importers in the complete lists below.
imports: nx_syscalls.nx
imported by: nx_meet_about.nxnx_meet_curate.nxnx_meet_curate_gate.nxnx_meet_emit.nxnx_meet_http.nxnx_meet_http_gate.nxnx_meet_intake.nxnx_meet_intake_process.nxnx_meet_intake_process_gate.nxnx_meet_jobs.nxnx_meet_pipeline_gate.nxnx_meet_publish.nxnx_meet_serve.nxnx_meet_serve_gate.nxnx_meet_serve_lib.nxnx_meet_signals.nxnx_meet_signals_gate.nxnx_meet_store.nxnx_meet_store_gate.nxnx_meet_trust.nxnx_meet_trust_gate.nxnx_meet_trust_run.nxnx_pub_ship_meet.nxnx_pub_todos.nx
structs
| none |
consts
| 6 | const K_MAGIC_1024: i64 = 1024 |
functions
| 8 | func mlen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n } |
| 9 | func mputs(s: *u8) -> i64 { sys_write(1, s, mlen(s)); return 0 } |
| 10 | func mnum(v0: i64) -> i64 { var v: i64=v0; if v<0{sys_write(1,"-" as *u8,1);v=0-v} let b: *u8=sys_mmap(28); var k: i64=0; if v==0{b[0]=48 as u8;k=1} while v>0{b[k]=(48+(v%10)) as u8;v=v/10;k=k+1} let o: *u8=sys_mmap(28); var j: i64=0; while j<k{o[j]=b[k-1-j];j=j+1} sys_write(1,o,k); return 0 } |
| 13 | func mcat(dst: *u8, off: i64, s: *u8) -> i64 |
| 21 | func mesc(dst: *u8, off: i64, s: *u8) -> i64 |
| 38 | func meet_seq(text: *u8, s: i64, e: i64, lit: *u8, litlen: i64) -> i64 |
| 46 | func meet_get(data: *u8, n: i64, key: *u8, out: *u8, cap: i64) -> i64 |
| 76 | func meet_get_or(data: *u8, n: i64, key: *u8, out: *u8, cap: i64, deflt: *u8) -> i64 |
| 86 | func mfield(data: *u8, ls: i64, le: i64, idx: i64, out: *u8, cap: i64) -> i64 |
| 96 | func meet_slug_safe(src: *u8, out: *u8, cap: i64) -> i64 |
| 115 | func meet_w(fd: i64, s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(fd, s, n); return 0 } |
| 116 | func meet_mkdir(path: *u8) -> i64 { __syscall(83, path as i64, 493, 0, 0, 0, 0); return 0 } // mkdir 0755, ignore EEXIST |
| 119 | func meet_nav_css(fd: i64) -> i64 |
| 123 | func meet_nav_link(fd: i64, href: *u8, label: *u8, active: i64, idx: i64) -> i64 |
| 130 | func meet_header_nav(fd: i64, brand: *u8, active: i64) -> i64 |
| 145 | func meet_san(dst: *u8, off: i64, s: *u8) -> i64 |