diff options
author | 2013-06-07 04:51:26 +0000 | |
---|---|---|
committer | 2013-06-07 04:51:26 +0000 | |
commit | fd57481c1d70db75f8850ef82e5f1f4131c26173 (patch) | |
tree | 9736c0e160e37b9c1c8af409d4581a181596615c | |
parent | e5bff5e430c392e3c6a319145c5d7887c8b72c8e (diff) | |
download | mandoc-fd57481c1d70db75f8850ef82e5f1f4131c26173.tar.gz mandoc-fd57481c1d70db75f8850ef82e5f1f4131c26173.tar.zst mandoc-fd57481c1d70db75f8850ef82e5f1f4131c26173.zip |
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).
-rw-r--r-- | mandocdb.c | 17 |
1 files changed, 14 insertions, 3 deletions
@@ -1,4 +1,4 @@ -/* $Id: mandocdb.c,v 1.66 2013/06/07 01:01:34 schwarze Exp $ */ +/* $Id: mandocdb.c,v 1.67 2013/06/07 04:51:26 schwarze Exp $ */ /* * Copyright (c) 2011, 2012 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2011, 2012, 2013 Ingo Schwarze <schwarze@openbsd.org> @@ -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 |