code wiki / (root) / nx_bspfacts_gate.nx

nx_bspfacts_gate.nx

buildroot/runtime/nx_bspfacts_gate.nx

13395 B274 linesdepth 5pulls 6 transitivereach 0 importersview sourcekind gate/proof
docsdependenciesstructsconstsfunctions

about

nx_bspfacts_gate.nx -- BITE-PROOF for the BodySlide preset dialect, both directions. IT DRIVES THE SHIPPING CODE: every tooth calls nx_bspfacts_lib directly -- the same bsp_probe, bsp_decode and bsp_val_permil the CLI calls. A tooth that tests a re-implementation proves nothing about what ships. FIXTURES ARE ASSEMBLED AT RUNTIME under /tmp/<gate>/ -- a detector that scans source will find its own test fixture, and prose is source bytes too, so no fixture literal (and no quote character) exists in this file. Every path is unlinked before it is written (idempotence). FIXTURE HONESTY, DECLARED: these fixtures are SYNTHETIC, derived from the mirrored GPL-3.0 reference parser (SliderPresets.cpp: value is FloatAttribute/100 on load, int percent on save). The real-community-preset fixture is a named watch contract on /compare/koikatsu (bsp_fixture_real) -- the operator's adult-gated candidate needs a logged-in bank first. license_tier: ORIGINAL expect_exit: 0

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_gate_verdict.nx nx_bspfacts_lib.nx nx_bspfacts_gate.nx

imports: nx_syscalls.nxnx_gate_verdict.nxnx_bspfacts_lib.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main gv_ctr sys_mmap nxa_die sys_write sys_exit nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give nxa_lock_addr ↻ nxa_report_overrun sys_write ↻ nxa_dump_printable sys_write ↻ nxa_dump_sizes sys_write ↻ gv_head gv_puts sys_write ↻ sys_mkdir sys_mmap ↻ bg_build_good bg_cat bg_nl bg_preset_open bg_cat ↻ bg_qv bg_q bg_cat ↻ bg_nl ↻ bg_qv ↻ bg_slider bg_cat ↻ bg_qv ↻ bg_nl ↻ bg_write sys_unlinkat sys_openat_wr sys_write ↻

structs

none

consts

21const BG_DIR: *u8 = "/tmp/nx_bspfacts_gate" as *u8
22const BG_F_GOOD: *u8 = "/tmp/nx_bspfacts_gate/good.xml" as *u8
23const BG_F_BADVAL: *u8 = "/tmp/nx_bspfacts_gate/badval.xml" as *u8
24const BG_F_PLAIN: *u8 = "/tmp/nx_bspfacts_gate/plain.xml" as *u8
25const BG_F_JUNK: *u8 = "/tmp/nx_bspfacts_gate/junk.bin" as *u8
26const BG_F_EMPTY: *u8 = "/tmp/nx_bspfacts_gate/empty.xml" as *u8
27const BG_BUFCAP: i64 = 65536
28const BG_NL: i64 = 10
29const BG_TRUNC_HEAD: i64 = 64 // enough head to find the root + first Preset, less than the file
30const BG_MAXVALS: i64 = 64
31const BG_V_BREASTS: i64 = 570 // value 57 percent
32const BG_V_WAIST: i64 = 575 // value 57.5 percent -- tenth kept
33const BG_V_THIGH: i64 = 0 - 250 // value -25 percent -- sign carried
34const BG_V_SMALL: i64 = 400 // value 40 percent on the SMALL axis of the SAME slider name
35const BG_V_SECOND: i64 = 990 // value 99 percent, SECOND preset -- must never leak into the first window

functions

37func bg_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
called by 1: bg_speq
38func bg_cat(dst: *u8, at: i64, s: *u8) -> i64
44func bg_q(dst: *u8, at: i64) -> i64 { dst[at] = BSP_QUOTE as u8; return at + 1 }
called by 1: bg_qv
45func bg_nl(dst: *u8, at: i64) -> i64 { dst[at] = BG_NL as u8; return at + 1 }
46func bg_qv(dst: *u8, at: i64, v: *u8) -> i64
52func bg_slider(dst: *u8, at: i64, name: *u8, size: *u8, value: *u8) -> i64
62func bg_preset_open(dst: *u8, at: i64, name: *u8, set: *u8) -> i64
70func bg_write(path: *u8, body: *u8, n: i64) -> i64
79func bg_speq(buf: *u8, off: i64, len: i64, want: *u8) -> i64
called by 1: main calls 1: bg_slen
88func bg_build_good(dst: *u8) -> i64
110func bg_build_badval(dst: *u8) -> i64
123func bg_build_plain(dst: *u8) -> i64
called by 1: main calls 3: bg_catbg_nlbg_preset_open
133func main(argc: i64, argv: *i64) -> i64