diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2011-11-27 23:11:37 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2011-11-27 23:11:37 +0000 |
commit | 07304175d86315fbc89776525d955c80343d865e (patch) | |
tree | 555f9d14fa90e39cd3350e61f7c67d3e2762fd94 /mandocdb.c | |
parent | 776f2786ee96823180362d9f454bfbe3737761ca (diff) | |
download | mandoc-07304175d86315fbc89776525d955c80343d865e.tar.gz mandoc-07304175d86315fbc89776525d955c80343d865e.tar.zst mandoc-07304175d86315fbc89776525d955c80343d865e.zip |
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.
Diffstat (limited to 'mandocdb.c')
-rw-r--r-- | mandocdb.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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 <kristaps@bsd.lv> * Copyright (c) 2011 Ingo Schwarze <schwarze@openbsd.org> @@ -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); |