version 1.252, 2019/01/18 14:36:21 |
version 1.254, 2019/03/03 13:02:11 |
Line 63 static const struct htmldata htmltags[TAG_MAX] = { |
|
Line 63 static const struct htmldata htmltags[TAG_MAX] = { |
|
{"title", HTML_NLAROUND}, |
{"title", HTML_NLAROUND}, |
{"div", HTML_NLAROUND}, |
{"div", HTML_NLAROUND}, |
{"div", 0}, |
{"div", 0}, |
|
{"section", HTML_NLALL}, |
{"h1", HTML_NLAROUND}, |
{"h1", HTML_NLAROUND}, |
{"h2", HTML_NLAROUND}, |
{"h2", HTML_NLAROUND}, |
{"span", 0}, |
{"span", 0}, |
Line 109 static const struct htmldata htmltags[TAG_MAX] = { |
|
Line 110 static const struct htmldata htmltags[TAG_MAX] = { |
|
/* Avoid duplicate HTML id= attributes. */ |
/* Avoid duplicate HTML id= attributes. */ |
static struct ohash id_unique; |
static struct ohash id_unique; |
|
|
|
static void html_reset_internal(struct html *); |
static void print_byte(struct html *, char); |
static void print_byte(struct html *, char); |
static void print_endword(struct html *); |
static void print_endword(struct html *); |
static void print_indent(struct html *); |
static void print_indent(struct html *); |
Line 144 html_alloc(const struct manoutput *outopts) |
|
Line 146 html_alloc(const struct manoutput *outopts) |
|
return h; |
return h; |
} |
} |
|
|
void |
static void |
html_free(void *p) |
html_reset_internal(struct html *h) |
{ |
{ |
struct tag *tag; |
struct tag *tag; |
struct html *h; |
|
char *cp; |
char *cp; |
unsigned int slot; |
unsigned int slot; |
|
|
h = (struct html *)p; |
|
while ((tag = h->tag) != NULL) { |
while ((tag = h->tag) != NULL) { |
h->tag = tag->next; |
h->tag = tag->next; |
free(tag); |
free(tag); |
} |
} |
free(h); |
|
|
|
cp = ohash_first(&id_unique, &slot); |
cp = ohash_first(&id_unique, &slot); |
while (cp != NULL) { |
while (cp != NULL) { |
free(cp); |
free(cp); |
cp = ohash_next(&id_unique, &slot); |
cp = ohash_next(&id_unique, &slot); |
} |
} |
ohash_delete(&id_unique); |
ohash_delete(&id_unique); |
|
} |
|
|
|
void |
|
html_reset(void *p) |
|
{ |
|
html_reset_internal(p); |
|
mandoc_ohash_init(&id_unique, 4, 0); |
|
} |
|
|
|
void |
|
html_free(void *p) |
|
{ |
|
html_reset_internal(p); |
|
free(p); |
} |
} |
|
|
void |
void |