code wiki / _hdl_build / nx_textcut_gate.nx

nx_textcut_gate.nx

buildroot/runtime/_hdl_build/nx_textcut_gate.nx

6527 B106 linesdepth 3pulls 4 transitivereach 0 importersview sourcekind gate/proof
docsdependenciesstructsconstsfunctions

about

nx_textcut_gate.nx -- GATE for nx_textcut (token-boundary-safe cutting). THE FIXTURE IS THE PRODUCTION DEFECT, NOT A SYNTHETIC ONE: the title string below is the document nishifamily.com/search rendered on 2026-08-25, and byte 72 of it -- the live renderer's title cap -- falls on the 'F' of "REFPROP". The live SERP served the title "...Database (RE" and then a snippet BEGINNING "FPROP) Version 9". Every tooth here is checked against that measured behaviour. license_tier: ORIGINAL

dependencies 2 imports · 0 importers

nx_textcut.nx nx_gate_verdict.nx nx_textcut_gate.nx

imports: nx_textcut.nxnx_gate_verdict.nx

imported by: nobody (leaf or entry point)

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

main gv_head gv_puts sys_write 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 ↻ tg_len gv_check gv_puts ↻ tc_splits_token tc_is_wordch tc_stats_reset tc_cut tc_splits_token ↻ tc_is_utf8_cont tg_show gv_puts ↻ gv_num sys_mmap ↻ sys_write ↻ sys_munmap tg_not tg_eq tc_cut_trim tc_cut ↻ tc_is_ws

structs

none

consts

10const TG_LIVE_TITLE_CAP: i64 = 72 // the cap the LIVE renderer used when it produced the defect
11const TG_BIGCAP: i64 = 4096
12const TG_CH_V: i64 = 86
13const TG_CH_e: i64 = 101
14const TG_CH_a: i64 = 97

functions

16func tg_len(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
called by 1: main
17func tg_not(v: i64) -> i64 { if v == 0 { return 1 } return 0 }
called by 1: main
18func tg_eq(a: i64, b: i64) -> i64 { if a == b { return 1 } return 0 }
called by 1: main
22func tg_le(a: i64, b: i64) -> i64 { if a <= b { return 1 } return 0 }
23func tg_gt(a: i64, b: i64) -> i64 { if a > b { return 1 } return 0 }
24func tg_show(label: *u8, v: i64) -> i64 { gv_puts(label); gv_num(v); gv_puts("\n" as *u8); return 0 }
called by 1: main calls 2: gv_putsgv_num
26func main(argc: i64, argv: *i64) -> i64