From: Randy Dunlap <randy.dunlap@oracle.com>
To: Colin Watson <cjwatson@debian.org>
Cc: linux-kernel@vger.kernel.org, akpm <akpm@linux-foundation.org>
Subject: [PATCH v2] kernel-doc: fix leading dot in man-mode output
Date: Thu, 24 May 2007 08:11:50 -0700 [thread overview]
Message-ID: <20070524081150.ccc7bcb6.randy.dunlap@oracle.com> (raw)
In-Reply-To: <E1Hr8EK-0003Zp-00@chiark.greenend.org.uk>
On Thu, 24 May 2007 08:59:28 +0100 Colin Watson wrote:
> This is a very unusual way to escape leading "." in *roff, and I'm not
> entirely sure the result is defined given that \{ is normally supposed
> to be paired with \} and used to construct blocks. The more conventional
> method would be:
>
> print "\\&$line";
>
> (\& is a zero-width space.)
Hi, and thanks. That's a good change. I appreciate it.
---
From: Randy Dunlap <randy.dunlap@oracle.com>
If a parameter description begins with a '.', this indicates a
"request" for "man" mode output (*roff), so it needs special
handling.
Problem case is in include/asm-i386/atomic.h for function
atomic_add_unless():
* @u: ...unless v is equal to u.
This parameter description is currently not printed in man mode output.
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
---
scripts/kernel-doc | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
--- linux-2.6.21-rc2-git4.orig/scripts/kernel-doc
+++ linux-2.6.21-rc2-git4/scripts/kernel-doc
@@ -384,8 +384,13 @@ sub output_highlight {
if ($line eq ""){
print $lineprefix, $blankline;
} else {
- $line =~ s/\\\\\\/\&/g;
- print $lineprefix, $line;
+ $line =~ s/\\\\\\/\&/g;
+ if ($output_mode eq "man" && substr($line, 0, 1) eq ".") {
+ print "\\&$line";
+ }
+ else {
+ print $lineprefix, $line;
+ }
}
print "\n";
}
prev parent reply other threads:[~2007-05-24 15:07 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-24 3:59 [PATCH] " Randy Dunlap
2007-05-24 7:59 ` Colin Watson
2007-05-24 15:11 ` Randy Dunlap [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070524081150.ccc7bcb6.randy.dunlap@oracle.com \
--to=randy.dunlap@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=cjwatson@debian.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome