source@mandoc.bsd.lv
 help / color / mirror / Atom feed
* mdocml: In .Xr database entries, mention the manual section again; the
@ 2013-06-07  4:51 schwarze
  0 siblings, 0 replies; only message in thread
From: schwarze @ 2013-06-07  4:51 UTC (permalink / raw)
  To: source

Log Message:
-----------
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).

Modified Files:
--------------
    mdocml:
        mandocdb.c

Revision Data
-------------
Index: mandocdb.c
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/mandocdb.c,v
retrieving revision 1.66
retrieving revision 1.67
diff -Lmandocdb.c -Lmandocdb.c -u -p -r1.66 -r1.67
--- mandocdb.c
+++ mandocdb.c
@@ -1446,12 +1446,23 @@ parse_mdoc_St(struct of *of, const struc
 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
--
 To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2013-06-07  4:51 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-07  4:51 mdocml: In .Xr database entries, mention the manual section again; the schwarze

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).