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)
downloadopenssh-git-0c0dc49bd145828df58302e85111938b46fc9a58.tar.gz
- (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 ff771a9d..9d112676 100644
--- a/mdoc2man.awk
+++ b/mdoc2man.awk
@@ -1,6 +1,6 @@
#!/usr/bin/awk
#
-# $Id: mdoc2man.awk,v 1.7 2007/06/05 09:30:48 dtucker Exp $
+# $Id: mdoc2man.awk,v 1.8 2007/06/05 10:01:16 dtucker Exp $
#
# Version history:
# v4+ Adapted for OpenSSH Portable (see cvs Id and history)
@@ -166,6 +166,7 @@ function add(str) {
refissue=""
refdate=""
refopt=""
+ refreport=""
reference=1
next
} else if(match(words[w],"^Re$")) {
@@ -177,9 +178,14 @@ function add(str) {
}
if(nrefauthors>1)
add(" and ")
- add(refauthors[0] ", \\fI" reftitle "\\fP")
+ if(nrefauthors>0)
+ add(refauthors[0] ", ")
+ add("\\fI" reftitle "\\fP")
if(length(refissue))
add(", " refissue)
+ if(length(refreport)) {
+ add(", " refreport)
+ }
if(length(refdate))
add(", " refdate)
if(length(refopt))
@@ -196,6 +202,7 @@ function add(str) {
if(match(words[w],"^%N$")) { refissue=wtail() }
if(match(words[w],"^%D$")) { refdate=wtail() }
if(match(words[w],"^%O$")) { refopt=wtail() }
+ if(match(words[w],"^%R$")) { refreport=wtail() }
} else if(match(words[w],"^Nm$")) {
if(synopsis) {
add(".br")