From 51e5ab06d327f08b5d74fb8ea7b3fb5c2cde30a2 Mon Sep 17 00:00:00 2001 From: Darren Tucker Date: Tue, 5 Jun 2007 19:16:59 +1000 Subject: - (dtucker) [mdoc2man.awk] Teach it to deal with $Mdocdate tags that OpenBSD's cvs now adds. --- mdoc2man.awk | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'mdoc2man.awk') diff --git a/mdoc2man.awk b/mdoc2man.awk index d6eaf4601..5f46aa140 100644 --- a/mdoc2man.awk +++ b/mdoc2man.awk @@ -1,6 +1,9 @@ #!/usr/bin/awk # +# $Id: mdoc2man.awk,v 1.6 2007/06/05 09:16:59 dtucker Exp $ +# # Version history: +# v4+ Adapted for OpenSSH Portable (see cvs Id and history) # v3, I put the program under a proper license # Dan Nelson added .An, .Aq and fixed a typo # v2, fixed to work on GNU awk --posix and MacOS X @@ -135,6 +138,12 @@ function add(str) { nospace=0 } if(match(words[w],"^Dd$")) { + if(match(words[w+1],"^\\$Mdocdate:$")) { + w++; + if(match(words[w+4],"^\\$$")) { + words[w+4] = "" + } + } date=wtail() next } else if(match(words[w],"^Dt$")) { -- cgit v1.2.3