From 1646ab1fa6b40399b2913086e23b635022a70349 Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Sat, 17 Jun 2017 23:07:00 +0000 Subject: style message about duplicate RCS ids; inspired by mdoclint --- roff.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'roff.c') 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 * Copyright (c) 2010-2015, 2017 Ingo Schwarze @@ -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. */ -- cgit v1.2.3