aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/kernel-doc21
1 files changed, 16 insertions, 5 deletions
diff --git a/scripts/kernel-doc b/scripts/kernel-doc
index b52d340d759d..ea9f8a58678f 100755
--- a/scripts/kernel-doc
+++ b/scripts/kernel-doc
@@ -1995,6 +1995,7 @@ sub process_file($) {
1995 my $identifier; 1995 my $identifier;
1996 my $func; 1996 my $func;
1997 my $descr; 1997 my $descr;
1998 my $in_purpose = 0;
1998 my $initial_section_counter = $section_counter; 1999 my $initial_section_counter = $section_counter;
1999 2000
2000 if (defined($ENV{'SRCTREE'})) { 2001 if (defined($ENV{'SRCTREE'})) {
@@ -2044,6 +2045,7 @@ sub process_file($) {
2044 $descr =~ s/\s*$//; 2045 $descr =~ s/\s*$//;
2045 $descr =~ s/\s+/ /; 2046 $descr =~ s/\s+/ /;
2046 $declaration_purpose = xml_escape($descr); 2047 $declaration_purpose = xml_escape($descr);
2048 $in_purpose = 1;
2047 } else { 2049 } else {
2048 $declaration_purpose = ""; 2050 $declaration_purpose = "";
2049 } 2051 }
@@ -2090,6 +2092,7 @@ sub process_file($) {
2090 } 2092 }
2091 2093
2092 $in_doc_sect = 1; 2094 $in_doc_sect = 1;
2095 $in_purpose = 0;
2093 $contents = $newcontents; 2096 $contents = $newcontents;
2094 if ($contents ne "") { 2097 if ($contents ne "") {
2095 while ((substr($contents, 0, 1) eq " ") || 2098 while ((substr($contents, 0, 1) eq " ") ||
@@ -2119,11 +2122,19 @@ sub process_file($) {
2119 } elsif (/$doc_content/) { 2122 } elsif (/$doc_content/) {
2120 # miguel-style comment kludge, look for blank lines after 2123 # miguel-style comment kludge, look for blank lines after
2121 # @parameter line to signify start of description 2124 # @parameter line to signify start of description
2122 if ($1 eq "" && 2125 if ($1 eq "") {
2123 ($section =~ m/^@/ || $section eq $section_context)) { 2126 if ($section =~ m/^@/ || $section eq $section_context) {
2124 dump_section($file, $section, xml_escape($contents)); 2127 dump_section($file, $section, xml_escape($contents));
2125 $section = $section_default; 2128 $section = $section_default;
2126 $contents = ""; 2129 $contents = "";
2130 } else {
2131 $contents .= "\n";
2132 }
2133 $in_purpose = 0;
2134 } elsif ($in_purpose == 1) {
2135 # Continued declaration purpose
2136 chomp($declaration_purpose);
2137 $declaration_purpose .= " " . xml_escape($1);
2127 } else { 2138 } else {
2128 $contents .= $1 . "\n"; 2139 $contents .= $1 . "\n";
2129 } 2140 }