From 97a7fedace18d569a38a7fdae910fbc60fd8390a Mon Sep 17 00:00:00 2001 From: Randy Dunlap Date: Sun, 25 Jun 2006 05:48:55 -0700 Subject: [PATCH] --- yaml --- r: 29781 b: refs/heads/master c: 850622dfaf3d62907c96707773e0f8e84b3c0c06 h: refs/heads/master i: 29779: fb34825f5640432cdc12a16d9379669f35e0f2cc v: v3 --- [refs] | 2 +- trunk/scripts/kernel-doc | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 76e30eb18500..f75a6fcfaf22 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 9c8ef5614da22666e339b125263d315cfaa89109 +refs/heads/master: 850622dfaf3d62907c96707773e0f8e84b3c0c06 diff --git a/trunk/scripts/kernel-doc b/trunk/scripts/kernel-doc index 21f2f3fee745..351def5c6b8f 100755 --- a/trunk/scripts/kernel-doc +++ b/trunk/scripts/kernel-doc @@ -253,6 +253,7 @@ my $lineprefix=""; # 3 - scanning prototype. # 4 - documentation block my $state; +my $in_doc_sect; #declaration types: can be # 'function', 'struct', 'union', 'enum', 'typedef' @@ -1706,6 +1707,7 @@ sub process_file($) { if ($state == 0) { if (/$doc_start/o) { $state = 1; # next line is always the function name + $in_doc_sect = 0; } } elsif ($state == 1) { # this line is the function name (always) if (/$doc_block/o) { @@ -1756,10 +1758,15 @@ sub process_file($) { $newcontents = $2; if ($contents ne "") { + if (!$in_doc_sect && $verbose) { + print STDERR "Warning(${file}:$.): contents before sections\n"; + ++$warnings; + } dump_section($section, xml_escape($contents)); $section = $section_default; } + $in_doc_sect = 1; $contents = $newcontents; if ($contents ne "") { if (substr($contents, 0, 1) eq " ") {