code wiki / _hdl_build / nx_browser_forms_gate.nx
nx_browser_forms_gate.nx
buildroot/runtime/_hdl_build/nx_browser_forms_gate.nx
dependencies 3 imports · 0 importers
imports: nx_gate_base.nxnx_browser_forms.nxnx_syscalls.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
| 9 | func grow(name: *u8, ok: i64) -> i64 { if ok==1 { gw(" PASS " as *u8) } else { gw(" FAIL " as *u8) } gw(name); gw(" calls 1: gw |
| 11 | func gln(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n } called by 1: main |
| 12 | func gstreq(a: *u8, b: *u8) -> i64 { var i: i64=0; while 1==1 { if (a[i] as i64)!=(b[i] as i64){return 0} if (a[i] as i64)==0 {return 1} i=i+1 } return 0 } |
| 13 | func gbufeq(buf: *u8, n: i64, lit: *u8) -> i64 { let ll: i64=gln(lit); if n!=ll {return 0} var i: i64=0; while i<n { if (buf[i] as i64)!=(lit[i] as i64){return 0} i=i+1 } return 1 } |
| 14 | func gcontains(hay: *u8, n: i64, needle: *u8) -> i64 { let nn: i64=gln(needle); var i: i64=0; while i+nn<=n { var m: i64=1; var j: i64=0; while j<nn { if (hay[i+j] as i64)!=(needle[j] as i64){m=0;j=nn} else {j=j+1} } if m==1 {return 1} i=i+1 } return 0 } |
| 15 | func gcell(ok: i64, id: *u8, txt: *u8) -> i64 { if ok==1 {gw(" PASS " as *u8)} else {gw(" FAIL " as *u8)} gw(id); gw(" " as *u8); gw(txt); gw("\n" as *u8); return ok } |
| 17 | func main() -> i64 |
| 121 | func gwn(v: i64) -> i64 { var m: i64=v; if m<0 {gw("-" as *u8);m=0-m} let t: *u8=sys_mmap(24); var k: i64=0; if m==0 {t[0]=48 as u8;k=1} while m>0 {t[k]=(48+(m%10)) as u8;m=m/10;k=k+1} let o: *u8=sys_mmap(24); var i: i64=0; while i<k {o[i]=t[k-1-i];i=i+1} sys_write(1,o,k); return 0 } |