From b569fb3a78ad114031c38c25bfcbca862217ae64 Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Mon, 9 Jan 2017 01:37:03 +0000 Subject: Warnings and errors that occur during mdoc_validate() or during man_validate() have to affect the mandoc(1) EXIT STATUS. Many thanks to (illumos developer) for reporting this regression. --- read.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'read.c') diff --git a/read.c b/read.c index 54cc8530..d20a6098 100644 --- a/read.c +++ b/read.c @@ -1,4 +1,4 @@ -/* $Id: read.c,v 1.156 2017/01/08 00:11:24 schwarze Exp $ */ +/* $Id: read.c,v 1.157 2017/01/09 01:37:03 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons * Copyright (c) 2010-2017 Ingo Schwarze @@ -866,6 +866,13 @@ mparse_result(struct mparse *curp, struct roff_man **man, *man = curp->man; } +void +mparse_updaterc(struct mparse *curp, enum mandoclevel *rc) +{ + if (curp->file_status > *rc) + *rc = curp->file_status; +} + void mandoc_vmsg(enum mandocerr t, struct mparse *m, int ln, int pos, const char *fmt, ...) -- cgit v1.2.3-56-ge451