diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2013-12-27 15:48:09 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2013-12-27 15:48:09 +0000 |
commit | 998dc67b25ca9f6a3f7875ff78741be3c1c7ee51 (patch) | |
tree | 7ec6e402d8451a9bd0becf5d89ef44e55ba78084 /mandocdb.c | |
parent | ddb32a6f4378d47136f3f4c2fb9161685a5369a7 (diff) | |
download | mandoc-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.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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); |