From a0a529d39a97dad050a7c7cfdc62365e6e04ce87 Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Fri, 7 Jun 2013 04:51:26 +0000 Subject: In .Xr database entries, mention the manual section again; the section was dropped when switching from db to sqlite. Use the customary format foo(N). --- mandocdb.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'mandocdb.c') diff --git a/mandocdb.c b/mandocdb.c index 32c90922..7738604e 100644 --- a/mandocdb.c +++ b/mandocdb.c @@ -1446,12 +1446,23 @@ parse_mdoc_St(struct of *of, const struct mdoc_node *n) static int parse_mdoc_Xr(struct of *of, const struct mdoc_node *n) { + char *cp; if (NULL == (n = n->child)) return(0); - putkey(of, n->string, TYPE_Xr); - return(1); + if (NULL == n->next) { + putkey(of, n->string, TYPE_Xr); + return(0); + } + + if (-1 == asprintf(&cp, "%s(%s)", n->string, n->next->string)) { + perror(NULL); + exit((int)MANDOCLEVEL_SYSERR); + } + putkey(of, cp, TYPE_Xr); + free(cp); + return(0); } static int -- cgit