diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2013-06-07 04:51:26 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2013-06-07 04:51:26 +0000 |
commit | a0a529d39a97dad050a7c7cfdc62365e6e04ce87 (patch) | |
tree | bc404f3330621a6beb7272013326f96d6c3a6d92 /mandocdb.c | |
parent | abcea2e84eb36a5071348b5e3d32d407411200b5 (diff) | |
download | mandoc-a0a529d39a97dad050a7c7cfdc62365e6e04ce87.tar.gz |
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).
Diffstat (limited to 'mandocdb.c')
-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 |