Received: by mail.netbsd.org (Postfix, from userid 605) id ACC9185EB0; Mon, 3 Oct 2016 13:53:40 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id 3843985EA0 for ; Mon, 3 Oct 2016 13:53:40 +0000 (UTC) X-Virus-Scanned: amavisd-new at netbsd.org Received: from mail.netbsd.org ([127.0.0.1]) by localhost (mail.netbsd.org [127.0.0.1]) (amavisd-new, port 10025) with ESMTP id zcFOEza4Bq6b for ; Mon, 3 Oct 2016 13:53:39 +0000 (UTC) Received: from cvs.NetBSD.org (ivanova.netbsd.org [199.233.217.197]) by mail.netbsd.org (Postfix) with ESMTP id CC51285E25 for ; Mon, 3 Oct 2016 13:53:39 +0000 (UTC) Received: by cvs.NetBSD.org (Postfix, from userid 500) id BE20AFBD2; Mon, 3 Oct 2016 13:53:39 +0000 (UTC) Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" MIME-Version: 1.0 Date: Mon, 3 Oct 2016 13:53:39 +0000 From: "Abhinav Upadhyay" Subject: CVS commit: src/usr.sbin/makemandb To: source-changes@NetBSD.org X-Mailer: log_accum Message-Id: <20161003135339.BE20AFBD2@cvs.NetBSD.org> Sender: source-changes-owner@NetBSD.org List-Id: source-changes.NetBSD.org Precedence: bulk Reply-To: source-changes-d@NetBSD.org Mail-Reply-To: "Abhinav Upadhyay" Mail-Followup-To: source-changes-d@NetBSD.org Module Name: src Committed By: abhinav Date: Mon Oct 3 13:53:39 UTC 2016 Modified Files: src/usr.sbin/makemandb: makemandb.c Log Message: With the latest release of mandoc, makemandb(8) started to parse some sections multiple times. This started to happen because, pmdoc_Sh(), the handler function responsible for parsing the Sh macros, used to recursively go through all the child nodes and then the next nodes starting from top level Sh block node. Now, once it has processed all the child nodes of the top level block node, it moves to the next node, which is the top level block node of the next section and in this way one call to pmdoc_Sh() was causing a complete pass through the man page. Since, mandoc(3) calls pmdoc_Sh() for each .Sh macro in the man page, it would result in parsing some of the sections multiple times. This never happened with the previous versions of mandoc, so we never noticed. I've fixed this by starting the parse sequence of the Sh macro from its body, which gurantees that we will stop once that section ends. ok christos@ To generate a diff of this commit: cvs rdiff -u -r1.42 -r1.43 src/usr.sbin/makemandb/makemandb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.