* [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
* Re: [PATCH] kernel-doc: fix leading dot in man-mode output
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
0 siblings, 1 reply; 3+ messages in thread
From: Colin Watson @ 2007-05-24 7:59 UTC (permalink / raw)
To: Randy Dunlap; +Cc: linux-kernel
In article <20070523205940.5bc4fdb2.randy.dunlap@oracle.com>, you wrote:
>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";
This is a very unusual way to escape leading "." in *roff, and I'm not
entirely sure the result is defined given that \{ is normally supposed
to be paired with \} and used to construct blocks. The more conventional
method would be:
print "\\&$line";
(\& is a zero-width space.)
--
Colin Watson (Debian groff maintainer) [cjwatson@debian.org]
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH v2] kernel-doc: fix leading dot in man-mode output
2007-05-24 7:59 ` Colin Watson
@ 2007-05-24 15:11 ` Randy Dunlap
0 siblings, 0 replies; 3+ messages in thread
From: Randy Dunlap @ 2007-05-24 15:11 UTC (permalink / raw)
To: Colin Watson; +Cc: linux-kernel, akpm
On Thu, 24 May 2007 08:59:28 +0100 Colin Watson wrote:
> This is a very unusual way to escape leading "." in *roff, and I'm not
> entirely sure the result is defined given that \{ is normally supposed
> to be paired with \} and used to construct blocks. The more conventional
> method would be:
>
> print "\\&$line";
>
> (\& is a zero-width space.)
Hi, and thanks. That's a good change. I appreciate it.
---
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