aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorRandy.Dunlap <rdunlap@xenotime.net>2006-07-01 07:36:34 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-07-01 12:56:04 -0400
commit1d7e1d4517f11ebeb80f92e227c8fdbc3215385c (patch)
tree8512de18d137a976eb056b2c5d4ccd66e2949b79 /scripts
parentdd535a5965cef7551da34aef5cec47f46e97b6d9 (diff)
[PATCH] kernel-doc: consistent text/man mode output
Add a space between data type and struct field name in man-mode bitfield struct output so that they don't run together. For text-mode struct output, print the struct 'purpose' or short description (as done in man-mode output). For text-mode enum output, print the enum 'purpose' or short description (as done in man-mode output). For text-mode typedef output, print the typedef 'purpose' or short description (as done in man-mode output). Signed-off-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/kernel-doc8
1 files changed, 5 insertions, 3 deletions
diff --git a/scripts/kernel-doc b/scripts/kernel-doc
index 00e21297aefe..0514e2505f7e 100755
--- a/scripts/kernel-doc
+++ b/scripts/kernel-doc
@@ -1056,7 +1056,8 @@ sub output_struct_man(%) {
1056 # pointer-to-function 1056 # pointer-to-function
1057 print ".BI \" ".$1."\" ".$parameter." \") (".$2.")"."\"\n;\n"; 1057 print ".BI \" ".$1."\" ".$parameter." \") (".$2.")"."\"\n;\n";
1058 } elsif ($type =~ m/^(.*?)\s*(:.*)/) { 1058 } elsif ($type =~ m/^(.*?)\s*(:.*)/) {
1059 print ".BI \" ".$1."\" ".$parameter.$2." \""."\"\n;\n"; 1059 # bitfield
1060 print ".BI \" ".$1."\ \" ".$parameter.$2." \""."\"\n;\n";
1060 } else { 1061 } else {
1061 $type =~ s/([^\*])$/$1 /; 1062 $type =~ s/([^\*])$/$1 /;
1062 print ".BI \" ".$type."\" ".$parameter." \""."\"\n;\n"; 1063 print ".BI \" ".$type."\" ".$parameter." \""."\"\n;\n";
@@ -1169,6 +1170,7 @@ sub output_enum_text(%) {
1169 my $count; 1170 my $count;
1170 print "Enum:\n\n"; 1171 print "Enum:\n\n";
1171 1172
1173 print "enum ".$args{'enum'}." - ".$args{'purpose'}."\n\n";
1172 print "enum ".$args{'enum'}." {\n"; 1174 print "enum ".$args{'enum'}." {\n";
1173 $count = 0; 1175 $count = 0;
1174 foreach $parameter (@{$args{'parameterlist'}}) { 1176 foreach $parameter (@{$args{'parameterlist'}}) {
@@ -1197,7 +1199,7 @@ sub output_typedef_text(%) {
1197 my $count; 1199 my $count;
1198 print "Typedef:\n\n"; 1200 print "Typedef:\n\n";
1199 1201
1200 print "typedef ".$args{'typedef'}."\n"; 1202 print "typedef ".$args{'typedef'}." - ".$args{'purpose'}."\n";
1201 output_section_text(@_); 1203 output_section_text(@_);
1202} 1204}
1203 1205
@@ -1206,7 +1208,7 @@ sub output_struct_text(%) {
1206 my %args = %{$_[0]}; 1208 my %args = %{$_[0]};
1207 my ($parameter); 1209 my ($parameter);
1208 1210
1209 print $args{'type'}." ".$args{'struct'}.":\n\n"; 1211 print $args{'type'}." ".$args{'struct'}." - ".$args{'purpose'}."\n\n";
1210 print $args{'type'}." ".$args{'struct'}." {\n"; 1212 print $args{'type'}." ".$args{'struct'}." {\n";
1211 foreach $parameter (@{$args{'parameterlist'}}) { 1213 foreach $parameter (@{$args{'parameterlist'}}) {
1212 if ($parameter =~ /^#/) { 1214 if ($parameter =~ /^#/) {