kernel-doc (93351d4196802b3ee01074d96df47b73716984ba) | kernel-doc (5ef09c96d48b41a55121df1b57404f68d7e4e5f1) |
---|---|
1#!/usr/bin/env perl 2# SPDX-License-Identifier: GPL-2.0 3 4use warnings; 5use strict; 6 7## Copyright (c) 1998 Michael Zucchi, All Rights Reserved ## 8## Copyright (C) 2000, 1 Tim Waugh <twaugh@redhat.com> ## --- 1691 unchanged lines hidden (view full) --- 1700# takes a function prototype and the name of the current file being 1701# processed and spits out all the details stored in the global 1702# arrays/hashes. 1703sub dump_function($$) { 1704 my $prototype = shift; 1705 my $file = shift; 1706 my $noret = 0; 1707 | 1#!/usr/bin/env perl 2# SPDX-License-Identifier: GPL-2.0 3 4use warnings; 5use strict; 6 7## Copyright (c) 1998 Michael Zucchi, All Rights Reserved ## 8## Copyright (C) 2000, 1 Tim Waugh <twaugh@redhat.com> ## --- 1691 unchanged lines hidden (view full) --- 1700# takes a function prototype and the name of the current file being 1701# processed and spits out all the details stored in the global 1702# arrays/hashes. 1703sub dump_function($$) { 1704 my $prototype = shift; 1705 my $file = shift; 1706 my $noret = 0; 1707 |
1708 print_lineno($.); | 1708 print_lineno($new_start_line); |
1709 1710 $prototype =~ s/^static +//; 1711 $prototype =~ s/^extern +//; 1712 $prototype =~ s/^asmlinkage +//; 1713 $prototype =~ s/^inline +//; 1714 $prototype =~ s/^__inline__ +//; 1715 $prototype =~ s/^__inline +//; 1716 $prototype =~ s/^__always_inline +//; --- 311 unchanged lines hidden (view full) --- 2028sub process_name($$) { 2029 my $file = shift; 2030 my $identifier; 2031 my $descr; 2032 2033 if (/$doc_block/o) { 2034 $state = STATE_DOCBLOCK; 2035 $contents = ""; | 1709 1710 $prototype =~ s/^static +//; 1711 $prototype =~ s/^extern +//; 1712 $prototype =~ s/^asmlinkage +//; 1713 $prototype =~ s/^inline +//; 1714 $prototype =~ s/^__inline__ +//; 1715 $prototype =~ s/^__inline +//; 1716 $prototype =~ s/^__always_inline +//; --- 311 unchanged lines hidden (view full) --- 2028sub process_name($$) { 2029 my $file = shift; 2030 my $identifier; 2031 my $descr; 2032 2033 if (/$doc_block/o) { 2034 $state = STATE_DOCBLOCK; 2035 $contents = ""; |
2036 $new_start_line = $. + 1; | 2036 $new_start_line = $.; |
2037 2038 if ( $1 eq "" ) { 2039 $section = $section_intro; 2040 } else { 2041 $section = $1; 2042 } 2043 } 2044 elsif (/$doc_decl/o) { --- 66 unchanged lines hidden (view full) --- 2111 print STDERR "${file}:$.: warning: Variable macro arguments should be documented without dots\n"; 2112 ++$warnings; 2113 } 2114 } 2115 2116 if ($state == STATE_BODY_WITH_BLANK_LINE && /^\s*\*\s?\S/) { 2117 dump_section($file, $section, $contents); 2118 $section = $section_default; | 2037 2038 if ( $1 eq "" ) { 2039 $section = $section_intro; 2040 } else { 2041 $section = $1; 2042 } 2043 } 2044 elsif (/$doc_decl/o) { --- 66 unchanged lines hidden (view full) --- 2111 print STDERR "${file}:$.: warning: Variable macro arguments should be documented without dots\n"; 2112 ++$warnings; 2113 } 2114 } 2115 2116 if ($state == STATE_BODY_WITH_BLANK_LINE && /^\s*\*\s?\S/) { 2117 dump_section($file, $section, $contents); 2118 $section = $section_default; |
2119 $new_start_line = $.; |
|
2119 $contents = ""; 2120 } 2121 2122 if (/$doc_sect/i) { # case insensitive for supported section names 2123 $newsection = $1; 2124 $newcontents = $2; 2125 2126 # map the supported section names to the canonical names --- 39 unchanged lines hidden (view full) --- 2166 if ($_ =~ m'\s*\*\s*[a-zA-Z_0-9:\.]+\*/') { 2167 print STDERR "${file}:$.: warning: suspicious ending line: $_"; 2168 ++$warnings; 2169 } 2170 2171 $prototype = ""; 2172 $state = STATE_PROTO; 2173 $brcount = 0; | 2120 $contents = ""; 2121 } 2122 2123 if (/$doc_sect/i) { # case insensitive for supported section names 2124 $newsection = $1; 2125 $newcontents = $2; 2126 2127 # map the supported section names to the canonical names --- 39 unchanged lines hidden (view full) --- 2167 if ($_ =~ m'\s*\*\s*[a-zA-Z_0-9:\.]+\*/') { 2168 print STDERR "${file}:$.: warning: suspicious ending line: $_"; 2169 ++$warnings; 2170 } 2171 2172 $prototype = ""; 2173 $state = STATE_PROTO; 2174 $brcount = 0; |
2175 $new_start_line = $. + 1; |
|
2174 } elsif (/$doc_content/) { 2175 if ($1 eq "") { 2176 if ($section eq $section_context) { 2177 dump_section($file, $section, $contents); 2178 $section = $section_default; 2179 $contents = ""; 2180 $new_start_line = $.; 2181 $state = STATE_BODY; --- 242 unchanged lines hidden --- | 2176 } elsif (/$doc_content/) { 2177 if ($1 eq "") { 2178 if ($section eq $section_context) { 2179 dump_section($file, $section, $contents); 2180 $section = $section_default; 2181 $contents = ""; 2182 $new_start_line = $.; 2183 $state = STATE_BODY; --- 242 unchanged lines hidden --- |