code wiki / _hdl_build / nx_sitemap_extract_gate.nx
nx_sitemap_extract_gate.nx
buildroot/runtime/_hdl_build/nx_sitemap_extract_gate.nx
dependencies 3 imports · 0 importers
imports: nx_gate_gn.nxnx_syscalls.nxnx_sitemap_extract.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| none |
functions
| 8 | func gw(s: *u8) -> i64 { var k: i64=0; while s[k]!=(0 as u8){k=k+1} sys_write(1,s,k); return 0 } |
| 9 | func sl(s: *u8) -> i64 { var k: i64=0; while s[k]!=(0 as u8){k=k+1} return k } called by 1: main |
| 10 | func streq(a: *u8, b: *u8) -> i64 { var i: i64=0; while a[i]!=(0 as u8) { if a[i]!=b[i] { return 0 } i=i+1 } if b[i]!=(0 as u8) { return 0 } return 1 } called by 1: main |
| 11 | func chk(name: *u8, ok: i64, p: *i64, t: *i64) -> i64 { t[0]=t[0]+1; if ok==1 { p[0]=p[0]+1; gw(" ok " as *u8) } else { gw(" FAIL " as *u8) } gw(name); gw("\n" as *u8); return 0 } |
| 12 | func gread(path: *u8, buf: *u8, cap: i64) -> i64 { let fd: i64=sys_openat_rd(path); if fd<0 { return 0-1 } var tot: i64=0; var go: i64=1; while go==1 { let n: i64=sys_read(fd,(buf as i64+tot) as *u8,cap-tot); if n<=0 { go=0 } else { tot=tot+n; if tot>=cap { go=0 } } } sys_close(fd); return tot } |
| 14 | func main() -> i64 |