From: dtucker Date: Tue, 5 Jun 2007 10:01:16 +0000 (+0000) Subject: - (dtucker) [mdoc2man.awk] Add support for %R references, used for RFCs. X-Git-Tag: V_4_7_P1~62 X-Git-Url: http://andersk.mit.edu/gitweb/openssh.git/commitdiff_plain/757841b241c99b6d22041f495003abdf7ebc67ca - (dtucker) [mdoc2man.awk] Add support for %R references, used for RFCs. --- diff --git a/ChangeLog b/ChangeLog index ad024b46..b674ed5f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -28,6 +28,7 @@ OpenBSD's cvs now adds. - (dtucker) [mdoc2man.awk] Remove trailing "$" from Mdocdate regex so mindrot's cvs doesn't expand it on us. + - (dtucker) [mdoc2man.awk] Add support for %R references, used for RFCs. 20070520 - (dtucker) OpenBSD CVS Sync diff --git a/mdoc2man.awk b/mdoc2man.awk index 67eb25c0..7ad14578 100644 --- a/mdoc2man.awk +++ b/mdoc2man.awk @@ -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")