code wiki / _hdl_build / nx_hr_admin_page_gate.nx
nx_hr_admin_page_gate.nx
buildroot/runtime/_hdl_build/nx_hr_admin_page_gate.nx
about
nx_hr_admin_page_gate.nx -- referee for the /hr admin console (nx_hr_admin_page). PROVES:
* an OWNER view renders the live roster (elderwesto + brad/jensen/kelli), the role labels, the statuses, and
the invite form; * a NON-OWNER view is the owner-only stub and LEAKS NO roster (no "brad", no controls) ;
* SELF-LOCKOUT PREVENTION: the owner has NO suspend control -> exactly 3 suspend forms (one per member), the
owner row shows none. GREEN iff every row matches. Durable -> knowledge/status/hr_admin_page_gate.log.
dependencies 5 imports · 0 importers
imports: nx_hr_admin_page.nxnx_g_puts_lib.nxnx_hr_admin.nxnx_hr.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
| 12 | func g_num(v: i64) -> i64 { let bb: *u8=sys_mmap(28); var m: i64=v; if m<0{m=0-m;sys_write(1,"-" as *u8,1)}; let t: *u8=sys_mmap(28); 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}; var i: i64=0; while i<k{bb[i]=t[k-1-i];i=i+1}; sys_write(1,bb,k); return 0 } |
| 13 | func g_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 } |
| 14 | func g_wn(fd: i64, v: i64) -> i64 { let bb: *u8=sys_mmap(28); var m: i64=v; if m<0{m=0-m}; let t: *u8=sys_mmap(28); 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}; var i: i64=0; while i<k{bb[i]=t[k-1-i];i=i+1}; sys_write(fd,bb,k); return 0 } |
| 15 | func gtrunc(path: *u8) -> i64 { let fd: i64 = sys_openat_wr(path, 0x1a4); if fd>=0 { sys_close(fd) } return 0 } |
| 16 | func g_mkpfx(base: *u8, ms: i64, out: *u8) -> i64 { var o: i64=0; while base[o]!=(0 as u8){out[o]=base[o];o=o+1} let t: *u8=sys_mmap(28); var m: i64=ms; 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} var z: i64=k-1; while z>=0{out[o]=t[z];o=o+1;z=z-1} out[o]=0 as u8; return o } |
| 17 | func g_contains(hay: *u8, hlen: i64, needle: *u8) -> i64 { var nl: i64=0; while needle[nl]!=(0 as u8){nl=nl+1} if nl==0 {return 1} var i: i64=0; while i+nl<=hlen { var j: i64=0; var ok: i64=1; while j<nl { if hay[i+j]!=needle[j]{ok=0;j=nl} else {j=j+1} } if ok==1 {return 1} i=i+1 } return 0 } called by 1: main |
| 18 | func g_count(hay: *u8, hlen: i64, needle: *u8) -> i64 { var nl: i64=0; while needle[nl]!=(0 as u8){nl=nl+1} if nl==0 {return 0} var c: i64=0; var i: i64=0; while i+nl<=hlen { var j: i64=0; var ok: i64=1; while j<nl { if hay[i+j]!=needle[j]{ok=0;j=nl} else {j=j+1} } if ok==1 {c=c+1; i=i+nl} else {i=i+1} } return c } called by 1: main |
| 19 | func chk(got: i64, want: i64, label: *u8) -> i64 |
| 25 | func main() -> i64 |