code wiki / _hdl_build / nx_search_ship_lib.nx

nx_search_ship_lib.nx

buildroot/runtime/_hdl_build/nx_search_ship_lib.nx

11964 B273 linesdepth 2pulls 2 transitivereach 2 importersview sourcekind librarytopic search
docsdependenciesstructsconstsfunctions

about

nx_search_ship_lib.nx -- THE PURE HALF OF THE SEARCH SHIP LOOP (2026-09-14): every parser the loop reads a receipt or a probe with, in a lib so nx_search_ship_gate can drive them on planted fixtures without forking a build, a deploy or the edge. The program (nx_search_ship) owns the forks and the exit codes; nothing here touches a file, a socket or a process. Prefix sx_ (ss_ is the seg store's, os_ is nx_organ_ship's). license_tier: ORIGINAL

dependencies 1 imports · 2 importers

nx_syscalls.nx nx_search_ship_lib.nx nx_search_ship.nx nx_search_ship_gate.nx

imports: nx_syscalls.nx

imported by: nx_search_ship.nxnx_search_ship_gate.nx

structs

none

consts

8const SX_PIPE: i64 = 124
9const SX_QUOTE: i64 = 34
10const SX_LF: i64 = 10
11const SX_SPACE: i64 = 32
12const SX_HASH: i64 = 35
13const SX_MINUS: i64 = 45
14const SX_D0: i64 = 48
15const SX_D9: i64 = 57
16const SX_PHASE_SLOTS: i64 = 8 // recv, prep, s1, l0dec, auth, div, total, cand
227const SX_JF_ID: i64 = 0
228const SX_JF_URL: i64 = 1
229const SX_JF_CONNECT: i64 = 2
230const SX_JF_BAR: i64 = 3
231const SX_JF_MUST: i64 = 4
232const SX_JF_CR: i64 = 13
266const SX_AGENT_NOCHANGE: i64 = 0
267const SX_AGENT_ADOPT: i64 = 1
268const SX_AGENT_HOLD: i64 = 2

functions

18func sx_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
19func sx_cat(d: *u8, o: i64, s: *u8) -> i64 { var i: i64 = 0; var oo: i64 = o; while s[i] != (0 as u8) { d[oo] = s[i]; oo = oo + 1; i = i + 1 } d[oo] = 0 as u8; return oo }
20func sx_catn(d: *u8, o: i64, v: i64) -> i64
31func sx_streq(a: *u8, b: *u8) -> i64 { var i: i64 = 0; while a[i] == b[i] { if a[i] == (0 as u8) { return 1 } i = i + 1 } return 0 }
called by 2: mainmain
32func sx_starts(s: *u8, p: *u8) -> i64 { var i: i64 = 0; while p[i] != (0 as u8) { if s[i] != p[i] { return 0 } i = i + 1 } return 1 }
34func sx_find(hay: *u8, n: i64, needle: *u8) -> i64
50func sx_int_after(hay: *u8, n: i64, needle: *u8) -> i64
70func sx_json_str(hay: *u8, n: i64, key: *u8, dst: *u8, cap: i64) -> i64
called by 2: sx_buildmain calls 2: sx_findsx_slen
88func sx_lines_with(hay: *u8, n: i64, pfx: *u8, dst: *u8, cap: i64, dlen: *i64) -> i64
called by 2: mainmain calls 1: sx_starts
111func sx_bytes_eq(a: *u8, an: i64, b: *u8, bn: i64) -> i64
called by 2: mainmain
118func sx_first_diff_line(a: *u8, an: i64, b: *u8, bn: i64) -> i64
called by 2: mainmain
134func sx_phase(hay: *u8, n: i64, out: *i64) -> i64
called by 2: mainmain calls 2: sx_int_aftersx_find
153func sx_journey_bar(cf: *u8, n: i64, id: *u8, dflt: i64) -> i64
183func sx_urlenc(d: *u8, o: i64, s: *u8) -> i64
called by 1: main
195func sx_probes(cf: *u8, n: i64, dst: *u8, w: i64, maxn: i64) -> i64
called by 1: main
219func sx_html_ok(out: *u8, n: i64, marker: *u8) -> i64
called by 1: main calls 1: sx_find
233func sx_journey_field(cf: *u8, n: i64, id: *u8, col: i64, out: *u8, cap: i64) -> i64
called by 2: mainmain calls 1: sx_slen
269func sx_agent_decide(same_as_live: i64, referee_identical: i64, lost: i64) -> i64
called by 1: main