[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <E1Hr8EK-0003Zp-00@chiark.greenend.org.uk>
Date: Thu, 24 May 2007 08:59:28 +0100
From: Colin Watson <cjwatson@...ian.org>
To: Randy Dunlap <randy.dunlap@...cle.com>
Cc: linux-kernel@...r.kernel.org
Subject: Re: [PATCH] kernel-doc: fix leading dot in man-mode output
In article <20070523205940.5bc4fdb2.randy.dunlap@...cle.com>, you wrote:
>From: Randy Dunlap <randy.dunlap@...cle.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@...cle.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";
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.)
--
Colin Watson (Debian groff maintainer) [cjwatson@...ian.org]
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists