=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/mandoc/cgi.c,v retrieving revision 1.41 retrieving revision 1.42 diff -c -r1.41 -r1.42 *** src/usr.bin/mandoc/cgi.c 2014/11/26 00:57:32 1.41 --- src/usr.bin/mandoc/cgi.c 2015/01/15 04:26:06 1.42 *************** *** 1,4 **** ! /* $OpenBSD: cgi.c,v 1.41 2014/11/26 00:57:32 schwarze Exp $ */ /* * Copyright (c) 2011, 2012 Kristaps Dzonsons * Copyright (c) 2014 Ingo Schwarze --- 1,4 ---- ! /* $OpenBSD: cgi.c,v 1.42 2015/01/15 04:26:06 schwarze Exp $ */ /* * Copyright (c) 2011, 2012 Kristaps Dzonsons * Copyright (c) 2014 Ingo Schwarze *************** *** 820,826 **** struct man *man; void *vp; char *opts; - enum mandoclevel rc; int fd; int usepath; --- 820,825 ---- *************** *** 830,846 **** } mchars = mchars_alloc(); ! mp = mparse_alloc(MPARSE_SO, MANDOCLEVEL_FATAL, NULL, mchars, req->q.manpath); ! rc = mparse_readfd(mp, fd, file); close(fd); - - if (rc >= MANDOCLEVEL_FATAL) { - fprintf(stderr, "fatal mandoc error: %s/%s\n", - req->q.manpath, file); - pg_error_internal(); - return; - } usepath = strcmp(req->q.manpath, req->p[0]); mandoc_asprintf(&opts, --- 829,838 ---- } mchars = mchars_alloc(); ! mp = mparse_alloc(MPARSE_SO, MANDOCLEVEL_BADARG, NULL, mchars, req->q.manpath); ! mparse_readfd(mp, fd, file); close(fd); usepath = strcmp(req->q.manpath, req->p[0]); mandoc_asprintf(&opts,