code wiki / _hdl_build / nx_galx_tags.nx

nx_galx_tags.nx

buildroot/runtime/_hdl_build/nx_galx_tags.nx

14969 B321 linesdepth 2pulls 2 transitivereach 2 importersview sourcekind librarytopic galx
docsdependenciesstructsconstsfunctions

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

nx_syscalls.nx nx_galx_tags.nx nx_gallery_serve.nx nx_galx_tags_gate.nx

imports: nx_syscalls.nx

imported by: nx_gallery_serve.nxnx_galx_tags_gate.nx

structs

none

consts

8const K_MAGIC_16384: i64 = 16384
9const K_MAGIC_65536: i64 = 65536
10const K_MAGIC_4096: i64 = 4096
11const K_MAGIC_1048576: i64 = 1048576
12const K_MAGIC_2097152: i64 = 2097152

functions

15func tg_pint(buf: *u8, s: i64, e: i64) -> i64
21func tg_eqn(a: *u8, ao: i64, alen: i64, b: *u8, bo: i64, blen: i64) -> i64
27func tg_emit_u(out: *u8, o: i64, v: i64) -> i64
called by 2: tg_ids_for_tagtg_op_line calls 1: sys_mmap
36func tg_tabs(log: *u8, ls: i64, le: i64, t1p: *i64, t2p: *i64) -> i64
44func tg_tags_for_id(log: *u8, sz: i64, id: i64, out: *u8) -> i64
called by 1: main calls 4: sys_mmaptg_tabstg_pinttg_eqn
89func tg_ids_for_tag(log: *u8, sz: i64, tag: *u8, taglen: i64, out: *u8) -> i64
128func tg_all_tags(log: *u8, sz: i64, out: *u8) -> i64
169func tg_op_line(buf: *u8, id: i64, tag: *u8, taglen: i64, v: i64) -> i64
called by 1: main calls 1: tg_emit_u
181func tg_op_line_s(buf: *u8, idp: *u8, idlen: i64, tag: *u8, taglen: i64, v: i64) -> i64
called by 2: gs_tagmain
192func tg_tags_for_id_s(log: *u8, sz: i64, idp: *u8, idlen: i64, out: *u8) -> i64
236func tg_ids_for_tag_s(log: *u8, sz: i64, tag: *u8, taglen: i64, out: *u8) -> i64
282func tg_all_tags_s(log: *u8, sz: i64, out: *u8) -> i64