diff options
-rw-r--r-- | usr.bin/mandoc/main.c | 5 | ||||
-rw-r--r-- | usr.bin/mandoc/mandoc_msg.c | 4 |
2 files changed, 5 insertions, 4 deletions
diff --git a/usr.bin/mandoc/main.c b/usr.bin/mandoc/main.c index 9870ad106f1..187496aaf84 100644 --- a/usr.bin/mandoc/main.c +++ b/usr.bin/mandoc/main.c @@ -1,7 +1,7 @@ -/* $OpenBSD: main.c,v 1.219 2019/01/01 08:18:06 schwarze Exp $ */ +/* $OpenBSD: main.c,v 1.220 2019/01/10 06:27:23 schwarze Exp $ */ /* * Copyright (c) 2008-2012 Kristaps Dzonsons <kristaps@bsd.lv> - * Copyright (c) 2010-2012, 2014-2018 Ingo Schwarze <schwarze@openbsd.org> + * Copyright (c) 2010-2012, 2014-2019 Ingo Schwarze <schwarze@openbsd.org> * Copyright (c) 2010 Joerg Sonnenberger <joerg@netbsd.org> * * Permission to use, copy, modify, and distribute this software for any @@ -131,6 +131,7 @@ main(int argc, char *argv[]) pid_t pager_pid, tc_pgid, man_pgid, pid; progname = getprogname(); + mandoc_msg_setoutfile(stderr); if (strncmp(progname, "mandocdb", 8) == 0 || strncmp(progname, "makewhatis", 10) == 0) return mandocdb(argc, argv); diff --git a/usr.bin/mandoc/mandoc_msg.c b/usr.bin/mandoc/mandoc_msg.c index a21964be228..9d229ac58a6 100644 --- a/usr.bin/mandoc/mandoc_msg.c +++ b/usr.bin/mandoc/mandoc_msg.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mandoc_msg.c,v 1.3 2018/12/15 19:30:19 schwarze Exp $ */ +/* $OpenBSD: mandoc_msg.c,v 1.4 2019/01/10 06:27:23 schwarze Exp $ */ /* * Copyright (c) 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2014,2015,2016,2017,2018 Ingo Schwarze <schwarze@openbsd.org> @@ -240,7 +240,7 @@ static const char *const type_message[MANDOCERR_MAX] = { "ignoring macro in table", }; -static FILE *fileptr = stderr; +static FILE *fileptr = NULL; static const char *filename = NULL; static enum mandocerr min_type = MANDOCERR_MAX; static enum mandoclevel rc = MANDOCLEVEL_OK; |