Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 47588
b: refs/heads/master
c: a21217d
h: refs/heads/master
v: v3
  • Loading branch information
Randy Dunlap authored and Linus Torvalds committed Feb 11, 2007
1 parent d62812f commit 2fc6ead
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6e8c818829587f001cacae5af4400e4e3aa90a37
refs/heads/master: a21217daae8ce6e841e33d4a2bb24026723cb21d
24 changes: 20 additions & 4 deletions trunk/scripts/kernel-doc
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ sub dump_section {
# parameterlist => @list of parameters
# parameterdescs => %parameter descriptions
# sectionlist => @list of sections
# sections => %descriont descriptions
# sections => %section descriptions
#

sub output_highlight {
Expand Down Expand Up @@ -953,7 +953,11 @@ sub output_function_man(%) {
print $args{'function'}." \\- ".$args{'purpose'}."\n";

print ".SH SYNOPSIS\n";
print ".B \"".$args{'functiontype'}."\" ".$args{'function'}."\n";
if ($args{'functiontype'} ne "") {
print ".B \"".$args{'functiontype'}."\" ".$args{'function'}."\n";
} else {
print ".B \"".$args{'function'}."\n";
}
$count = 0;
my $parenth = "(";
my $post = ",";
Expand Down Expand Up @@ -1118,13 +1122,19 @@ sub output_intro_man(%) {
sub output_function_text(%) {
my %args = %{$_[0]};
my ($parameter, $section);
my $start;

print "Name:\n\n";
print $args{'function'}." - ".$args{'purpose'}."\n";

print "\nSynopsis:\n\n";
my $start=$args{'functiontype'}." ".$args{'function'}." (";
if ($args{'functiontype'} ne "") {
$start = $args{'functiontype'}." ".$args{'function'}." (";
} else {
$start = $args{'function'}." (";
}
print $start;

my $count = 0;
foreach my $parameter (@{$args{'parameterlist'}}) {
$type = $args{'parametertypes'}{$parameter};
Expand Down Expand Up @@ -1710,6 +1720,7 @@ sub process_file($) {
my $file;
my $identifier;
my $func;
my $descr;
my $initial_section_counter = $section_counter;

if (defined($ENV{'SRCTREE'})) {
Expand Down Expand Up @@ -1753,7 +1764,12 @@ sub process_file($) {

$state = 2;
if (/-(.*)/) {
$declaration_purpose = xml_escape($1);
# strip leading/trailing/multiple spaces #RDD:T:
$descr= $1;
$descr =~ s/^\s*//;
$descr =~ s/\s*$//;
$descr =~ s/\s+/ /;
$declaration_purpose = xml_escape($descr);
} else {
$declaration_purpose = "";
}
Expand Down

0 comments on commit 2fc6ead

Please sign in to comment.