code wiki / (root) / nx_env.nx

nx_env.nx

buildroot/runtime/nx_env.nx

4170 B116 linesdepth 4pulls 4 transitivereach 0 importersview sourcekind tooltopic env
docsdependenciesstructsconstsfunctions

about

nx_env.nx -- environment variable lookup over the System V envp. At program entry the kernel hands us argc + argv + envp. envp is a NULL-terminated array of "KEY=VALUE" strings. This module searches envp for a given key and returns the value pointer (NUL- terminated) or NULL. Callers (toolchain): NX_NXC_PATH, NX_DEBUG, HOME, PATH, etc. We don't mutate envp -- this is a pure read interface. Setenv would require redirecting stdlib calls, which the off-C runtime doesn't have anyway.

dependencies 2 imports · 0 importers

syscalls.nx runtime.nx nx_env.nx

imports: syscalls.nxruntime.nx

imported by: nobody (leaf or entry point)

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

main nx_env_count nx_env_get nx_env_key_match strlen

structs

none

consts

none

functions

27func nx_env_key_match(entry: *u8, key: *u8) -> i64
called by 1: nx_env_get
42func nx_env_get(envp: *i64, key: *u8) -> *u8
called by 1: main calls 2: nx_env_key_matchstrlen
56func nx_env_count(envp: *i64) -> i64
called by 1: main
64func main() -> i64