diff options
author | 2013-12-27 15:48:09 +0000 | |
---|---|---|
committer | 2013-12-27 15:48:09 +0000 | |
commit | c685a4eb0713d42e535a21e602d1bd63db095307 (patch) | |
tree | f6329995c216b24b19ee836ecbe752eac50d7f99 /mandocdb.c | |
parent | 5f81f768cd7471ea8fe88cc9671071d8dc26b310 (diff) | |
download | mandoc-c685a4eb0713d42e535a21e602d1bd63db095307.tar.gz mandoc-c685a4eb0713d42e535a21e602d1bd63db095307.tar.zst mandoc-c685a4eb0713d42e535a21e602d1bd63db095307.zip |
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 | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -1,4 +1,4 @@ -/* $Id: mandocdb.c,v 1.84 2013/12/27 15:39:03 schwarze Exp $ */ +/* $Id: mandocdb.c,v 1.85 2013/12/27 15:48:09 schwarze Exp $ */ /* * Copyright (c) 2011, 2012 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2011, 2012, 2013 Ingo Schwarze <schwarze@openbsd.org> @@ -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); |