%% options copyright owner = Dirk Krause copyright year = 2013-2014 license = bsd %% header #ifdef __cplusplus extern "C" { #endif /** Process the contents. @param job Job structure, current node is set. @param p Previous node (if any). @param n Next node (if any). @return 1 on success, 0 on error. */ int hbcont_process(hb_job_t *job, hb_node_t *p, hb_node_t *n); /** Create contents line structure. @param il Input line to save. @param lineno Line number of input line. @param app Application structure for diagnostics, may be NULL. @return Pointer to new line structure on success, NULL on error. */ hb_line_t * hbcont_line_new(dkChar const *il, unsigned long lineno, dk3_app_t *app); /** Delete one contents line. @param lp Contents line to delete. */ void hbcont_line_delete(hb_line_t *lp); #ifdef __cplusplus } #endif %% module #include "dk3all.h" #include "htmlbook.h" $!trace-include /** Object to process a contents line. */ typedef struct { hb_job_t *job; /**< Job structure. */ hb_node_t *nptr; /**< Current node. */ unsigned long lineno; /**< Current line number. */ unsigned long nheader; /**< Next header number. */ unsigned maxheader; /**< Maximum header number found. */ } hb_contents_line_processor_t; /** Output keywords. */ static char const * const hbcont_c8_kw[] = { $!string-table # # 0 Newline # \n # # 1 Space # # # 2 3 H1 tags. #

\n # # 4 5 Position table # \n \n # # 8 9 Position table data # \n # # 10 Right arrow # → # # 11 Position table data with colspan #
# # 12 13 Header in variable depth # \n # # 14 15 Named anchors before headers # # # 16 Start of anchor name for header # hb_h # # 17 18 Page TOC table # \n # # 21 Page TOC space data # \n # # 22 23 Page TOC data field # \n # # 24 25 26 27 Link for page TOC entry # # # 28 29 30 Link division # # # 31 32 Table for links #
   
\n \n # # 35 36 37 Table data for number # \n  %lu  # # 38 Table data for URL #