aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/roff.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2017-06-17 23:07:00 +0000
committerIngo Schwarze <schwarze@openbsd.org>2017-06-17 23:07:00 +0000
commit1646ab1fa6b40399b2913086e23b635022a70349 (patch)
treeca4d97aa402f8ff1cc8c666301d74e396ba536ed /roff.c
parent332a2176094538e094fed8f1e5e251feb6b666e9 (diff)
downloadmandoc-1646ab1fa6b40399b2913086e23b635022a70349.tar.gz
mandoc-1646ab1fa6b40399b2913086e23b635022a70349.tar.zst
mandoc-1646ab1fa6b40399b2913086e23b635022a70349.zip
style message about duplicate RCS ids; inspired by mdoclint
Diffstat (limited to 'roff.c')
-rw-r--r--roff.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/roff.c b/roff.c
index ce481526..abb1ff5f 100644
--- a/roff.c
+++ b/roff.c
@@ -1,4 +1,4 @@
-/* $Id: roff.c,v 1.313 2017/06/17 22:43:14 schwarze Exp $ */
+/* $Id: roff.c,v 1.314 2017/06/17 23:07:00 schwarze Exp $ */
/*
* Copyright (c) 2008-2012, 2014 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010-2015, 2017 Ingo Schwarze <schwarze@openbsd.org>
@@ -1196,8 +1196,12 @@ roff_res(struct roff *r, struct buf *buf, int ln, int pos)
}
if (cp != NULL &&
isalnum((unsigned char)*cp) == 0 &&
- strchr(cp, '$') != NULL)
+ strchr(cp, '$') != NULL) {
+ if (r->man->meta.rcsids & (1 << os_e))
+ mandoc_msg(MANDOCERR_RCS_REP, r->parse,
+ ln, stesc + 1 - buf->buf, stesc + 1);
r->man->meta.rcsids |= 1 << os_e;
+ }
/* Handle trailing whitespace. */