summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2007-06-05 20:05:37 +1000
committerDarren Tucker <dtucker@zip.com.au>2007-06-05 20:05:37 +1000
commita50bfccd463db55ce2c9121898446c12534cdf1e (patch)
tree48666c5ce7d84f2af21c43038568f5e7e6b7612e
parentcd58e4d4da6a6e5a976df86a62513d5d1f04360b (diff)
- (dtucker) [mdoc2man.awk] Sync with rev 1.8, mainly for %R reference
support used for RFCs.
-rw-r--r--ChangeLog6
-rw-r--r--mdoc2man.awk18
2 files changed, 22 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 5dd40358..9b03ad66 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+20070605
+ - (dtucker) [mdoc2man.awk] Sync with rev 1.8, mainly for %R reference
+ support used for RFCs.
+
20070520
- (dtucker) OpenBSD CVS Sync
- dtucker@cvs.openbsd.org 2007/04/23 10:15:39
@@ -2850,4 +2854,4 @@
OpenServer 6 and add osr5bigcrypt support so when someone migrates
passwords between UnixWare and OpenServer they will still work. OK dtucker@
-$Id: ChangeLog,v 1.4635.2.7 2007/05/20 05:06:11 dtucker Exp $
+$Id: ChangeLog,v 1.4635.2.8 2007/06/05 10:05:37 dtucker Exp $
diff --git a/mdoc2man.awk b/mdoc2man.awk
index d6eaf460..89f36673 100644
--- a/mdoc2man.awk
+++ b/mdoc2man.awk
@@ -1,6 +1,9 @@
#!/usr/bin/awk
#
+# $Id: mdoc2man.awk,v 1.5.10.1 2007/06/05 10:05:38 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 <dnelson@allantgroup.com> 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$")) {
@@ -157,6 +166,7 @@ function add(str) {
refissue=""
refdate=""
refopt=""
+ refreport=""
reference=1
next
} else if(match(words[w],"^Re$")) {
@@ -168,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))
@@ -187,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")