code wiki / _hdl_build / nx_print_css_gate.nx
nx_print_css_gate.nx
buildroot/runtime/_hdl_build/nx_print_css_gate.nx
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
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
structs
| none |
consts
| 12 | const G_DIR: *u8 = "/tmp/nx_print_css_gate/" |
| 13 | const G_OUT: *u8 = "/tmp/nx_print_css_gate/print.css" |
| 14 | const G_OUT2: *u8 = "/tmp/nx_print_css_gate/print2.css" |
| 15 | const G_PLANT: *u8 = "/tmp/nx_print_css_gate/plant.css" |
| 16 | const G_DIR_MODE: i64 = 493 |
| 17 | const G_FILE_MODE: i64 = 420 |
| 18 | const G_CH_BANG: i64 = 33 |
| 19 | const G_CH_HASH: i64 = 35 |
| 20 | const G_CH_LBRACE: i64 = 123 |
| 21 | const G_CH_RBRACE: i64 = 125 |
| 22 | const G_CH_NL: i64 = 10 |
| 23 | const G_CH_D0: i64 = 48 |
| 24 | const G_CH_D9: i64 = 57 |
| 25 | const G_LIVE_A: *u8 = "sites/nishifamily/compare/search/index.html" |
| 26 | const G_LIVE_B: *u8 = "../sites/nishifamily/compare/search/index.html" |
functions
| 28 | func g_len(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n } |
| 30 | func g_find(buf: *u8, n: i64, needle: *u8) -> i64 |
| 42 | func g_count(buf: *u8, n: i64, needle: *u8) -> i64 |
| 54 | func 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 |
| 58 | func g_rule(buf: *u8, n: i64, sel: *u8, out: *i64) -> i64 |
| 83 | func g_rule_has(buf: *u8, n: i64, sel: *u8, decl: *u8) -> i64 |
| 91 | func g_sel_has(buf: *u8, n: i64, sel: *u8, name: *u8) -> i64 |
| 97 | func 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 } |
| 98 | func 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 } |
| 99 | func 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 |
| 101 | func g_num_after(buf: *u8, n: i64, key: *u8) -> i64 |
| 111 | func g_exists(path: *u8) -> i64 { let fd: i64 = sys_openat_rd(path); if fd < 0 { return 0 } sys_close(fd); return 1 } |
| 113 | func main() -> i64 |