Skip to contentSkip to conversation

kernel-doc: include struct short description in title output

PATCH Superseded Randy Dunlap 2 participants 4 messages Feb 13, 2007

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kernel-doc: include struct short description in title output

From: Randy Dunlap <[email protected]>

Output of a struct in html mode needs to include the short description from the struct name line in the output title line.

---
 scripts/kernel-doc |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/kernel-doc +1 -1
@@ -452,7 +452,7 @@ sub output_struct_html(%) {
     my %args = %{$_[0]};
     my ($parameter);
 
-    print "<h2>".$args{'type'}." ".$args{'struct'}."</h2>\n";
+    print "<h2>".$args{'type'}." ".$args{'struct'}. " - " .$args{'purpose'}."</h2>\n";
     print "<b>".$args{'type'}." ".$args{'struct'}."</b> {<br>\n";
     foreach $parameter (@{$args{'parameterlist'}}) {
 	if ($parameter =~ /^#/) {
#1 lore raw
Quoted 4 lines · Randy Dunlap

From: Randy Dunlap <[email protected]>

Output of a struct in html mode needs to include the short description from the struct name line in the output title line.

Yup, that fixes it for structs. I guess I forgot to mention this earlier because I didn't notice it until now... the same bug exists for functions as well.

And apparently I never looked at the output for my description for pm_set_ops.... maybe (hopefully!) it'll teach me to be more careful next time.

johannes

#2 lore raw

PATCH v2 1/1 kernel-doc: include struct short description in title output

Quoted 3 lines

Yup, that fixes it for structs. I guess I forgot to mention this earlier because I didn't notice it until now... the same bug exists for functions as well.

updated patch. Thanks.
---

From: Randy Dunlap <[email protected]>

Output of a function or struct in html mode needs to include the short description from the function/struct name line in the output title line.

---
 scripts/kernel-doc |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
scripts/kernel-doc +2 -2
@@ -452,7 +452,7 @@ sub output_struct_html(%) {
     my %args = %{$_[0]};
     my ($parameter);
 
-    print "<h2>".$args{'type'}." ".$args{'struct'}."</h2>\n";
+    print "<h2>".$args{'type'}." ".$args{'struct'}. " - " .$args{'purpose'}."</h2>\n";
     print "<b>".$args{'type'}." ".$args{'struct'}."</b> {<br>\n";
     foreach $parameter (@{$args{'parameterlist'}}) {
 	if ($parameter =~ /^#/) {
@@ -498,8 +498,8 @@ sub output_function_html(%) {
     my %args = %{$_[0]};
     my ($parameter, $section);
     my $count;
-    print "<h2>Function</h2>\n";
 
+    print "<h2>" .$args{'function'}." - ".$args{'purpose'}."</h2>\n";
     print "<i>".$args{'functiontype'}."</i>\n";
     print "<b>".$args{'function'}."</b>\n";
     print "(";
Acked-by on v2 1/1
#3 lore raw
Quoted 5 lines · Randy Dunlap
Quoted 3 lines

Yup, that fixes it for structs. I guess I forgot to mention this earlier because I didn't notice it until now... the same bug exists for functions as well.

updated patch. Thanks.

Thanks, works great.

Quoted 8 lines

---

From: Randy Dunlap <[email protected]>

Output of a function or struct in html mode needs to include the short description from the function/struct name line in the output title line.

So if anyone cares:

Quoted 26 lines
---
 scripts/kernel-doc |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
scripts/kernel-doc +2 -2
@@ -452,7 +452,7 @@ sub output_struct_html(%) {
     my %args = %{$_[0]};
     my ($parameter);
 
-    print "<h2>".$args{'type'}." ".$args{'struct'}."</h2>\n";
+    print "<h2>".$args{'type'}." ".$args{'struct'}. " - " .$args{'purpose'}."</h2>\n";
     print "<b>".$args{'type'}." ".$args{'struct'}."</b> {<br>\n";
     foreach $parameter (@{$args{'parameterlist'}}) {
 	if ($parameter =~ /^#/) {
@@ -498,8 +498,8 @@ sub output_function_html(%) {
     my %args = %{$_[0]};
     my ($parameter, $section);
     my $count;
-    print "<h2>Function</h2>\n";
 
+    print "<h2>" .$args{'function'}." - ".$args{'purpose'}."</h2>\n";
     print "<i>".$args{'functiontype'}."</i>\n";
     print "<b>".$args{'function'}."</b>\n";
     print "(";