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-Url: https://git.stricted.de/?a=commitdiff_plain;h=cdccb316c0860b26ad52f622a7592122a62d02b4;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.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 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"; }