code wiki / (root) / nx_gfxpapers_extract.nx

nx_gfxpapers_extract.nx

buildroot/runtime/nx_gfxpapers_extract.nx

14427 B290 linesdepth 3pulls 3 transitivereach 0 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

about

nx_gfxpapers_extract.nx -- TURN THE MIRRORED GRAPHICS LISTINGS INTO A CITABLE PAPER INDEX. The library mirror (nx_gfxpapers_ingest) stores BYTES, which is what makes the corpus non-rottable but does not yet make it usable: /compare needs to cite a specific paper, not a 360 KB page. This organ reads the mirror OFFLINE -- no network, no re-fetch, runnable as many times as it takes to get the parse right, which is precisely why the ingest deliberately stored bytes and deferred extraction rather than doing a brittle scrape on the wire where every correction costs another crawl of someone else's server. THE ANCHOR IS `<dt><B>` ... `</B>`, AND IT WAS CHECKED FOR VARIANCE BEFORE IT WAS TRUSTED. Verified by reading real mirrored bytes at both ends of the corpus -- i3d2005Papers.htm (2005, .htm) and sig2025.html (2025, .html) -- so it is not a pattern fitted to the one page that motivated it. Both cases are counted and reported SEPARATELY rather than merged, because a case split that is silently accepted would halve a corpus without ever showing up as an error. ⚠HTML COMMENTS ARE SKIPPED, AND THAT IS NOT OPTIONAL. Every one of these pages carries a commented-out TEMPLATE entry near the top with the same tag shape as a real one. A scanner that does not skip comments measures the documentation, not the code -- the estate has paid for this law twice, and this session paid for it a third time when a contract symbol written in a COMMENT flipped a published compare row to landed with no capability behind it. ⚠TITLES ARE STRIPPED OF TAB AND NEWLINE. The row format is tab-delimited, so a title containing the delimiter would silently split into phantom columns -- a producer must never emit the byte its consumer uses as a separator, which is the same producer/consumer wire defect that has bitten the status planes. argv: <library-dir> <prefix> <out-index> license_tier: ORIGINAL No hw writes (Rule 26).

dependencies 2 imports · 0 importers

nx_syscalls.nx nx_itoa_lib.nx nx_gfxpapers_extract.nx

imports: nx_syscalls.nxnx_itoa_lib.nx

imported by: nobody (leaf or entry point)

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

main gx_p sys_write sys_openat_rd 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_getdents64 gx_starts gx_streq gx_len sys_read_file sys_openat_rd ↻ sys_lseek sys_mmap ↻ sys_read sys_munmap sys_close gx_scan gx_match_at gx_len ↻ gx_len ↻ sys_munmap ↻ sys_close ↻ sys_openat_wr sys_write ↻ gx_n nxi_out

structs

none

consts

30const GX_DIRBUF: i64 = 65536
31const GX_NAMELEN: i64 = 256
32const GX_PATHLEN: i64 = 512
33const GX_OUTBUF: i64 = 1048576
34const GX_TITLEMAX: i64 = 512
35const GX_DIRENT_RECLEN_OFF: i64 = 16
36const GX_DIRENT_NAME_OFF: i64 = 19
37const GX_TAB: i64 = 9
38const GX_NL: i64 = 10
39const GX_CR: i64 = 13
40const GX_SP: i64 = 32
41const GX_DOT: i64 = 46
42const GX_LT: i64 = 60
43const GX_GT: i64 = 62

functions

45func gx_p(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 1: main calls 1: sys_write
46func gx_n(v: i64) -> i64 { nxi_out(v); return 0 }
called by 1: main calls 1: nxi_out
47func gx_len(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n }
49func gx_match_at(buf: *u8, n: i64, at: i64, needle: *u8) -> i64
called by 1: gx_scan calls 1: gx_len
60func gx_streq(a: *u8, b: *u8) -> i64
called by 1: main
70func gx_starts(name: *u8, pre: *u8) -> i64
called by 1: main
81func gx_scan(buf: *u8, n: i64, label: *u8, out: *u8, outn: i64, outcap: i64, ctr: *i64) -> i64
called by 1: main calls 2: gx_match_atgx_len
174func main(argc: i64, argv: *i64) -> i64