source@mandoc.bsd.lv
 help / color / mirror / Atom feed
* mdocml: Added `Er' in ERRORS scan to makewhatis.
@ 2011-07-01 13:46 kristaps
  0 siblings, 0 replies; only message in thread
From: kristaps @ 2011-07-01 13:46 UTC (permalink / raw)
  To: source

Log Message:
-----------
Added `Er' in ERRORS scan to makewhatis.

Modified Files:
--------------
    mdocml:
        makewhatis.1
        makewhatis.c

Revision Data
-------------
Index: makewhatis.c
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/makewhatis.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -Lmakewhatis.c -Lmakewhatis.c -u -p -r1.15 -r1.16
--- makewhatis.c
+++ makewhatis.c
@@ -57,6 +57,7 @@
 #define TYPE_XREF	  0x200
 #define TYPE_PATH	  0x400
 #define TYPE_ENV	  0x800
+#define TYPE_ERR	  0x1000
 
 /* Buffer for storing growable data. */
 
@@ -87,6 +88,7 @@ static	int		  pman_node(MAN_ARGS);
 static	void		  pmdoc_node(MDOC_ARGS);
 static	void		  pmdoc_An(MDOC_ARGS);
 static	void		  pmdoc_Cd(MDOC_ARGS);
+static	void		  pmdoc_Er(MDOC_ARGS);
 static	void		  pmdoc_Ev(MDOC_ARGS);
 static	void		  pmdoc_Fd(MDOC_ARGS);
 static	void		  pmdoc_In(MDOC_ARGS);
@@ -123,7 +125,7 @@ static	const pmdoc_nf	  mdocs[MDOC_MAX] 
 	pmdoc_Cd, /* Cd */ 
 	NULL, /* Cm */
 	NULL, /* Dv */ 
-	NULL, /* Er */ 
+	pmdoc_Er, /* Er */ 
 	pmdoc_Ev, /* Ev */ 
 	NULL, /* Ex */ 
 	NULL, /* Fa */ 
@@ -762,6 +764,18 @@ pmdoc_Nd(MDOC_ARGS)
 	buf_appendmdoc(buf, n->child, 0);
 
 	hash_put(hash, buf, TYPE_DESC);
+}
+
+/* ARGSUSED */
+static void
+pmdoc_Er(MDOC_ARGS)
+{
+
+	if (SEC_ERRORS != n->sec)
+		return;
+	
+	buf_appendmdoc(buf, n->child, 0);
+	hash_put(hash, buf, TYPE_ERR);
 }
 
 /* ARGSUSED */
Index: makewhatis.1
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/makewhatis.1,v
retrieving revision 1.9
retrieving revision 1.10
diff -Lmakewhatis.1 -Lmakewhatis.1 -u -p -r1.9 -r1.10
--- makewhatis.1
+++ makewhatis.1
@@ -122,6 +122,8 @@ If the link has no section, the period t
 Path reference as given in the FILES section.
 .It Li 0x800
 Environment variable as given in the ENVIRONMENT section.
+.It Li 0x1000
+Error codes as given in the ERRORS section.
 .El
 .Pp
 The last four bytes are a host-ordered record number within the
--
 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:[~2011-07-01 13:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-01 13:46 mdocml: Added `Er' in ERRORS scan to makewhatis kristaps

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).