nx_colread_lib.nx
buildroot/runtime/nx_colread_lib.nx
about
nx_colread_lib.nx -- ONE delimiter-separated column reader (2026-09-17). The estate keeps rows as tab columns (manifests,
planes, confs) and as pipe columns (oracle rows, plan and judge files), and organs hand-rolled the same scanner each
time: the photo ruler's pm_field, the asset page's apl_col, the plan runner's pr_cols. This is the shared form: the
delimiter is a parameter, the line walker stops at NL and the content end drops a CR (a data file may arrive from any
host, and a CR left on the last column compares unequal while printing identically). Consumers: nx_mediaflow_lib.
Owed: fold pm_field and apl_col onto cr_col when their closures next ship (queued on aesthetictwin.plan).
license_tier: ORIGINAL No hw writes (Rule 26).
dependencies 1 imports · 1 importers
imports: nx_syscalls.nx
imported by: nx_mediaflow_lib.nx
structs
| none |
consts
| 10 | const CR_NL: i64 = 10 |
| 11 | const CR_CR: i64 = 13 |
functions
| 13 | func cr_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n } called by 1: cr_is |
| 15 | func cr_eol(buf: *u8, n: i64, i: i64) -> i64 |
| 26 | func cr_trim(buf: *u8, ls: i64, le: i64) -> i64 |
| 31 | func cr_col(buf: *u8, ls: i64, le: i64, delim: i64, k: i64, span: *i64) -> i64 |
| 54 | func cr_eq(buf: *u8, a: i64, b: i64, s: *u8, slen: i64) -> i64 |
| 64 | func cr_is(buf: *u8, a: i64, b: i64, lit: *u8) -> i64 { return cr_eq(buf, a, b, lit, cr_slen(lit)) } |