diff options
author | Michal Nowak <mnowak@startmail.com> | 2019-05-30 07:50:30 +0200 |
---|---|---|
committer | Dan McDonald <danmcd@joyent.com> | 2019-06-21 14:59:14 -0400 |
commit | cec8643b41ebefad6c677010fc784dc4bb0550f3 (patch) | |
tree | c4eca564abb29cbe5a704a1a1b182a6d0cb526fc /usr/src/cmd/mandoc/tbl_opts.c | |
parent | 07188943efdbeedd24142a14db7384af1478ba54 (diff) | |
download | illumos-joyent-cec8643b41ebefad6c677010fc784dc4bb0550f3.tar.gz |
11190 Update mandoc to 1.14.5
Reviewed by: Robert Mustacchi <rm@joyent.com>
Reviewed by: Gergő Doma <domag02@gmail.com>
Approved by: Dan McDonald <danmcd@joyent.com>
Diffstat (limited to 'usr/src/cmd/mandoc/tbl_opts.c')
-rw-r--r-- | usr/src/cmd/mandoc/tbl_opts.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/usr/src/cmd/mandoc/tbl_opts.c b/usr/src/cmd/mandoc/tbl_opts.c index f2f5942ae6..e3a8373702 100644 --- a/usr/src/cmd/mandoc/tbl_opts.c +++ b/usr/src/cmd/mandoc/tbl_opts.c @@ -1,4 +1,4 @@ -/* $Id: tbl_opts.c,v 1.21 2015/09/26 00:54:04 schwarze Exp $ */ +/* $Id: tbl_opts.c,v 1.24 2018/12/14 05:18:03 schwarze Exp $ */ /* * Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2015 Ingo Schwarze <schwarze@openbsd.org> @@ -25,8 +25,9 @@ #include <string.h> #include "mandoc.h" +#include "tbl.h" #include "libmandoc.h" -#include "libroff.h" +#include "tbl_int.h" #define KEY_DPOINT 0 #define KEY_DELIM 1 @@ -80,7 +81,7 @@ arg(struct tbl_node *tbl, int ln, const char *p, int *pos, int key) switch (key) { case KEY_DELIM: - mandoc_vmsg(MANDOCERR_TBLOPT_EQN, tbl->parse, + mandoc_msg(MANDOCERR_TBLOPT_EQN, ln, *pos, "%.*s", len, p + *pos); want = 2; break; @@ -102,12 +103,11 @@ arg(struct tbl_node *tbl, int ln, const char *p, int *pos, int key) } if (len == 0) - mandoc_msg(MANDOCERR_TBLOPT_NOARG, - tbl->parse, ln, *pos, keys[key].name); + mandoc_msg(MANDOCERR_TBLOPT_NOARG, ln, *pos, + "%s", keys[key].name); else if (want && len != want) - mandoc_vmsg(MANDOCERR_TBLOPT_ARGSZ, - tbl->parse, ln, *pos, "%s want %d have %d", - keys[key].name, want, len); + mandoc_msg(MANDOCERR_TBLOPT_ARGSZ, ln, *pos, + "%s want %d have %d", keys[key].name, want, len); *pos += len; if (p[*pos] == ')') @@ -141,8 +141,8 @@ tbl_option(struct tbl_node *tbl, int ln, const char *p, int *offs) len++; if (len == 0) { - mandoc_vmsg(MANDOCERR_TBLOPT_ALPHA, - tbl->parse, ln, pos, "%c", p[pos]); + mandoc_msg(MANDOCERR_TBLOPT_ALPHA, + ln, pos, "%c", p[pos]); pos++; continue; } @@ -156,7 +156,7 @@ tbl_option(struct tbl_node *tbl, int ln, const char *p, int *offs) i++; if (i == KEY_MAXKEYS) { - mandoc_vmsg(MANDOCERR_TBLOPT_BAD, tbl->parse, + mandoc_msg(MANDOCERR_TBLOPT_BAD, ln, pos, "%.*s", len, p + pos); pos += len; continue; |