diff options
-rw-r--r-- | apropos_db.c | 1 | ||||
-rw-r--r-- | apropos_db.h | 1 | ||||
-rw-r--r-- | mandocdb.c | 1 |
3 files changed, 3 insertions, 0 deletions
diff --git a/apropos_db.c b/apropos_db.c index 7a423083..5e473a6b 100644 --- a/apropos_db.c +++ b/apropos_db.c @@ -366,6 +366,7 @@ index_read(const DBT *key, const DBT *val, int index, rec->res.rec = *(recno_t *)key->data; rec->res.volume = index; + INDEX_BREAD(rec->res.type); INDEX_BREAD(rec->res.file); INDEX_BREAD(rec->res.cat); INDEX_BREAD(rec->res.title); diff --git a/apropos_db.h b/apropos_db.h index 2591d87e..1accaa1f 100644 --- a/apropos_db.h +++ b/apropos_db.h @@ -18,6 +18,7 @@ #define APROPOS_H struct res { + char *type; /* file type: mdoc, man or cat */ char *file; /* file in file-system */ char *cat; /* category (3p, 3, etc.) */ char *title; /* title (FOO, etc.) */ @@ -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); |