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: http://pilppa.com/gitweb/?a=commitdiff_plain;h=cdccb316c0860b26ad52f622a7592122a62d02b4;p=linux-2.6-omap-h63xx.git 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 f5862abe031..1f5835115ca 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"; }