code wiki / _hdl_build / nx_resolve_lib.nx

nx_resolve_lib.nx

buildroot/runtime/_hdl_build/nx_resolve_lib.nx

4985 B127 linesdepth 4pulls 6 transitivereach 1 importersview sourcekind library
docsdependenciesstructsconstsfunctions

about

nx_resolve_lib.nx -- shared primitives for the consolidation/de-collision organs (nx_split_resolve, nx_decollide). Factored out so the two organs INHERIT one implementation instead of copy-pasting (Rule 15 DRY / the OO-consolidation this session is about). Pure file+build helpers, no hw writes. license_tier: ORIGINAL No hw writes (Rule 26).

dependencies 4 imports · 1 importers

nx_seat_drive_lib.nx nx_seg_store.nx nx_deploy_lib.nx nx_syscalls.nx nx_resolve_lib.nx nx_decollide.nx

imports: nx_seat_drive_lib.nxnx_seg_store.nxnx_deploy_lib.nxnx_syscalls.nx

imported by: nx_decollide.nx

structs

none

consts

10const RL_CAP: i64 = 4194304

functions

12func rl_strlen(s: *u8) -> i64 { var i: i64 = 0; while s[i] != (0 as u8) { i = i + 1 } return i }
13func rl_read(path: *u8, buf: *u8, cap: i64) -> i64
22func rl_eq(a: *u8, an: i64, b: *u8, bn: i64) -> i64 { if an != bn { return 0 } var i: i64 = 0; while i < an { if a[i] != b[i] { return 0 } i = i + 1 } return 1 }
called by 1: main
23func rl_streq(a: *u8, b: *u8) -> i64 { var i: i64 = 0; while a[i] == b[i] { if a[i] == (0 as u8) { return 1 } i = i + 1 } return 0 }
called by 1: main
25func rl_mktok(out: *u8, lib: *u8, tag: *u8) -> i64
calls 1: rl_strlen
45func rl_mktok_name(out: *u8, name: *u8) -> i64
called by 1: main calls 1: rl_strlen
59func rl_replace(src: *u8, n: i64, oldt: *u8, ol: i64, newt: *u8, nl: i64, out: *u8) -> i64
called by 1: main
80func rl_contains(buf: *u8, n: i64, tok: *u8, tl: i64) -> i64
92func rl_basename(path: *u8, out: *u8) -> i64
called by 1: main calls 1: rl_strlen
106func rl_dirname(path: *u8, out: *u8) -> i64
called by 1: main calls 1: rl_strlen
117func rl_build(buildelf: *u8, tname: *u8, artpath: *u8, buf: *u8) -> i64
125func rl_tmpp(out: *u8, base: *u8, suffix: *u8) -> i64
called by 1: main calls 1: sd_cat