code wiki / (root) / nx_colread_lib.nx

nx_colread_lib.nx

buildroot/runtime/nx_colread_lib.nx

2633 B64 linesdepth 2pulls 2 transitivereach 3 importersview sourcekind library
docsdependenciesstructsconstsfunctions

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

nx_syscalls.nx nx_colread_lib.nx nx_mediaflow_lib.nx

imports: nx_syscalls.nx

imported by: nx_mediaflow_lib.nx

structs

none

consts

10const CR_NL: i64 = 10
11const CR_CR: i64 = 13

functions

13func 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
15func cr_eol(buf: *u8, n: i64, i: i64) -> i64
26func cr_trim(buf: *u8, ls: i64, le: i64) -> i64
31func cr_col(buf: *u8, ls: i64, le: i64, delim: i64, k: i64, span: *i64) -> i64
54func cr_eq(buf: *u8, a: i64, b: i64, s: *u8, slen: i64) -> i64
called by 2: cr_ismw_has
64func cr_is(buf: *u8, a: i64, b: i64, lit: *u8) -> i64 { return cr_eq(buf, a, b, lit, cr_slen(lit)) }
calls 2: cr_eqcr_slen