diff options
-rw-r--r-- | mandocdb.c | 15 |
1 files changed, 13 insertions, 2 deletions
@@ -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 |