From 07304175d86315fbc89776525d955c80343d865e Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Sun, 27 Nov 2011 23:11:37 +0000 Subject: Save the manual type (mdoc, man, or cat) in the index file of the mandoc databases, as suggested by kristaps@. Given the well-structured code, this is surprisingly simple. This changes the mandoc.index database format. Run "sudo mandocdb" to regenerate your databases. --- mandocdb.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'mandocdb.c') diff --git a/mandocdb.c b/mandocdb.c index a6b8bf05..1925389a 100644 --- a/mandocdb.c +++ b/mandocdb.c @@ -1,4 +1,4 @@ -/* $Id: mandocdb.c,v 1.14 2011/11/27 22:57:53 schwarze Exp $ */ +/* $Id: mandocdb.c,v 1.15 2011/11/27 23:11:37 schwarze Exp $ */ /* * Copyright (c) 2011 Kristaps Dzonsons * Copyright (c) 2011 Ingo Schwarze @@ -592,6 +592,7 @@ index_merge(const struct of *of, struct mparse *mp, */ dbuf->len = 0; + buf_append(dbuf, mdoc ? "mdoc" : (man ? "man" : "cat")); buf_appendb(dbuf, fn, strlen(fn) + 1); buf_appendb(dbuf, msec, strlen(msec) + 1); buf_appendb(dbuf, mtitle, strlen(mtitle) + 1); -- cgit v1.2.3-56-ge451