code wiki / (root) / nx_verify_port_core.nx

nx_verify_port_core.nx

buildroot/runtime/nx_verify_port_core.nx

6820 B150 linesdepth 2pulls 2 transitivereach 1 importersview sourcekind librarytopic verify
docsdependenciesstructsconstsfunctions

about

nx_verify_port_core.nx -- the portability linter's SCANNER (importable; nx_verify's `portability` verb + nx_portability_gate both use THIS one implementation, DRY). A LOGIC-layer source must not touch the OS directly: raw "/proc" "/sys" "/dev" "/tmp" string literals or raw __syscall( outside the seams. //-comments are skipped (docs may NAME the law); strings are scanned (couplings live in strings). license_tier: ORIGINAL

dependencies 1 imports · 1 importers

nx_syscalls.nx nx_verify_port_core.nx nx_portability_gate.nx

imports: nx_syscalls.nx

imported by: nx_portability_gate.nx

structs

none

consts

8const VP_NL: i64 = 10
9const VP_ASCII_0: i64 = 48 // '0' (decimal print)
10const VP_COMMENT_LEN: i64 = 2 // "//" is two chars
39const VP_RD_CAP: i64 = 1048576 // per-file scan cap
40const VP_C_SCANNED: i64 = 0 // census counts[] slots
41const VP_C_COUPLED: i64 = 1
42const VP_C_HITS: i64 = 2
43const VP_C_EXEMPT: i64 = 3
44const VP_PATH_CAP: i64 = 1024
45const VP_DENT_BUF: i64 = 65536 // getdents64 batch (proven sizing)

functions

12func vp_puts(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 }
called by 3: pg_checkmainvp_census calls 1: sys_write
13func vp_putn(v: i64) -> i64
called by 2: mainvp_census calls 2: sys_writesys_mmap
23func vp_matchat(buf: *u8, i: i64, n: i64, lit: *u8) -> i64
called by 1: vp_scan
29func vp_name_has(s: *u8, needle: *u8) -> i64
called by 1: vp_exempt_name
48func vp_read(path: *u8, buf: *u8, cap: i64) -> i64
58func vp_exempt_name(name: *u8) -> i64
called by 1: vp_census calls 1: vp_name_has
66func vp_ends(s: *u8, suf: *u8) -> i64
called by 1: vp_census
76func vp_scan(buf: *u8, n: i64) -> i64
called by 2: mainvp_census calls 1: vp_matchat
101func vp_census(dir: *u8, counts: *i64) -> i64