code wiki / _hdl_build / nx_epub_nav.nx

nx_epub_nav.nx

buildroot/runtime/_hdl_build/nx_epub_nav.nx

9047 B201 linesdepth 0pulls 0 transitivereach 2 importersview sourcekind librarytopic epub
docsdependenciesstructsconstsfunctions

about

nx_epub_nav.nx -- Parses EPUB navigation documents into a flat, depth-tagged list of chapters for accurate table of contents rendering.

dependencies 0 imports · 2 importers

nx_epub_nav.nx nx_epub_book.nx nx_epub_toc_gate.nx

imports: none

imported by: nx_epub_book.nxnx_epub_toc_gate.nx

structs

none

consts

2const K_MAGIC_2048: i64 = 2048

functions

15func nav_slen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n }
18func nav_at(buf: *u8, i: i64, n: i64, s: *u8) -> i64
29func nav_find_from(buf: *u8, n: i64, start: i64, needle: *u8) -> i64
42func nav_is_anchor(buf: *u8, i: i64, n: i64) -> i64
called by 1: nav_parse_xhtml
55func nav_attr_in(buf: *u8, start: i64, limit: i64, attr: *u8, out: *u8, outcap: i64) -> i64
called by 2: nav_parse_xhtmlncx_parse calls 1: nav_slen
74func nav_copy_trim(buf: *u8, start: i64, end: i64, out: *u8, outcap: i64) -> i64
88func nav_store(depths: *i64, larena: *u8, loffs: *i64, harena: *u8, hoffs: *i64, aoff: *i64, cnt: i64, d: i64, label: *u8, href: *u8) -> i64
107func nav_parse_xhtml(buf: *u8, n: i64, depths: *i64, larena: *u8, loffs: *i64, harena: *u8, hoffs: *i64, cap: i64) -> i64
151func ncx_parse(buf: *u8, n: i64, depths: *i64, larena: *u8, loffs: *i64, harena: *u8, hoffs: *i64, cap: i64) -> i64