summaryrefslogtreecommitdiffstats
path: root/usr.bin/mandoc/roff.c
diff options
context:
space:
mode:
authorschwarze <schwarze@openbsd.org>2017-06-24 14:38:27 +0000
committerschwarze <schwarze@openbsd.org>2017-06-24 14:38:27 +0000
commitf3476b07809a2097ff3cd2d357ae4d12f20c2c1d (patch)
treee69fdfe25b49db90b09b25644b1223b111a28405 /usr.bin/mandoc/roff.c
parentDelete .St -p1003.1-2013. (diff)
downloadwireguard-openbsd-f3476b07809a2097ff3cd2d357ae4d12f20c2c1d.tar.xz
wireguard-openbsd-f3476b07809a2097ff3cd2d357ae4d12f20c2c1d.zip
Split -Wstyle into -Wstyle and the even lower -Wbase, and add
-Wopenbsd and -Wnetbsd to check conventions for the base system of a specific operating system. Mark operating system specific messages with "(OpenBSD)" at the end. Please use just "-Tlint" to check base system manuals (defaulting to -Wall, which is now -Wbase), but prefer "-Tlint -Wstyle" for the manuals of portable software projects you maintain that are not part of OpenBSD base, to avoid bogus recommendations about base system conventions that do not apply. Issue originally reported by semarie@, solution using an idea from tedu@, discussed with jmc@ and jca@.
Diffstat (limited to 'usr.bin/mandoc/roff.c')
-rw-r--r--usr.bin/mandoc/roff.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/usr.bin/mandoc/roff.c b/usr.bin/mandoc/roff.c
index 87eb7af9c7f..414c43aedd4 100644
--- a/usr.bin/mandoc/roff.c
+++ b/usr.bin/mandoc/roff.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: roff.c,v 1.187 2017/06/18 17:35:40 schwarze Exp $ */
+/* $OpenBSD: roff.c,v 1.188 2017/06/24 14:38:28 schwarze Exp $ */
/*
* Copyright (c) 2008-2012, 2014 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010-2015, 2017 Ingo Schwarze <schwarze@openbsd.org>
@@ -817,14 +817,14 @@ roff_man_free(struct roff_man *man)
struct roff_man *
roff_man_alloc(struct roff *roff, struct mparse *parse,
- const char *defos, int quick)
+ const char *os_s, int quick)
{
struct roff_man *man;
man = mandoc_calloc(1, sizeof(*man));
man->parse = parse;
man->roff = roff;
- man->defos = defos;
+ man->os_s = os_s;
man->quick = quick;
roff_man_alloc1(man);
roff->man = man;
@@ -1136,7 +1136,7 @@ roff_res(struct roff *r, struct buf *buf, int ln, int pos)
size_t maxl; /* expected length of the escape name */
size_t naml; /* actual length of the escape name */
enum mandoc_esc esc; /* type of the escape sequence */
- enum mdoc_os os_e; /* kind of RCS id seen */
+ enum mandoc_os os_e; /* kind of RCS id seen */
int inaml; /* length returned from mandoc_escape() */
int expand_count; /* to avoid infinite loops */
int npos; /* position in numeric expression */
@@ -1159,10 +1159,10 @@ roff_res(struct roff *r, struct buf *buf, int ln, int pos)
/* Comment found, look for RCS id. */
if ((cp = strstr(stesc, "$" "OpenBSD")) != NULL) {
- os_e = MDOC_OS_OPENBSD;
+ os_e = MANDOC_OS_OPENBSD;
cp += 8;
} else if ((cp = strstr(stesc, "$" "NetBSD")) != NULL) {
- os_e = MDOC_OS_NETBSD;
+ os_e = MANDOC_OS_NETBSD;
cp += 7;
}
if (cp != NULL &&