mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] kernel-doc: fix leading dot in man-mode output
@ 2007-05-24  3:59 Randy Dunlap
  2007-05-24  7:59 ` Colin Watson
  0 siblings, 1 reply; 3+ messages in thread
From: Randy Dunlap @ 2007-05-24  3:59 UTC (permalink / raw)
  To: lkml; +Cc: akpm

From: Randy Dunlap <randy.dunlap@oracle.com>

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.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
---
 scripts/kernel-doc |    9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

--- linux-2.6.21-rc2-git4.orig/scripts/kernel-doc
+++ linux-2.6.21-rc2-git4/scripts/kernel-doc
@@ -384,8 +384,13 @@ sub output_highlight {
       if ($line eq ""){
 	    print $lineprefix, $blankline;
 	} else {
-            $line =~ s/\\\\\\/\&/g;
-	    print $lineprefix, $line;
+	    $line =~ s/\\\\\\/\&/g;
+	    if ($output_mode eq "man" && substr($line, 0, 1) eq ".") {
+		print "\\{$line";
+	    }
+	    else {
+		print $lineprefix, $line;
+	    }
 	}
 	print "\n";
     }

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-05-24 15:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-05-24  3:59 [PATCH] kernel-doc: fix leading dot in man-mode output Randy Dunlap
2007-05-24  7:59 ` Colin Watson
2007-05-24 15:11   ` [PATCH v2] " Randy Dunlap

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome