* [PATCH] kernel-doc: make parameter description indentation uniform
@ 2006-10-09 5:00 Randy Dunlap
0 siblings, 0 replies; only message in thread
From: Randy Dunlap @ 2006-10-09 5:00 UTC (permalink / raw)
To: lkml; +Cc: akpm
From: Randy Dunlap <rdunlap@xenotime.net>
- In parameter descriptions, strip all whitespace between the parameter
name (e.g., @len) and its description so that the description is
indented uniformly in text and man page modes. Previously, spaces
or tabs (which are used for cleaner source code viewing) affected
the produced output in a negative way.
Before (man mode):
to Destination address, in user space.
from Source address, in kernel space.
n Number of bytes to copy.
After (man mode):
to Destination address, in user space.
from Source address, in kernel space.
n Number of bytes to copy.
- Fix/clarify a few function description comments.
Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
---
scripts/kernel-doc | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
--- linux-2619-rc1g3.orig/scripts/kernel-doc
+++ linux-2619-rc1g3/scripts/kernel-doc
@@ -1262,7 +1262,9 @@ sub output_intro_text(%) {
}
##
-# generic output function for typedefs
+# generic output function for all types (function, struct/union, typedef, enum);
+# calls the generated, variable output_ function name based on
+# functype and output_mode
sub output_declaration {
no strict 'refs';
my $name = shift;
@@ -1278,8 +1280,7 @@ sub output_declaration {
}
##
-# generic output function - calls the right one based
-# on current output mode.
+# generic output function - calls the right one based on current output mode.
sub output_intro {
no strict 'refs';
my $func = "output_intro_".$output_mode;
@@ -1782,8 +1783,9 @@ sub process_file($) {
$in_doc_sect = 1;
$contents = $newcontents;
if ($contents ne "") {
- if (substr($contents, 0, 1) eq " ") {
- $contents = substr($contents, 1);
+ while ((substr($contents, 0, 1) eq " ") ||
+ substr($contents, 0, 1) eq "\t") {
+ $contents = substr($contents, 1);
}
$contents .= "\n";
}
---
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2006-10-09 4:59 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-10-09 5:00 [PATCH] kernel-doc: make parameter description indentation uniform Randy Dunlap
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®