[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Groff] mdoc: handle OpenBSD-style $Mdocdate CVS keyword
From: |
Ingo Schwarze |
Subject: |
[Groff] mdoc: handle OpenBSD-style $Mdocdate CVS keyword |
Date: |
Tue, 1 Nov 2011 20:09:20 +0100 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
Hi,
in OpenBSD, we are using CVS keyword substitution to automatically
update the manual page date when committing to the manual page -
updating the date was too often forgotten before this was implemented,
and typos crept into the dates as well. It looks like this:
.Dd $Mdocdate: March 5 2011 $
.Dt CAT 1
.Os
To make groff handle that, i'm using the following patch.
Maybe you want to include it upstream?
It costs very little, and it helps people who want to read
OpenBSD manuals on other operating systems.
Thanks,
Ingo
--- tmac/doc-common.orig Fri Dec 31 08:33:09 2010
+++ tmac/doc-common Sun Oct 30 23:21:38 2011
@@ -685,7 +685,9 @@
. ds doc-command-name
.
. ie \n[.$] \{\
-. ie (\n[.$] == 3) \
+. ie "\$1"$Mdocdate:" \
+. ds doc-date-string \$2\~\$3, \$4
+. el .ie (\n[.$] == 3) \
. ds doc-date-string \$1\~\$2 \$3
. el \{\
. ds doc-date-string "\*[doc-date-\n[mo]]
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Groff] mdoc: handle OpenBSD-style $Mdocdate CVS keyword,
Ingo Schwarze <=