summaryrefslogtreecommitdiff
path: root/mdoc2man.awk
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2007-06-05 19:16:59 +1000
committerDarren Tucker <dtucker@zip.com.au>2007-06-05 19:16:59 +1000
commit51e5ab06d327f08b5d74fb8ea7b3fb5c2cde30a2 (patch)
tree22127b2f7bae4057e2a1dea42aed0add516cab5f /mdoc2man.awk
parent5f3d5be52f02d2d149cc11ec4a511d022444d2b1 (diff)
- (dtucker) [mdoc2man.awk] Teach it to deal with $Mdocdate tags that
OpenBSD's cvs now adds.
Diffstat (limited to 'mdoc2man.awk')
-rw-r--r--mdoc2man.awk9
1 files changed, 9 insertions, 0 deletions
diff --git a/mdoc2man.awk b/mdoc2man.awk
index d6eaf4601..5f46aa140 100644
--- a/mdoc2man.awk
+++ b/mdoc2man.awk
@@ -1,6 +1,9 @@
1#!/usr/bin/awk 1#!/usr/bin/awk
2# 2#
3# $Id: mdoc2man.awk,v 1.6 2007/06/05 09:16:59 dtucker Exp $
4#
3# Version history: 5# Version history:
6# v4+ Adapted for OpenSSH Portable (see cvs Id and history)
4# v3, I put the program under a proper license 7# v3, I put the program under a proper license
5# Dan Nelson <dnelson@allantgroup.com> added .An, .Aq and fixed a typo 8# Dan Nelson <dnelson@allantgroup.com> added .An, .Aq and fixed a typo
6# v2, fixed to work on GNU awk --posix and MacOS X 9# v2, fixed to work on GNU awk --posix and MacOS X
@@ -135,6 +138,12 @@ function add(str) {
135 nospace=0 138 nospace=0
136 } 139 }
137 if(match(words[w],"^Dd$")) { 140 if(match(words[w],"^Dd$")) {
141 if(match(words[w+1],"^\\$Mdocdate:$")) {
142 w++;
143 if(match(words[w+4],"^\\$$")) {
144 words[w+4] = ""
145 }
146 }
138 date=wtail() 147 date=wtail()
139 next 148 next
140 } else if(match(words[w],"^Dt$")) { 149 } else if(match(words[w],"^Dt$")) {