summaryrefslogtreecommitdiffstats
path: root/mandocdb.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2013-12-27 15:48:09 +0000
committerIngo Schwarze <schwarze@openbsd.org>2013-12-27 15:48:09 +0000
commit998dc67b25ca9f6a3f7875ff78741be3c1c7ee51 (patch)
tree7ec6e402d8451a9bd0becf5d89ef44e55ba78084 /mandocdb.c
parentddb32a6f4378d47136f3f4c2fb9161685a5369a7 (diff)
downloadmandoc-998dc67b25ca9f6a3f7875ff78741be3c1c7ee51.tar.gz
Enable the framework code to allow more than one mlink per mpage.
Not used yet.
Diffstat (limited to 'mandocdb.c')
-rw-r--r--mandocdb.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/mandocdb.c b/mandocdb.c
index 0da80491..653e325c 100644
--- a/mandocdb.c
+++ b/mandocdb.c
@@ -111,6 +111,7 @@ struct mlink {
char *arch; /* architecture from directory */
char *name; /* name from file name (not empty) */
char *fsec; /* section from file name suffix */
+ struct mlink *next; /* singly linked list */
};
struct title {
@@ -826,7 +827,7 @@ mlink_add(struct mlink *mlink, const struct stat *st)
mpage->inodev.st_dev = inodev.st_dev;
ohash_insert(&mpages, slot, mpage);
} else
- abort();
+ mlink->next = mpage->mlinks;
mpage->mlinks = mlink;
}
@@ -851,7 +852,7 @@ mpages_free(void)
mpage = ohash_first(&mpages, &slot);
while (NULL != mpage) {
while (NULL != (mlink = mpage->mlinks)) {
- mpage->mlinks = NULL;
+ mpage->mlinks = mlink->next;
mlink_free(mlink);
}
free(mpage->sec);