diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2015-01-28 15:03:45 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2015-01-28 15:03:45 +0000 |
commit | 7793230177d864fb80c0c572a2b896f3ecb7df10 (patch) | |
tree | 9200fdac5fa9fae03f349e62032d6041b10d54d3 /tbl_opts.c | |
parent | c49d930f6dcda366d67ac4b3bad9cc05ac3bc954 (diff) | |
download | mandoc-7793230177d864fb80c0c572a2b896f3ecb7df10.tar.gz mandoc-7793230177d864fb80c0c572a2b896f3ecb7df10.tar.zst mandoc-7793230177d864fb80c0c572a2b896f3ecb7df10.zip |
For now, it can't be helped that mandoc tbl(7) ignores high-level macros,
but stop throwing away their arguments. This fixes information loss in a
handful of Xenocara manuals, at the price of a small amount of formatting
noise creeping through.
Diffstat (limited to 'tbl_opts.c')
-rw-r--r-- | tbl_opts.c | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -1,4 +1,4 @@ -/* $Id: tbl_opts.c,v 1.18 2015/01/26 13:03:48 schwarze Exp $ */ +/* $Id: tbl_opts.c,v 1.19 2015/01/28 15:03:45 schwarze Exp $ */ /* * Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2015 Ingo Schwarze <schwarze@openbsd.org> @@ -120,17 +120,19 @@ arg(struct tbl_node *tbl, int ln, const char *p, int *pos, int key) * and some options are followed by arguments. */ void -tbl_option(struct tbl_node *tbl, int ln, const char *p) +tbl_option(struct tbl_node *tbl, int ln, const char *p, int *offs) { int i, pos, len; - pos = 0; + pos = *offs; for (;;) { while (p[pos] == ' ' || p[pos] == '\t' || p[pos] == ',') pos++; - if (p[pos] == ';') + if (p[pos] == ';') { + *offs = pos + 1; return; + } /* Parse one option name. */ |