code wiki / (root) / nx_browser_buyguard_gate.nx

nx_browser_buyguard_gate.nx

buildroot/runtime/nx_browser_buyguard_gate.nx

6608 B112 linesdepth 6pulls 10 transitivereach 0 importersview sourcekind gate/prooftopic browser
docsdependenciesstructsconstsfunctions

about

nx_browser_buyguard_gate.nx -- proves the browser "before you buy" pass works on REAL page HTML via the browser's own nx_html_to_text. A realistic product page (nav, the $249.99 product price, $12.99 shipping, a $25.00 gift-card footer) -> strip to text -> detect the product price (largest, not shipping) -> emit the overlay (what you have vs what it truly costs + opportunity cost) -> PAUSE. A page with NO price -> ALLOW + empty overlay (does nothing). Exits 0 iff ALL pass. license_tier: ORIGINAL

dependencies 6 imports · 0 importers

nx_syscalls.nx nx_money.nx nx_html_to_text.nx nx_price_extract.nx nx_adhd.nx nx_browser_buyguard.nx nx_browser_buyguard_gate.nx

imports: nx_syscalls.nxnx_money.nxnx_html_to_text.nxnx_price_extract.nxnx_adhd.nxnx_browser_buyguard.nx

imported by: nobody (leaf or entry point)

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

main sys_mmap seti mny_rate_from_pct mny_div_round mny_div_floor slen nx_html_to_text nx_html_to_text_x h2t_state_new sys_mmap ↻ sys_mmap ↻ h2t_scan_tag h2t_skip_to_gt h2t_scan_name h2t_is_name h2t_is_block_tag h2t_name_eq_lit h2t_lc h2t_lc ↻ h2t_is_suppress_tag h2t_name_eq_lit ↻ h2t_emit_newline h2t_name_eq_lit ↻ h2t_emit_raw h2t_find_href h2t_lc ↻ h2t_is_name ↻ h2t_decode_entity h2t_decode_numeric h2t_is_name ↻ nx_html_entity_lookup h2t_emit_codepoint h2t_emit_text_byte h2t_is_ws h2t_emit_text_byte ↻ sys_munmap chk g_puts sys_write

structs

none

consts

none

functions

13func g_puts(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 }
called by 2: chkmain calls 1: sys_write
14func g_putn(v: i64) -> i64
called by 2: chkmain calls 2: sys_writesys_mmap
23func chk(name: *u8, got: i64, want: i64, st: *i64) -> i64
called by 1: main calls 2: g_putsg_putn
28func slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
called by 1: main
29func gfind(hay: *u8, n: i64, needle: *u8) -> i64
called by 2: hasmain
41func has(hay: *u8, n: i64, needle: *u8) -> i64 { if gfind(hay, n, needle) >= 0 { return 1 } return 0 }
called by 1: main calls 1: gfind
42func seti(a: *i64, i: i64, v: i64) -> i64 { a[i] = v; return 0 }
called by 1: main
44func main() -> i64