Commit cdccb316c0860b26ad52f622a7592122a62d02b4

Authored by Randy Dunlap
Committed by Linus Torvalds
1 parent 51f5a0c8f6

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 <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

Showing 1 changed file with 5 additions and 1 deletions Side-by-side Diff

... ... @@ -404,7 +404,11 @@
404 404 print $lineprefix, $blankline;
405 405 } else {
406 406 $line =~ s/\\\\\\/\&/g;
407   - print $lineprefix, $line;
  407 + if ($output_mode eq "man" && substr($line, 0, 1) eq ".") {
  408 + print "\\&$line";
  409 + } else {
  410 + print $lineprefix, $line;
  411 + }
408 412 }
409 413 print "\n";
410 414 }