Module Name: src Committed By: abhinav Date: Sat Apr 29 14:43:09 UTC 2017
Modified Files: src/usr.sbin/makemandb: makemandb.c Log Message: Don't parse Nm macro when it occurs anywhere outside the NAME section. mandoc(3) already generates the text node representing the value for the .Nm macro. Doing our own parsing for .Nm on top of that leads to large duplication of text in the database. This gets specially worse for man pages with large NAME sections, such as queue(3). To generate a diff of this commit: cvs rdiff -u -r1.47 -r1.48 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.
Modified files: Index: src/usr.sbin/makemandb/makemandb.c diff -u src/usr.sbin/makemandb/makemandb.c:1.47 src/usr.sbin/makemandb/makemandb.c:1.48 --- src/usr.sbin/makemandb/makemandb.c:1.47 Thu Apr 20 13:11:35 2017 +++ src/usr.sbin/makemandb/makemandb.c Sat Apr 29 14:43:09 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: makemandb.c,v 1.47 2017/04/20 13:11:35 joerg Exp $ */ +/* $NetBSD: makemandb.c,v 1.48 2017/04/29 14:43:09 abhinav Exp $ */ /* * Copyright (c) 2011 Abhinav Upadhyay <er.abhinav.upadh...@gmail.com> * Copyright (c) 2011 Kristaps Dzonsons <krist...@bsd.lv> @@ -17,7 +17,7 @@ */ #include <sys/cdefs.h> -__RCSID("$NetBSD: makemandb.c,v 1.47 2017/04/20 13:11:35 joerg Exp $"); +__RCSID("$NetBSD: makemandb.c,v 1.48 2017/04/29 14:43:09 abhinav Exp $"); #include <sys/stat.h> #include <sys/types.h> @@ -1120,12 +1120,6 @@ mdoc_parse_Sh(const struct roff_node *n, if (n->type == ROFFT_TEXT) { mdoc_parse_section(n->sec, n->string, rec); - } else if (mdocs[n->tok] == pmdoc_Nm && rec->name != NULL) { - /* - * When encountering a .Nm macro, substitute it - * with its previously cached value of the argument. - */ - mdoc_parse_section(n->sec, rec->name, rec); } else if (mdocs[n->tok] == pmdoc_Xr) { /* * When encountering other inline macros,