nx_underbuilt_lib.nx
buildroot/runtime/nx_underbuilt_lib.nx
about
nx_underbuilt_lib.nx -- R6 parse/tally core for the NHTSA underbuilt-part signal (LIB, no main; imported
by nx_underbuilt_board + nx_underbuilt_gate). Context-byte JSON key matching (quote-key-quote-colon) so no
quote characters appear in nx string literals; component values split on commas and tallied in a ctx-table
arena. ctx t: *i64 slots: 0=name-arena ptr, 1=arena-used, 2=off[] ptr, 3=len[] ptr, 4=count[] ptr,
5=ndistinct, 6=records (key occurrences), 7=tokens (sum of counts), 8=arena cap.
Board persistence to seg_store = a later rung; v0 board is printed + gated. license_tier: ORIGINAL
dependencies 1 imports · 2 importers
imports: nx_syscalls.nx
imported by: nx_underbuilt_board.nxnx_underbuilt_gate.nx
structs
| none |
consts
| none |
functions
| 9 | func ubl_puts(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 } |
| 10 | func ubl_putn(v: i64) -> i64 |
| 25 | func ubl_read(path: *u8, buf: *u8, cap: i64) -> i64 |
| 43 | func ubl_match(buf: *u8, n: i64, key: *u8, klen: i64, at: i64) -> i64 called by 1: ubl_next |
| 58 | func ubl_next(buf: *u8, n: i64, key: *u8, klen: i64, from: i64) -> i64 |
| 73 | func ubl_key_int(buf: *u8, n: i64, key: *u8, klen: i64) -> i64 |
| 97 | func ubl_count_true(buf: *u8, n: i64, key: *u8, klen: i64) -> i64 |
| 112 | func ubl_reset(t: *i64) -> i64 { t[1] = 0; t[5] = 0; t[6] = 0; t[7] = 0; return 0 } |
| 115 | func ubl_tok_add(t: *i64, buf: *u8, at: i64, len: i64) -> i64 called by 1: ubl_tally |
| 156 | func ubl_tally(t: *i64, buf: *u8, n: i64, key: *u8, klen: i64) -> i64 |
| 203 | func ubl_top(t: *i64, rank: *i64, kmax: i64) -> i64 |
| 226 | func ubl_name_out(t: *i64, idx: i64) -> i64 |
| 235 | func ubl_name_is(t: *i64, idx: i64, s: *u8) -> i64 called by 1: main |