diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2017-06-08 12:54:58 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2017-06-08 12:54:58 +0000 |
commit | 789580a2a2366243d622766fdadd094931ca6596 (patch) | |
tree | 60a78614bcfb83b55ebd45464a5bc77e4c61c98c /man_html.c | |
parent | 76a6887f123b221e7a8851c1b0d0008119492613 (diff) | |
download | mandoc-789580a2a2366243d622766fdadd094931ca6596.tar.gz mandoc-789580a2a2366243d622766fdadd094931ca6596.tar.zst mandoc-789580a2a2366243d622766fdadd094931ca6596.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 'man_html.c')
-rw-r--r-- | man_html.c | 8 |
1 files changed, 2 insertions, 6 deletions
@@ -1,4 +1,4 @@ -/* $Id: man_html.c,v 1.142 2017/05/09 14:10:01 schwarze Exp $ */ +/* $Id: man_html.c,v 1.143 2017/06/08 12:54:58 schwarze Exp $ */ /* * Copyright (c) 2008-2012, 2014 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2013, 2014, 2015, 2017 Ingo Schwarze <schwarze@openbsd.org> @@ -358,13 +358,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 |