Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 163628
b: refs/heads/master
c: 6423133
h: refs/heads/master
v: v3
  • Loading branch information
Johannes Weiner authored and Linus Torvalds committed Sep 18, 2009
1 parent 521fb27 commit 64611d9
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 7 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: 27f5de7963f46388932472b660f2f9a86ab58454
refs/heads/master: 6423133bdee0e07d1c2f8411cb3fe676c207ba33
4 changes: 3 additions & 1 deletion trunk/Documentation/kernel-doc-nano-HOWTO.txt
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,9 @@ Example kernel-doc function comment:
* The longer description can have multiple paragraphs.
*/

The first line, with the short description, must be on a single line.
The short description following the subject can span multiple lines
and ends with an @argument description, an empty line or the end of
the comment block.

The @argument descriptions must begin on the very next line following
this opening short function description line, with no intervening
Expand Down
21 changes: 16 additions & 5 deletions trunk/scripts/kernel-doc
Original file line number Diff line number Diff line change
Expand Up @@ -1995,6 +1995,7 @@ sub process_file($) {
my $identifier;
my $func;
my $descr;
my $in_purpose = 0;
my $initial_section_counter = $section_counter;

if (defined($ENV{'SRCTREE'})) {
Expand Down Expand Up @@ -2044,6 +2045,7 @@ sub process_file($) {
$descr =~ s/\s*$//;
$descr =~ s/\s+/ /;
$declaration_purpose = xml_escape($descr);
$in_purpose = 1;
} else {
$declaration_purpose = "";
}
Expand Down Expand Up @@ -2090,6 +2092,7 @@ sub process_file($) {
}

$in_doc_sect = 1;
$in_purpose = 0;
$contents = $newcontents;
if ($contents ne "") {
while ((substr($contents, 0, 1) eq " ") ||
Expand Down Expand Up @@ -2119,11 +2122,19 @@ sub process_file($) {
} elsif (/$doc_content/) {
# miguel-style comment kludge, look for blank lines after
# @parameter line to signify start of description
if ($1 eq "" &&
($section =~ m/^@/ || $section eq $section_context)) {
dump_section($file, $section, xml_escape($contents));
$section = $section_default;
$contents = "";
if ($1 eq "") {
if ($section =~ m/^@/ || $section eq $section_context) {
dump_section($file, $section, xml_escape($contents));
$section = $section_default;
$contents = "";
} else {
$contents .= "\n";
}
$in_purpose = 0;
} elsif ($in_purpose == 1) {
# Continued declaration purpose
chomp($declaration_purpose);
$declaration_purpose .= " " . xml_escape($1);
} else {
$contents .= $1 . "\n";
}
Expand Down

0 comments on commit 64611d9

Please sign in to comment.