tech@mandoc.bsd.lv
 help / color / mirror / Atom feed
* FWD: [Groff-commit] groff ChangeLog tmac/an-old.tmac
@ 2011-12-02  0:16 Ingo Schwarze
  2011-12-02  0:28 ` Kristaps Dzonsons
  0 siblings, 1 reply; 2+ messages in thread
From: Ingo Schwarze @ 2011-12-02  0:16 UTC (permalink / raw)
  To: tech

Hi,

Werner Lemberg has accepted my patch to print default volume headers
in man(7), just like we do in mdoc(7).  Of course, now we have to do
the same in mandoc(1).

My patch (against bsd.lv this time, to show the Makefile part as well)
is appended at the very bottom.

OK?
  Ingo

----- Forwarded message from Werner LEMBERG <wl@gnu.org> -----

From: Werner LEMBERG <wl@gnu.org>
Sender: groff-commit-bounces+schwarze=usta.de@gnu.org
Date: Thu, 01 Dec 2011 07:58:38 +0000
To: groff-commit@gnu.org
Subject: [Groff-commit] groff ChangeLog tmac/an-old.tmac

CVSROOT:	/cvsroot/groff
Module name:	groff
Changes by:	Werner LEMBERG <wl>	11/12/01 07:58:38

Modified files:
	.              : ChangeLog 
	tmac           : an-old.tmac 

Log message:
	[man] Print volume headers like mdoc.
	
	* tmac/an-old.tmac (an-init): Add default volume name if fifth
	argument to `.TH' is missing.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/groff/ChangeLog?cvsroot=groff&r1=1.1313&r2=1.1314
http://cvs.savannah.gnu.org/viewcvs/groff/tmac/an-old.tmac?cvsroot=groff&r1=1.64&r2=1.65

