nx_path.nx
buildroot/runtime/nx_path.nx
about
nx_path.nx -- POSIX path utilities (basename, dirname, join, normalize, ext).
The toolchain front-ends (nx_toolchain, nxc_native_wrap, nxld,
nxasm) all need to manipulate paths: derive output filenames
from input filenames (foo.nx -> foo.s -> foo.o -> foo.elf), strip
directory prefixes for log lines, build search paths.
Today each tool inlines its own ad-hoc string scanning. This
module centralises the operations under a clean API.
Conventions match POSIX (forward slashes, "." and ".." segments).
Windows backslash paths are out of scope -- nxc2 normalises them
at the input layer.
dependencies 2 imports · 0 importers
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
structs
| none |
consts
| none |
functions
| 27 | func nx_path_last_slash(s: *u8) -> i64 |
| 40 | func nx_path_last_dot(s: *u8) -> i64 |
| 59 | func nx_path_copy_z(dst: *u8, src: *u8, n: i64) -> *u8 |
| 75 | func nx_path_basename(p: *u8, out: *u8) -> *u8 |
| 90 | func nx_path_dirname(p: *u8, out: *u8) -> *u8 |
| 107 | func nx_path_join(a: *u8, b: *u8, out: *u8) -> *u8 |
| 136 | func nx_path_replace_ext(p: *u8, new_ext: *u8, out: *u8) -> *u8 |
| 159 | func nx_path_ext(p: *u8, out: *u8) -> *u8 |
| 175 | func main() -> i64 |