19%define api.prefix {html}
43 for (
size_t i = 0; i <
item.nitems; i++) {
61 struct XML_ParserStruct *parser;
100 for (
size_t c = 0; c <
LIST_SIZE(&rp->rp); ++c) {
160 if (c !=
' ')
return true;
196%type <cell>
cell cells
198%type <tbl>
table fonttable
357 .font = *
LIST_BACK(&html_state->fontstack)};
372 for (
size_t i = 0; i <
LIST_SIZE(&html_state->fitemList); ++i) {
403 for (
size_t i = 0; i <
LIST_SIZE(&html_state->fspanList); ++i) {
452 if (html_state->
lbl) {
477 if ((f.
size < 0.0) && (curfont->
size >= 0.0))
static void agxbfree(agxbuf *xb)
free any malloced resources
static WUR char * agxbuse(agxbuf *xb)
static char * agxbdisown(agxbuf *xb)
Memory allocation wrappers that exit on failure.
static char * gv_strdup(const char *original)
static void * gv_calloc(size_t nmemb, size_t size)
static void * gv_alloc(size_t size)
static void cleanup(void)
static int cnt(Dict_t *d, Dtlink_t **set)
int clearHTMLlexer(htmlscan_t *scanner)
int initHTMLlexer(htmlscan_t *scanner, char *src, agxbuf *xb, htmlenv_t *env)
void htmlerror(htmlscan_t *scanner, const char *msg)
static void cleanTbl(htmltbl_t *tp)
Clean up table if error in parsing.
static void cleanCell(htmlcell_t *cp)
Clean up cell if error in parsing.
static htmllabel_t * mkLabel(void *obj, label_type_t kind)
Create label, given body and type.
static bool nonSpace(const char *s)
Return 1 if s contains a non-space character.
int htmlparse(htmlscan_t *scanner)
static void free_ti(textspan_t item)
static void free_hi(htextspan_t item)
static void appendFItemList(htmlparserstate_t *html_state, agxbuf *ag)
font text n_font italic text n_italic underline text n_underline overline text n_overline bold text n_bold sup text n_sup sub text n_sub strike text n_strike
static void popFont(htmlparserstate_t *html_state)
static void addRow(htmlparserstate_t *html_state)
underline table n_underline
static void appendFLineList(htmlparserstate_t *html_state, int v)
htmllabel_t * parseHTML(char *txt, int *warn, htmlenv_t *env)
static row_t * lastRow(htmlparserstate_t *html_state)
overline table n_overline
rows T_end_table opt_space
static htmltxt_t * mkText(htmlparserstate_t *html_state)
static void setCell(htmlparserstate_t *html_state, htmlcell_t *cp, void *obj, label_type_t kind)
textitem scanner parser str
static void pushFont(htmlparserstate_t *html_state, textfont_t *fp)
void free_html_text(htmltxt_t *t)
void free_html_label(htmllabel_t *lp, int root)
void free_html_data(htmldata_t *dp)
static void free_ritem(row_t *p)
Free row. This closes and frees row’s list, then the item itself is freed.
type-generic dynamically expanding list
#define LIST_AT(list, index)
#define LIST_APPEND(list, item)
#define LIST_POP_BACK(list)
#define LIST_IS_EMPTY(list)
#define LIST_PUSH_BACK(list, item)
#define LIST_GET(list, index)
static int table[NTYPES][NTYPES]
result of partitioning available space, part of maze
bool vruled
vertically ruled?
bool hruled
horizontally ruled?
bool hrule
horizontal rule
struct htmltbl_t::@78::@80 p
a non-owning string reference
Non-owning string references.
textspan_t, textfont_t, PostscriptAlias
static tok_t tok(const char *input, const char *separators)
begin tokenization of a new string