code wiki / _hdl_build / nx_galx_tags.nx
nx_galx_tags.nx
buildroot/runtime/_hdl_build/nx_galx_tags.nx
about
nx_galx_tags.nx -- sovereign tag store for the gallery (media-manager migration: tags were missing).
Tags live in an append-only log knowledge/status/galx_tags.log, one op per line:
<id>\t<tag>\t<v>\n (v=1 add, v=0 remove) -- LAST-WINS per (id,tag), mirrors galx_hidden.log.
Reading replays the log to the CURRENT tag set. Append-only = rule-13 additive (history preserved). no main.
Tags are assumed pre-sanitised by the POST handler (alnum + space/dash, no quotes/tabs/newlines), so the
JSON emitters don't escape. license_tier: ORIGINAL
dependencies 1 imports · 2 importers
imports: nx_syscalls.nx
imported by: nx_gallery_serve.nxnx_galx_tags_gate.nx
structs
| none |
consts
| 8 | const K_MAGIC_16384: i64 = 16384 |
| 9 | const K_MAGIC_65536: i64 = 65536 |
| 10 | const K_MAGIC_4096: i64 = 4096 |
| 11 | const K_MAGIC_1048576: i64 = 1048576 |
| 12 | const K_MAGIC_2097152: i64 = 2097152 |
functions
| 15 | func tg_pint(buf: *u8, s: i64, e: i64) -> i64 |
| 21 | func tg_eqn(a: *u8, ao: i64, alen: i64, b: *u8, bo: i64, blen: i64) -> i64 |
| 27 | func tg_emit_u(out: *u8, o: i64, v: i64) -> i64 |
| 36 | func tg_tabs(log: *u8, ls: i64, le: i64, t1p: *i64, t2p: *i64) -> i64 |
| 44 | func tg_tags_for_id(log: *u8, sz: i64, id: i64, out: *u8) -> i64 |
| 89 | func tg_ids_for_tag(log: *u8, sz: i64, tag: *u8, taglen: i64, out: *u8) -> i64 |
| 128 | func tg_all_tags(log: *u8, sz: i64, out: *u8) -> i64 |
| 169 | func tg_op_line(buf: *u8, id: i64, tag: *u8, taglen: i64, v: i64) -> i64 |
| 181 | func tg_op_line_s(buf: *u8, idp: *u8, idlen: i64, tag: *u8, taglen: i64, v: i64) -> i64 |
| 192 | func tg_tags_for_id_s(log: *u8, sz: i64, idp: *u8, idlen: i64, out: *u8) -> i64 |
| 236 | func tg_ids_for_tag_s(log: *u8, sz: i64, tag: *u8, taglen: i64, out: *u8) -> i64 |
| 282 | func tg_all_tags_s(log: *u8, sz: i64, out: *u8) -> i64 |