Skip to content

Commit

Permalink
kernel-doc: fix leading dot in man-mode output
Browse files Browse the repository at this point in the history
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.

[[email protected]: cleanup]
Signed-off-by: Randy Dunlap <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
rddunlap authored and Linus Torvalds committed Jul 19, 2007
1 parent 51f5a0c commit cdccb31
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion scripts/kernel-doc
Original file line number Diff line number Diff line change
Expand Up @@ -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";
}
Expand Down

0 comments on commit cdccb31

Please sign in to comment.