summaryrefslogtreecommitdiffstats
path: root/usr.bin/mandoc/man_html.c
diff options
context:
space:
mode:
authorschwarze <schwarze@openbsd.org>2017-06-08 12:54:40 +0000
committerschwarze <schwarze@openbsd.org>2017-06-08 12:54:40 +0000
commitecd22486800b060f9e6011718b0b9c5fb5734e2b (patch)
treeb00cfb44df0a5a82b78117efd7c8082e8aec6eea /usr.bin/mandoc/man_html.c
parentwrec.org is dead. Use working links instead. (diff)
downloadwireguard-openbsd-ecd22486800b060f9e6011718b0b9c5fb5734e2b.tar.xz
wireguard-openbsd-ecd22486800b060f9e6011718b0b9c5fb5734e2b.zip
make the internal a2roffsu() interface more powerful by returning
a pointer to the end of the parsed data, making it easier to parse subsequent bytes
Diffstat (limited to 'usr.bin/mandoc/man_html.c')
-rw-r--r--usr.bin/mandoc/man_html.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/usr.bin/mandoc/man_html.c b/usr.bin/mandoc/man_html.c
index 20fd4253102..f2b98b84592 100644
--- a/usr.bin/mandoc/man_html.c
+++ b/usr.bin/mandoc/man_html.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: man_html.c,v 1.95 2017/05/09 14:09:37 schwarze Exp $ */
+/* $OpenBSD: man_html.c,v 1.96 2017/06/08 12:54:40 schwarze Exp $ */
/*
* Copyright (c) 2008-2012, 2014 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2013, 2014, 2015, 2017 Ingo Schwarze <schwarze@openbsd.org>
@@ -356,13 +356,9 @@ fillmode(struct html *h, int want)
static int
a2width(const struct roff_node *n, struct roffsu *su)
{
-
if (n->type != ROFFT_TEXT)
return 0;
- if (a2roffsu(n->string, su, SCALE_EN))
- return 1;
-
- return 0;
+ return a2roffsu(n->string, su, SCALE_EN) != NULL;
}
static void