Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.sbin/makemandb MDOC_MAX is a valid token if the type is ...



details:   https://anonhg.NetBSD.org/src/rev/e55b4f6c7b65
branches:  trunk
changeset: 336708:e55b4f6c7b65
user:      joerg <joerg%NetBSD.org@localhost>
date:      Thu Mar 12 14:57:18 2015 +0000

description:
MDOC_MAX is a valid token if the type is text. Adjust.

diffstat:

 usr.sbin/makemandb/makemandb.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (36 lines):

diff -r ca54cc1de39e -r e55b4f6c7b65 usr.sbin/makemandb/makemandb.c
--- a/usr.sbin/makemandb/makemandb.c    Thu Mar 12 12:46:41 2015 +0000
+++ b/usr.sbin/makemandb/makemandb.c    Thu Mar 12 14:57:18 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: makemandb.c,v 1.27 2015/03/04 02:02:15 christos Exp $  */
+/*     $NetBSD: makemandb.c,v 1.28 2015/03/12 14:57:18 joerg Exp $     */
 /*
  * Copyright (c) 2011 Abhinav Upadhyay <er.abhinav.upadhyay%gmail.com@localhost>
  * Copyright (c) 2011 Kristaps Dzonsons <kristaps%bsd.lv@localhost>
@@ -17,7 +17,7 @@
  */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: makemandb.c,v 1.27 2015/03/04 02:02:15 christos Exp $");
+__RCSID("$NetBSD: makemandb.c,v 1.28 2015/03/12 14:57:18 joerg Exp $");
 
 #include <sys/stat.h>
 #include <sys/types.h>
@@ -981,7 +981,7 @@
        char *temp;
        char *nd_text;
 
-       if (n == NULL || n->tok == MDOC_MAX)
+       if (n == NULL || (n->type != MDOC_TEXT && n->tok == MDOC_MAX))
                return;
 
        if (n->type == MDOC_TEXT) {
@@ -1098,7 +1098,7 @@
 static void
 pmdoc_Sh(const struct mdoc_node *n, mandb_rec *rec)
 {
-       if (n == NULL || n->tok == MDOC_MAX)
+       if (n == NULL || (n->type != MDOC_TEXT && n->tok == MDOC_MAX))
                return;
        int xr_found = 0;
 



Home | Main Index | Thread Index | Old Index