From cdccb316c0860b26ad52f622a7592122a62d02b4 Mon Sep 17 00:00:00 2001 From: Randy Dunlap Date: Thu, 19 Jul 2007 01:48:25 -0700 Subject: kernel-doc: fix leading dot in man-mode output 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. [akpm@linux-foundation.org: cleanup] Signed-off-by: Randy Dunlap Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- scripts/kernel-doc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/kernel-doc b/scripts/kernel-doc index f5862abe0311..1f5835115cad 100755 --- a/scripts/kernel-doc +++ b/scripts/kernel-doc @@ -404,7 +404,11 @@ sub output_highlight { print $lineprefix, $blankline; } else { $line =~ s/\\\\\\/\&/g; - print $lineprefix, $line; + if ($output_mode eq "man" && substr($line, 0, 1) eq ".") { + print "\\&$line"; + } else { + print $lineprefix, $line; + } } print "\n"; } -- cgit v1.2.3-59-g8ed1b