From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp-1.sys.kth.se (smtp-1.sys.kth.se [130.237.32.175]) by krisdoz.my.domain (8.14.3/8.14.3) with ESMTP id p0LIVtEp005170 for ; Fri, 21 Jan 2011 13:31:57 -0500 (EST) Received: from mailscan-1.sys.kth.se (mailscan-1.sys.kth.se [130.237.32.91]) by smtp-1.sys.kth.se (Postfix) with ESMTP id DA5CA156F6A; Fri, 21 Jan 2011 19:31:49 +0100 (CET) X-Virus-Scanned: by amavisd-new at kth.se Received: from smtp-1.sys.kth.se ([130.237.32.175]) by mailscan-1.sys.kth.se (mailscan-1.sys.kth.se [130.237.32.91]) (amavisd-new, port 10024) with LMTP id lNnpe3WJ1s0j; Fri, 21 Jan 2011 19:31:48 +0100 (CET) X-KTH-Auth: kristaps [85.8.61.146] X-KTH-mail-from: kristaps@bsd.lv Received: from h85-8-61-146.dynamic.se.alltele.net (h85-8-61-146.dynamic.se.alltele.net [85.8.61.146]) by smtp-1.sys.kth.se (Postfix) with ESMTP id 6273A15587F; Fri, 21 Jan 2011 19:31:47 +0100 (CET) Message-ID: <4D39D119.7090507@bsd.lv> Date: Fri, 21 Jan 2011 19:31:53 +0100 From: Kristaps Dzonsons User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7 X-Mailinglist: mdocml-tech Reply-To: tech@mdocml.bsd.lv MIME-Version: 1.0 To: tech@mdocml.bsd.lv CC: Ingo Schwarze Subject: Re: [PATCH] remaining cleanup of mdoc(7) arg count validation References: <20110102211552.GB21085@iris.usta.de> <4D20EFA4.6090409@bsd.lv> <20110104000606.GC11029@iris.usta.de> <20110120202205.GA14941@iris.usta.de> In-Reply-To: <20110120202205.GA14941@iris.usta.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit > recently, we downgraded several argument count issues in mdoc(7) > from ERROR to WARNING. Not all cases could be handled in the first > batch. Now i had another look and cleaned up the rest, which turned > out to be a subset of all mdoc macros handled by the mdoc_macro.c > function in_line(), so i tested the argument count checking of all > in_line() macros. > > The changes are: > * Most empty in_line() macros are already removed by the parser, > so there is no need to check again in mdoc_validate.c. > * posts_wtest[] can be consolidated into posts_text[]. > * All uses of eerr_ge1() go away, so we can delete that function. > * For .An, handle both cases (-[no]split with more arguments > and no arguments at all) as argument count warnings. > > This patch leaves on single argument count ERROR in mdoc(7): > .Nd without arguments. That issue causes output unusable by > makewhatis(8), so i feel calling that output "seriously garbled" > and throwing an ERROR is warranted. Ingo, I like this! Please check over mdoc.7 to see if the documentation for the macro (i.e., number of arguments) matches the reality. Less code pleases me... (I remember some documentation is still pending from you for the argument handling...) Thanks again! Kristaps -- To unsubscribe send an email to tech+unsubscribe@mdocml.bsd.lv