From: Randy Dunlap Date: Thu, 19 Jul 2007 08:48:25 +0000 (-0700) Subject: kernel-doc: fix leading dot in man-mode output X-Git-Tag: v2.6.23-rc1~408 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cdccb316c0860b26ad52f622a7592122a62d02b4;p=linux-2.6 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 --- diff --git a/scripts/kernel-doc b/scripts/kernel-doc index f5862abe03..1f5835115c 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"; }