code wiki / _hdl_build / nx_map_remove_func.nx

nx_map_remove_func.nx

buildroot/runtime/_hdl_build/nx_map_remove_func.nx

10695 B244 linesdepth 4pulls 6 transitivereach 0 importersview sourcekind tooltopic map
docsdependenciesstructsconstsfunctions

about

nx_map_remove_func.nx -- VARIANT-AGNOSTIC full-scale delegation. For each consumer in a list: find a top-level func by NAME, extract its OWN body (funcmine BOL rule: `func<name>(` -> next `func ` at BOL), REMOVE it, and ensure a shared-lib import is present. Because it reads each consumer's own body, ONE run handles ALL formatting variants of a helper (exact-block matching cannot). SAFE: edits only where the def occurs EXACTLY ONCE and the import anchor occurs exactly once; else SKIP untouched. license_tier: ORIGINAL No hw writes (Rule 26).

dependencies 4 imports · 0 importers

nx_seat_drive_lib.nx nx_deploy_lib.nx nx_ge_str_lib.nx nx_syscalls.nx nx_map_remove_func.nx

imports: nx_seat_drive_lib.nxnx_deploy_lib.nxnx_ge_str_lib.nxnx_syscalls.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main sd_w sys_write sys_exit sys_openat_wr sys_dup3 sys_mmap dp_read sys_openat_rd sys_read sys_close mr_find_bol mr_next_func mr_norm mr_slen mr_one dp_read ↻ mr_is_firmware ge_find mr_count_bol mr_find_bol ↻ mr_next_func ↻ ge_find ↻ mr_norm ↻ mr_eqbytes mr_first_import mr_backup sys_mmap ↻ sys_openat_rd ↻ dp_writefile sys_openat_wr ↻ sys_write ↻ sys_close ↻ dp_writefile ↻ sd_num sys_mmap ↻ sys_write ↻

structs

none

consts

11const MR_CAP: i64 = 1048576
12const MR_LIST: i64 = 131072
13const MR_PATH: i64 = 1024
14const MR_BAKBUF: i64 = 2048

functions

16func mr_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
called by 1: main
18func mr_find_bol(buf: *u8, n: i64, pat: *u8, pl: i64) -> i64
called by 2: mr_onemain
33func mr_count_bol(buf: *u8, n: i64, pat: *u8, pl: i64) -> i64
called by 1: mr_one
49func mr_next_func(buf: *u8, n: i64, from: i64) -> i64
called by 2: mr_onemain
68func mr_first_import(buf: *u8, n: i64) -> i64
called by 1: mr_one
93func mr_norm(src: *u8, s: i64, e: i64, dst: *u8) -> i64
called by 2: mr_onemain
103func mr_eqbytes(a: *u8, alen: i64, b: *u8, blen: i64) -> i64
called by 1: mr_one
109func mr_backup(path: *u8, buf: *u8, n: i64) -> i64
121func mr_is_firmware(buf: *u8, n: i64) -> i64
called by 1: mr_one calls 1: ge_find
132func mr_one(path: *u8, pat: *u8, pl: i64, imp: *u8, in2: i64, libnorm: *u8, libnlen: i64, check: i64, mode: i64, work: *u8, out: *u8, lnbuf: *u8) -> i64
173func main(argc: i64, argv: *i64) -> i64