version 1.220.2.8, 2017/01/27 13:59:28 |
version 1.220.2.9, 2017/01/27 14:18:42 |
Line 1192 mpages_merge(struct mparse *mp) |
|
Line 1192 mpages_merge(struct mparse *mp) |
|
if (mlink->dform != FORM_CAT || mlink->fform != FORM_CAT) { |
if (mlink->dform != FORM_CAT || mlink->fform != FORM_CAT) { |
mparse_readfd(mp, fd, mlink->file); |
mparse_readfd(mp, fd, mlink->file); |
close(fd); |
close(fd); |
|
fd = -1; |
mparse_result(mp, &man, &sodest); |
mparse_result(mp, &man, &sodest); |
} |
} |
|
|
Line 1248 mpages_merge(struct mparse *mp) |
|
Line 1249 mpages_merge(struct mparse *mp) |
|
mpage->title = mandoc_strdup(man->meta.title); |
mpage->title = mandoc_strdup(man->meta.title); |
} else if (man != NULL && man->macroset == MACROSET_MAN) { |
} else if (man != NULL && man->macroset == MACROSET_MAN) { |
man_validate(man); |
man_validate(man); |
mpage->form = FORM_SRC; |
if (*man->meta.msec != '\0' || |
mpage->sec = mandoc_strdup(man->meta.msec); |
*man->meta.msec != '\0') { |
mpage->arch = mandoc_strdup(mlink->arch); |
mpage->form = FORM_SRC; |
mpage->title = mandoc_strdup(man->meta.title); |
mpage->sec = mandoc_strdup(man->meta.msec); |
} else { |
mpage->arch = mandoc_strdup(mlink->arch); |
|
mpage->title = mandoc_strdup(man->meta.title); |
|
} else |
|
man = NULL; |
|
} |
|
|
|
assert(mpage->desc == NULL); |
|
if (man == NULL) { |
mpage->form = FORM_CAT; |
mpage->form = FORM_CAT; |
mpage->sec = mandoc_strdup(mlink->dsec); |
mpage->sec = mandoc_strdup(mlink->dsec); |
mpage->arch = mandoc_strdup(mlink->arch); |
mpage->arch = mandoc_strdup(mlink->arch); |
mpage->title = mandoc_strdup(mlink->name); |
mpage->title = mandoc_strdup(mlink->name); |
} |
parse_cat(mpage, fd); |
|
} else if (man->macroset == MACROSET_MDOC) |
|
parse_mdoc(mpage, &man->meta, man->first); |
|
else |
|
parse_man(mpage, &man->meta, man->first); |
|
|
putkey(mpage, mpage->sec, TYPE_sec); |
putkey(mpage, mpage->sec, TYPE_sec); |
if (*mpage->arch != '\0') |
if (*mpage->arch != '\0') |
putkey(mpage, mpage->arch, TYPE_arch); |
putkey(mpage, mpage->arch, TYPE_arch); |
Line 1272 mpages_merge(struct mparse *mp) |
|
Line 1285 mpages_merge(struct mparse *mp) |
|
putkey(mpage, mlink->name, NAME_FILE); |
putkey(mpage, mlink->name, NAME_FILE); |
} |
} |
|
|
assert(mpage->desc == NULL); |
|
if (man != NULL && man->macroset == MACROSET_MDOC) |
|
parse_mdoc(mpage, &man->meta, man->first); |
|
else if (man != NULL) |
|
parse_man(mpage, &man->meta, man->first); |
|
else |
|
parse_cat(mpage, fd); |
|
if (mpage->desc == NULL) |
if (mpage->desc == NULL) |
mpage->desc = mandoc_strdup(mpage->mlinks->name); |
mpage->desc = mandoc_strdup(mpage->mlinks->name); |
|
|
Line 1288 mpages_merge(struct mparse *mp) |
|
Line 1294 mpages_merge(struct mparse *mp) |
|
mlink_check(mpage, mlink); |
mlink_check(mpage, mlink); |
|
|
dbadd(mpage); |
dbadd(mpage); |
mlink = mpage->mlinks; |
|
|
|
nextpage: |
nextpage: |
ohash_delete(&strings); |
ohash_delete(&strings); |