code wiki / _hdl_build / nx_ui_contrast.nx
nx_ui_contrast.nx
buildroot/runtime/_hdl_build/nx_ui_contrast.nx
about
nx_ui_contrast.nx -- QUANTITATIVE layer of the judging system: MEASURED WCAG contrast (not technique presence).
Extracts --nx-color-ink / --nx-color-bg from each emitted page's :root and computes the ACCURATE WCAG 2.x
contrast ratio via nx_brand_guard (fx_pow sRGB gamma, matches the WCAG reference). AA>=4.50:1, AAA>=7.00:1.
Composes nx_brand_guard (-> its nx_syscalls layer; no nx_syscalls_x86_64 dup). Helpers uc_*-prefixed to avoid
any collision with the brand_guard/brand_tokens/fx import chain. In _hdl_build/ beside nx_brand_guard so the
import resolves. license_tier: ORIGINAL expect_exit: 0
dependencies 1 imports · 0 importers
imports: nx_brand_guard.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
| 8 | const K_MAGIC_262144: i64 = 262144 |
functions
| 10 | func uc_puts(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8) { n=n+1 } sys_write(1,s,n); return 0 } |
| 11 | func uc_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-(m/10)*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 } |
| 12 | func uc_len(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8) { n=n+1 } return n } |
| 14 | func uc_find(hay: *u8, n: i64, pat: *u8) -> i64 |
| 26 | func uc_slurp(path: *u8, buf: *u8, cap: i64) -> i64 |
| 35 | func uc_ext(buf: *u8, n: i64, key: *u8, out: *u8) -> i64 |
| 54 | func uc_white(h: *u8) -> i64 { h[0]=35 as u8; h[1]=102 as u8; h[2]=102 as u8; h[3]=102 as u8; h[4]=102 as u8; h[5]=102 as u8; h[6]=102 as u8; h[7]=0 as u8; return 0 } called by 1: uc_grade |
| 56 | func uc_grade(name: *u8, path: *u8, buf: *u8, cap: i64, tot: *i64) -> i64 |
| 78 | func main() -> i64 |