static htmlimg_t *mkImg(char **atts) { htmlimg_t *img = NEW(htmlimg_t); doAttrs(img, img_items, sizeof(img_items) / ISIZE, atts, "<IMG>"); return img; }
static htmlfont_t *mkFont(char **atts) { htmlfont_t *font = NEW(htmlfont_t); font->size = -1.0; /* unassigned */ doAttrs(font, font_items, sizeof(font_items) / ISIZE, atts, "<FONT>"); return font; }
static htmltbl_t *mkTbl(char **atts) { htmltbl_t *tbl = NEW(htmltbl_t); tbl->rc = -1; /* flag that table is a raw, parsed table */ tbl->cb = -1; /* unset cell border attribute */ doAttrs(tbl, tbl_items, sizeof(tbl_items) / ISIZE, atts, "<TABLE>"); return tbl; }
static htmlcell_t *mkCell(char **atts) { htmlcell_t *cell = NEW(htmlcell_t); cell->cspan = 1; cell->rspan = 1; doAttrs(cell, cell_items, sizeof(cell_items) / ISIZE, atts, "<TD>"); return cell; }
static textfont_t *mkFont(GVC_t *gvc, char **atts, int flags, int ul) { textfont_t tf = {NULL,NULL,NULL,0.0,0,0}; tf.size = -1.0; /* unassigned */ tf.flags = flags; if (atts) doAttrs(&tf, font_items, sizeof(font_items) / ISIZE, atts, "<FONT>"); return dtinsert(gvc->textfont_dt, &tf); }
static void mkBR(char **atts) { htmllval.i = UNSET_ALIGN; doAttrs(&htmllval.i, br_items, sizeof(br_items) / ISIZE, atts, "<BR>"); }