aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/html.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2017-01-29 14:02:41 +0000
committerIngo Schwarze <schwarze@openbsd.org>2017-01-29 14:02:41 +0000
commit6c8b3ba49c51760959b4a79eeab51af6d3c58565 (patch)
treedeb3073e4c3f988bd8db654066e65c4b75acc011 /html.c
parent5a526843b7a81102e56a684b368893853ed01ee7 (diff)
downloadmandoc-6c8b3ba49c51760959b4a79eeab51af6d3c58565.tar.gz
mandoc-6c8b3ba49c51760959b4a79eeab51af6d3c58565.tar.zst
mandoc-6c8b3ba49c51760959b4a79eeab51af6d3c58565.zip
eliminate one useless struct and one level of indirection;
no functional change
Diffstat (limited to 'html.c')
-rw-r--r--html.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/html.c b/html.c
index c3ab3b47..8f1e3df4 100644
--- a/html.c
+++ b/html.c
@@ -1,4 +1,4 @@
-/* $Id: html.c,v 1.203 2017/01/28 22:36:38 schwarze Exp $ */
+/* $Id: html.c,v 1.204 2017/01/29 14:02:41 schwarze Exp $ */
/*
* Copyright (c) 2008-2011, 2014 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2011-2015, 2017 Ingo Schwarze <schwarze@openbsd.org>
@@ -132,7 +132,7 @@ html_alloc(const struct manoutput *outopts)
h = mandoc_calloc(1, sizeof(struct html));
- h->tags.head = NULL;
+ h->tag = NULL;
h->style = outopts->style;
h->base_man = outopts->man;
h->base_includes = outopts->includes;
@@ -150,8 +150,8 @@ html_free(void *p)
h = (struct html *)p;
- while ((tag = h->tags.head) != NULL) {
- h->tags.head = tag->next;
+ while ((tag = h->tag) != NULL) {
+ h->tag = tag->next;
free(tag);
}
@@ -455,13 +455,13 @@ print_otag(struct html *h, enum htmltag tag, const char *fmt, ...)
tflags = htmltags[tag].flags;
- /* Push this tags onto the stack of open scopes. */
+ /* Push this tag onto the stack of open scopes. */
if ((tflags & HTML_NOSTACK) == 0) {
t = mandoc_malloc(sizeof(struct tag));
t->tag = tag;
- t->next = h->tags.head;
- h->tags.head = t;
+ t->next = h->tag;
+ h->tag = t;
} else
t = NULL;
@@ -699,7 +699,7 @@ print_ctag(struct html *h, struct tag *tag)
if (tflags & HTML_NLAFTER)
print_endline(h);
- h->tags.head = tag->next;
+ h->tag = tag->next;
free(tag);
}
@@ -760,7 +760,7 @@ print_tagq(struct html *h, const struct tag *until)
{
struct tag *tag;
- while ((tag = h->tags.head) != NULL) {
+ while ((tag = h->tag) != NULL) {
print_ctag(h, tag);
if (until && tag == until)
return;
@@ -772,7 +772,7 @@ print_stagq(struct html *h, const struct tag *suntil)
{
struct tag *tag;
- while ((tag = h->tags.head) != NULL) {
+ while ((tag = h->tag) != NULL) {
if (suntil && tag == suntil)
return;
print_ctag(h, tag);