code wiki / _hdl_build / nx_print_css_gate.nx

nx_print_css_gate.nx

buildroot/runtime/_hdl_build/nx_print_css_gate.nx

12799 B194 linesdepth 10pulls 53 transitivereach 0 importersview sourcekind gate/prooftopic print
docsdependenciesstructsconstsfunctions

about

nx_print_css_gate.nx -- referee for sc_print_css (datavis DV7, 2026-09-15): the ONE print stylesheet every compare generator emits last. Composes the emitter in-process into a scratch file and reads the bytes back: one balanced print media rule, the light palette re-selected under the OS-preference selector's own specificity with its grounds made white, figures and cards unbroken, tables paginating with a repeating header and unsplit rows, the filter bar and the chips hidden, no bang byte and no hash byte (order is the specificity; the lexer forbids both), a deterministic emit, a planted sheet without the rules REFUSED by the same reader, and the live search page witnessed whenever it is reachable from the CWD. license_tier: ORIGINAL

dependencies 3 imports · 0 importers

nx_swcompare_lib.nx nx_syscalls.nx nx_gate_verdict.nx nx_print_css_gate.nx

imports: nx_swcompare_lib.nxnx_syscalls.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_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 ↻ sys_mkdir gv_check_eq gv_check gv_puts sys_write ↻ gv_puts ↻ gv_num sys_mmap ↻ sys_write ↻ sys_munmap g_emit sys_unlinkat sys_openat_wr sc_print_css sc_brand bt_len sys_mmap ↻ bt_emit_root_buf bt_app sys_mmap ↻ bt_slice_eq bt_ident_safe bt_value_safe

structs

none

consts

12const G_DIR: *u8 = "/tmp/nx_print_css_gate/"
13const G_OUT: *u8 = "/tmp/nx_print_css_gate/print.css"
14const G_OUT2: *u8 = "/tmp/nx_print_css_gate/print2.css"
15const G_PLANT: *u8 = "/tmp/nx_print_css_gate/plant.css"
16const G_DIR_MODE: i64 = 493
17const G_FILE_MODE: i64 = 420
18const G_CH_BANG: i64 = 33
19const G_CH_HASH: i64 = 35
20const G_CH_LBRACE: i64 = 123
21const G_CH_RBRACE: i64 = 125
22const G_CH_NL: i64 = 10
23const G_CH_D0: i64 = 48
24const G_CH_D9: i64 = 57
25const G_LIVE_A: *u8 = "sites/nishifamily/compare/search/index.html"
26const G_LIVE_B: *u8 = "../sites/nishifamily/compare/search/index.html"

functions

28func g_len(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
30func g_find(buf: *u8, n: i64, needle: *u8) -> i64
42func g_count(buf: *u8, n: i64, needle: *u8) -> i64
called by 1: main calls 1: g_len
54func g_count_byte(buf: *u8, n: i64, b: i64) -> i64 { var c: i64 = 0; var i: i64 = 0; while i < n { if buf[i] == (b as u8) { c = c + 1 } i = i + 1 } return c }
called by 1: main
58func g_rule(buf: *u8, n: i64, sel: *u8, out: *i64) -> i64
called by 2: g_rule_hasg_sel_has calls 1: g_len
83func g_rule_has(buf: *u8, n: i64, sel: *u8, decl: *u8) -> i64
called by 1: main calls 3: sys_mmapg_ruleg_find
91func g_sel_has(buf: *u8, n: i64, sel: *u8, name: *u8) -> i64
called by 1: main calls 3: sys_mmapg_ruleg_find
97func g_write(path: *u8, s: *u8) -> i64 { sys_unlinkat(path); let fd: i64 = sys_openat_wr(path, G_FILE_MODE); if fd < 0 { return -1 } sys_write(fd, s, g_len(s)); sys_close(fd); return 0 }
98func g_emit(path: *u8) -> i64 { sys_unlinkat(path); let fd: i64 = sys_openat_wr(path, G_FILE_MODE); if fd < 0 { return -1 } sc_print_css(fd); sys_close(fd); return 0 }
99func g_same(a: *u8, an: i64, b: *u8, bn: i64) -> i64 { if an != bn { return 0 } var i: i64 = 0; while i < an { if a[i] != b[i] { return 0 } i = i + 1 } return 1 }
called by 1: main
101func g_num_after(buf: *u8, n: i64, key: *u8) -> i64
called by 1: main calls 2: g_findg_len
111func g_exists(path: *u8) -> i64 { let fd: i64 = sys_openat_rd(path); if fd < 0 { return 0 } sys_close(fd); return 1 }
called by 1: main calls 2: sys_openat_rdsys_close
113func main() -> i64