summaryrefslogtreecommitdiff
path: root/mdoc2man.awk
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2007-06-05 20:01:16 +1000
committerDarren Tucker <dtucker@zip.com.au>2007-06-05 20:01:16 +1000
commit0c0dc49bd145828df58302e85111938b46fc9a58 (patch)
tree64ad67ee2f975bca3c356c5c91ba758b93724559 /mdoc2man.awk
parent88bca0641d410bba22cce9c1407d5bd6ac79e5c3 (diff)
- (dtucker) [mdoc2man.awk] Add support for %R references, used for RFCs.
Diffstat (limited to 'mdoc2man.awk')
-rw-r--r--mdoc2man.awk11
1 files changed, 9 insertions, 2 deletions
diff --git a/mdoc2man.awk b/mdoc2man.awk
index ff771a9db..9d1126769 100644
--- a/mdoc2man.awk
+++ b/mdoc2man.awk
@@ -1,6 +1,6 @@
1#!/usr/bin/awk 1#!/usr/bin/awk
2# 2#
3# $Id: mdoc2man.awk,v 1.7 2007/06/05 09:30:48 dtucker Exp $ 3# $Id: mdoc2man.awk,v 1.8 2007/06/05 10:01:16 dtucker Exp $
4# 4#
5# Version history: 5# Version history:
6# v4+ Adapted for OpenSSH Portable (see cvs Id and history) 6# v4+ Adapted for OpenSSH Portable (see cvs Id and history)
@@ -166,6 +166,7 @@ function add(str) {
166 refissue="" 166 refissue=""
167 refdate="" 167 refdate=""
168 refopt="" 168 refopt=""
169 refreport=""
169 reference=1 170 reference=1
170 next 171 next
171 } else if(match(words[w],"^Re$")) { 172 } else if(match(words[w],"^Re$")) {
@@ -177,9 +178,14 @@ function add(str) {
177 } 178 }
178 if(nrefauthors>1) 179 if(nrefauthors>1)
179 add(" and ") 180 add(" and ")
180 add(refauthors[0] ", \\fI" reftitle "\\fP") 181 if(nrefauthors>0)
182 add(refauthors[0] ", ")
183 add("\\fI" reftitle "\\fP")
181 if(length(refissue)) 184 if(length(refissue))
182 add(", " refissue) 185 add(", " refissue)
186 if(length(refreport)) {
187 add(", " refreport)
188 }
183 if(length(refdate)) 189 if(length(refdate))
184 add(", " refdate) 190 add(", " refdate)
185 if(length(refopt)) 191 if(length(refopt))
@@ -196,6 +202,7 @@ function add(str) {
196 if(match(words[w],"^%N$")) { refissue=wtail() } 202 if(match(words[w],"^%N$")) { refissue=wtail() }
197 if(match(words[w],"^%D$")) { refdate=wtail() } 203 if(match(words[w],"^%D$")) { refdate=wtail() }
198 if(match(words[w],"^%O$")) { refopt=wtail() } 204 if(match(words[w],"^%O$")) { refopt=wtail() }
205 if(match(words[w],"^%R$")) { refreport=wtail() }
199 } else if(match(words[w],"^Nm$")) { 206 } else if(match(words[w],"^Nm$")) {
200 if(synopsis) { 207 if(synopsis) {
201 add(".br") 208 add(".br")