nx_bspfacts_gate.nx
buildroot/runtime/nx_bspfacts_gate.nx
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
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
structs
| none |
consts
| 21 | const BG_DIR: *u8 = "/tmp/nx_bspfacts_gate" as *u8 |
| 22 | const BG_F_GOOD: *u8 = "/tmp/nx_bspfacts_gate/good.xml" as *u8 |
| 23 | const BG_F_BADVAL: *u8 = "/tmp/nx_bspfacts_gate/badval.xml" as *u8 |
| 24 | const BG_F_PLAIN: *u8 = "/tmp/nx_bspfacts_gate/plain.xml" as *u8 |
| 25 | const BG_F_JUNK: *u8 = "/tmp/nx_bspfacts_gate/junk.bin" as *u8 |
| 26 | const BG_F_EMPTY: *u8 = "/tmp/nx_bspfacts_gate/empty.xml" as *u8 |
| 27 | const BG_BUFCAP: i64 = 65536 |
| 28 | const BG_NL: i64 = 10 |
| 29 | const BG_TRUNC_HEAD: i64 = 64 // enough head to find the root + first Preset, less than the file |
| 30 | const BG_MAXVALS: i64 = 64 |
| 31 | const BG_V_BREASTS: i64 = 570 // value 57 percent |
| 32 | const BG_V_WAIST: i64 = 575 // value 57.5 percent -- tenth kept |
| 33 | const BG_V_THIGH: i64 = 0 - 250 // value -25 percent -- sign carried |
| 34 | const BG_V_SMALL: i64 = 400 // value 40 percent on the SMALL axis of the SAME slider name |
| 35 | const BG_V_SECOND: i64 = 990 // value 99 percent, SECOND preset -- must never leak into the first window |
functions
| 37 | func 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 |
| 38 | func bg_cat(dst: *u8, at: i64, s: *u8) -> i64 |
| 44 | func bg_q(dst: *u8, at: i64) -> i64 { dst[at] = BSP_QUOTE as u8; return at + 1 } called by 1: bg_qv |
| 45 | func bg_nl(dst: *u8, at: i64) -> i64 { dst[at] = BG_NL as u8; return at + 1 } |
| 46 | func bg_qv(dst: *u8, at: i64, v: *u8) -> i64 |
| 52 | func bg_slider(dst: *u8, at: i64, name: *u8, size: *u8, value: *u8) -> i64 |
| 62 | func bg_preset_open(dst: *u8, at: i64, name: *u8, set: *u8) -> i64 |
| 70 | func bg_write(path: *u8, body: *u8, n: i64) -> i64 |
| 79 | func bg_speq(buf: *u8, off: i64, len: i64, want: *u8) -> i64 |
| 88 | func bg_build_good(dst: *u8) -> i64 |
| 110 | func bg_build_badval(dst: *u8) -> i64 |
| 123 | func bg_build_plain(dst: *u8) -> i64 |
| 133 | func main(argc: i64, argv: *i64) -> i64 |