diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2017-06-24 14:38:32 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2017-06-24 14:38:32 +0000 |
commit | 07569d42d40c11c0305c5b07d2c1bbb04047c52f (patch) | |
tree | 0ca3f05c4302f6bc52990f37471deafaec85364e /roff.c | |
parent | 913045bd69043c5a0ba155b88f2ef24c6bcae97f (diff) | |
download | mandoc-07569d42d40c11c0305c5b07d2c1bbb04047c52f.tar.gz |
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 'roff.c')
-rw-r--r-- | roff.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -819,14 +819,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; @@ -1138,7 +1138,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 */ @@ -1161,10 +1161,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 && |