From ecd22486800b060f9e6011718b0b9c5fb5734e2b Mon Sep 17 00:00:00 2001 From: schwarze Date: Thu, 8 Jun 2017 12:54:40 +0000 Subject: 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 --- usr.bin/mandoc/man_html.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'usr.bin/mandoc/man_html.c') 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 * Copyright (c) 2013, 2014, 2015, 2017 Ingo Schwarze @@ -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 -- cgit v1.2.3-59-g8ed1b