Patches:
Index: ChangeLog
===================================================================
RCS file: /cvsroot/groff/groff/ChangeLog,v
retrieving revision 1.1313
retrieving revision 1.1314
diff -u -b -r1.1313 -r1.1314
--- ChangeLog	22 Nov 2011 16:50:24 -0000	1.1313
+++ ChangeLog	1 Dec 2011 07:58:37 -0000	1.1314
@@ -1,3 +1,10 @@
+2011-12-01  Ingo Schwarze  <schwarze@usta.de>
+
+	[man] Print volume headers like mdoc.
+
+	* tmac/an-old.tmac (an-init): Add default volume name if fifth
+	argument to `.TH' is missing.
+
 2011-11-22  Werner LEMBERG  <wl@gnu.org>
 
 	* tmac/groff_man.man: Minor documentation improvements.

Index: tmac/an-old.tmac
===================================================================
RCS file: /cvsroot/groff/groff/tmac/an-old.tmac,v
retrieving revision 1.64
retrieving revision 1.65
diff -u -b -r1.64 -r1.65
--- tmac/an-old.tmac	5 Jan 2009 10:20:59 -0000	1.64
+++ tmac/an-old.tmac	1 Dec 2011 07:58:37 -0000	1.65
@@ -1,7 +1,6 @@
 .\" an-old.tmac
 .\"
-.\" Copyright (C) 1989, 1990, 1991, 1992, 2001, 2002, 2003, 2004, 2005,
-.\"               2007, 2008, 2009
+.\" Copyright (C) 1989-1992, 2001-2005, 2007-2009, 2011
 .\"   Free Software Foundation, Inc.
 .\"      Written by James Clark (jjc@jclark.com)
 .\"
@@ -145,7 +144,17 @@
 .    ie (\\n[.$] > 3) .ds an-extra2 "\\$4\"
 .    el               .ds an-extra2 \"Sun Release 4.0
 .    ie (\\n[.$] > 4) .ds an-extra3 "\\$5\"
-.    el               .ds an-extra3 \"System Programmer's Manual
+.    el .ie '\\$2'1'  .ds an-extra3 General Commands Manual
+.    el .ie '\\$2'2'  .ds an-extra3 System Calls Manual
+.    el .ie '\\$2'3'  .ds an-extra3 Library Functions Manual
+.    el .ie '\\$2'3p' .ds an-extra3 Perl Programmers Reference Guide
+.    el .ie '\\$2'4'  .ds an-extra3 Kernel Interfaces Manual
+.    el .ie '\\$2'5'  .ds an-extra3 File Formats Manual
+.    el .ie '\\$2'6'  .ds an-extra3 Games Manual
+.    el .ie '\\$2'7'  .ds an-extra3 Miscellaneous Information Manual
+.    el .ie '\\$2'8'  .ds an-extra3 System Manager's Manual
+.    el .ie '\\$2'9'  .ds an-extra3 Kernel Developer's Manual
+.    el               .ds an-extra3
 .    ds an-init
 \\..
 .

_______________________________________________
Groff-commit mailing list
Groff-commit@gnu.org
https://lists.gnu.org/mailman/listinfo/groff-commit

----- End forwarded message -----

Index: Makefile
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/Makefile,v
retrieving revision 1.384
diff -u -p -r1.384 Makefile
--- Makefile	28 Nov 2011 10:10:08 -0000	1.384
+++ Makefile	2 Dec 2011 00:10:35 -0000
@@ -173,7 +173,6 @@ LIBMDOC_OBJS	 = arch.o \
 		   mdoc_hash.o \
 		   mdoc_macro.o \
 		   mdoc_validate.o \
-		   msec.o \
 		   st.o \
 		   vol.o
 LIBMDOC_LNS	 = arch.ln \
@@ -184,7 +183,6 @@ LIBMDOC_LNS	 = arch.ln \
 		   mdoc_hash.ln \
 		   mdoc_macro.ln \
 		   mdoc_validate.ln \
-		   msec.ln \
 		   st.ln \
 		   vol.ln
 
@@ -206,12 +204,14 @@ LIBMANDOC_OBJS	 = $(LIBMAN_OBJS) \
 		   $(LIBROFF_OBJS) \
 		   chars.o \
 		   mandoc.o \
+		   msec.o \
 		   read.o
 LIBMANDOC_LNS	 = $(LIBMAN_LNS) \
 		   $(LIBMDOC_LNS) \
 		   $(LIBROFF_LNS) \
 		   chars.ln \
 		   mandoc.ln \
+		   msec.ln \
 		   read.ln
 
 COMPAT_OBJS	 = compat_getsubopt.o \
Index: libmandoc.h
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/libmandoc.h,v
retrieving revision 1.28
diff -u -p -r1.28 libmandoc.h
--- libmandoc.h	28 Jul 2011 14:17:11 -0000	1.28
+++ libmandoc.h	2 Dec 2011 00:10:35 -0000
@@ -49,6 +49,7 @@ char		*mandoc_normdate(struct mparse *, 
 int		 mandoc_eos(const char *, size_t, int);
 int		 mandoc_getcontrol(const char *, int *);
 int		 mandoc_strntoi(const char *, size_t, int);
+const char	*mandoc_a2msec(const char*);
 
 void	 	 mdoc_free(struct mdoc *);
 struct	mdoc	*mdoc_alloc(struct roff *, struct mparse *);
Index: libmdoc.h
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/libmdoc.h,v
retrieving revision 1.77
diff -u -p -r1.77 libmdoc.h
--- libmdoc.h	18 Sep 2011 14:14:15 -0000	1.77
+++ libmdoc.h	2 Dec 2011 00:10:35 -0000
@@ -124,7 +124,6 @@ const char	 *mdoc_a2lib(const char *);
 const char	 *mdoc_a2st(const char *);
 const char	 *mdoc_a2arch(const char *);
 const char	 *mdoc_a2vol(const char *);
-const char	 *mdoc_a2msec(const char *);
 int		  mdoc_valid_pre(struct mdoc *, struct mdoc_node *);
 int		  mdoc_valid_post(struct mdoc *);
 enum margverr	  mdoc_argv(struct mdoc *, int, enum mdoct,
Index: man_validate.c
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/man_validate.c,v
retrieving revision 1.78
diff -u -p -r1.78 man_validate.c
--- man_validate.c	7 Nov 2011 01:24:40 -0000	1.78
+++ man_validate.c	2 Dec 2011 00:10:35 -0000
@@ -416,6 +416,9 @@ post_TH(CHKARGS)
 
 	if (n && (n = n->next))
 		m->meta.vol = mandoc_strdup(n->string);
+	else if ('\0' != m->meta.msec[0] &&
+	    (NULL != (p = mandoc_a2msec(m->meta.msec))))
+		m->meta.vol = mandoc_strdup(p);
 
 	/*
 	 * Remove the `TH' node after we've processed it for our
Index: mdoc_validate.c
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/mdoc_validate.c,v
retrieving revision 1.179
diff -u -p -r1.179 mdoc_validate.c
--- mdoc_validate.c	19 Nov 2011 13:29:47 -0000	1.179
+++ mdoc_validate.c	2 Dec 2011 00:10:35 -0000
@@ -2084,7 +2084,7 @@ post_dt(POST_ARGS)
 	 *       arch = NULL
 	 */
 
-	cp = mdoc_a2msec(nn->string);
+	cp = mandoc_a2msec(nn->string);
 	if (cp) {
 		mdoc->meta.vol = mandoc_strdup(cp);
 		mdoc->meta.msec = mandoc_strdup(nn->string);
Index: msec.c
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/msec.c,v
retrieving revision 1.9
diff -u -p -r1.9 msec.c
--- msec.c	22 Mar 2011 14:33:05 -0000	1.9
+++ msec.c	2 Dec 2011 00:10:35 -0000
@@ -21,15 +21,14 @@
 #include <stdlib.h>
 #include <string.h>
 
-#include "mdoc.h"
 #include "mandoc.h"
-#include "libmdoc.h"
+#include "libmandoc.h"
 
 #define LINE(x, y) \
 	if (0 == strcmp(p, x)) return(y);
 
 const char *
-mdoc_a2msec(const char *p)
+mandoc_a2msec(const char *p)
 {
 
 #include "msec.in"
--
 To unsubscribe send an email to tech+unsubscribe@mdocml.bsd.lv

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-12-02  0:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-02  0:16 FWD: [Groff-commit] groff ChangeLog tmac/an-old.tmac Ingo Schwarze
2011-12-02  0:28 ` Kristaps Dzonsons

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