From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp1.rz.uni-karlsruhe.de (Debian-exim@smtp1.rz.uni-karlsruhe.de [129.13.185.217]) by krisdoz.my.domain (8.14.3/8.14.3) with ESMTP id o9QNAxfm009641 for ; Tue, 26 Oct 2010 19:11:00 -0400 (EDT) Received: from hekate.usta.de (asta-nat.asta.uni-karlsruhe.de [172.22.63.82]) by smtp1.rz.uni-karlsruhe.de with esmtp (Exim 4.63 #1) id 1PAsfR-0006hY-Jc; Wed, 27 Oct 2010 01:10:57 +0200 Received: from donnerwolke.usta.de ([172.24.96.3]) by hekate.usta.de with esmtp (Exim 4.71) (envelope-from ) id 1PAsfR-00003b-Hz for tech@mdocml.bsd.lv; Wed, 27 Oct 2010 01:10:57 +0200 Received: from iris.usta.de ([172.24.96.5] helo=usta.de) by donnerwolke.usta.de with esmtp (Exim 4.69) (envelope-from ) id 1PAsfR-0002xc-H6 for tech@mdocml.bsd.lv; Wed, 27 Oct 2010 01:10:57 +0200 Received: from schwarze by usta.de with local (Exim 4.71) (envelope-from ) id 1PAsfR-0000tI-7P for tech@mdocml.bsd.lv; Wed, 27 Oct 2010 01:10:57 +0200 Date: Wed, 27 Oct 2010 01:10:56 +0200 From: Ingo Schwarze To: tech@mdocml.bsd.lv Subject: Re: implement .so Message-ID: <20101026231056.GJ27536@iris.usta.de> References: <20101024172914.GH20876@iris.usta.de> <20101024173857.GA18657@britannica.bec.de> <20101024180019.GI20876@iris.usta.de> <20101024181502.GA13039@britannica.bec.de> <20101024194129.GJ20876@iris.usta.de> <20101024195135.GA1809@britannica.bec.de> <20101025215506.GA12557@iris.usta.de> <20101025221017.GA6533@britannica.bec.de> <20101026175913.GF27536@iris.usta.de> <20101026181252.GA4964@britannica.bec.de> X-Mailinglist: mdocml-tech Reply-To: tech@mdocml.bsd.lv MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20101026181252.GA4964@britannica.bec.de> User-Agent: Mutt/1.5.20 (2009-06-14) Hi Joerg, Joerg Sonnenberger wrote on Tue, Oct 26, 2010 at 08:12:52PM +0200: > I would like to a see a warning for -T lint, but I am not sure how that > could be implemented easily. Is this what you hoped for? ischwarze@isnote $ mandoc -Tlint /usr/X11R6/man/man3/XevieStart.3 /usr/X11R6/man/man3/XevieStart.3:1:1: WARNING: .so is fragile, better use ln(1) man3/Xevie.3: No such file or directory ischwarze@isnote $ cd /usr/X11R6/man/ ischwarze@isnote $ mandoc -Tlint man3/XevieStart.3 man3/XevieStart.3:1:1: WARNING: .so is fragile, better use ln(1) man3/Xevie.3:10:13: WARNING: cannot parse date argument man3/Xevie.3:16:7: WARNING: end of line whitespace man3/Xevie.3:45:43: WARNING: end of line whitespace Yours, Ingo Index: main.c =================================================================== RCS file: /cvs/src/usr.bin/mandoc/main.c,v retrieving revision 1.53 diff -u -p -r1.53 main.c --- main.c 26 Oct 2010 22:48:07 -0000 1.53 +++ main.c 26 Oct 2010 23:08:59 -0000 @@ -115,6 +115,7 @@ static const char * const mandocerrs[MAN "macro not allowed in body", /* related to document structure */ + ".so is fragile, better use ln(1)", "NAME section must come first", "bad NAME section contents", "manual name not yet set", Index: mandoc.h =================================================================== RCS file: /cvs/src/usr.bin/mandoc/mandoc.h,v retrieving revision 1.19 diff -u -p -r1.19 mandoc.h --- mandoc.h 26 Oct 2010 22:48:07 -0000 1.19 +++ mandoc.h 26 Oct 2010 23:08:59 -0000 @@ -57,6 +57,7 @@ enum mandocerr { MANDOCERR_BADBODY, /* macro not allowed in body */ /* related to document structure */ + MANDOCERR_SO, /* .so is fragile, better use ln(1) */ MANDOCERR_NAMESECFIRST, /* NAME section must come first */ MANDOCERR_BADNAMESEC, /* bad NAME section contents */ MANDOCERR_NONAME, /* manual name not yet set */ Index: roff.c =================================================================== RCS file: /cvs/src/usr.bin/mandoc/roff.c,v retrieving revision 1.14 diff -u -p -r1.14 roff.c --- roff.c 26 Oct 2010 22:28:57 -0000 1.14 +++ roff.c 26 Oct 2010 23:08:59 -0000 @@ -1017,6 +1017,8 @@ roff_so(ROFF_ARGS) { char *name; + (*r->msg)(MANDOCERR_SO, r->data, ln, ppos, NULL); + name = *bufp + pos; if ('/' == *name || strstr(name, "../") || strstr(name, "/..")) { (*r->msg)(MANDOCERR_SOPATH, r->data, ln, pos, NULL); -- To unsubscribe send an email to tech+unsubscribe@mdocml.bsd.lv