kernel-doc (eab795ddd84ffdb1c67250062d01a81be20bb208) | kernel-doc (47bcacfd2b00e3795eac3faf47eb854eb9675a4f) |
---|---|
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> ## --- 1734 unchanged lines hidden (view full) --- 1743 my $args = $3; 1744 1745 create_parameterlist($args, ',', $file, $declaration_name); 1746 } else { 1747 print STDERR "${file}:$.: warning: cannot understand function prototype: '$prototype'\n"; 1748 return; 1749 } 1750 | 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> ## --- 1734 unchanged lines hidden (view full) --- 1743 my $args = $3; 1744 1745 create_parameterlist($args, ',', $file, $declaration_name); 1746 } else { 1747 print STDERR "${file}:$.: warning: cannot understand function prototype: '$prototype'\n"; 1748 return; 1749 } 1750 |
1751 my $prms = join " ", @parameterlist; 1752 check_sections($file, $declaration_name, "function", $sectcheck, $prms); | 1751 my $prms = join " ", @parameterlist; 1752 check_sections($file, $declaration_name, "function", $sectcheck, $prms); |
1753 | 1753 |
1754 # This check emits a lot of warnings at the moment, because many 1755 # functions don't have a 'Return' doc section. So until the number 1756 # of warnings goes sufficiently down, the check is only performed in 1757 # verbose mode. 1758 # TODO: always perform the check. 1759 if ($verbose && !$noret) { 1760 check_return_section($file, $declaration_name, $return_type); 1761 } | 1754 # This check emits a lot of warnings at the moment, because many 1755 # functions don't have a 'Return' doc section. So until the number 1756 # of warnings goes sufficiently down, the check is only performed in 1757 # verbose mode. 1758 # TODO: always perform the check. 1759 if ($verbose && !$noret) { 1760 check_return_section($file, $declaration_name, $return_type); 1761 } |
1762 | 1762 |
1763 output_declaration($declaration_name, 1764 'function', 1765 {'function' => $declaration_name, 1766 'module' => $modulename, 1767 'functiontype' => $return_type, 1768 'parameterlist' => \@parameterlist, 1769 'parameterdescs' => \%parameterdescs, 1770 'parametertypes' => \%parametertypes, 1771 'sectionlist' => \@sectionlist, 1772 'sections' => \%sections, 1773 'purpose' => $declaration_purpose 1774 }); | 1763 # The function parser can be called with a typedef parameter. 1764 # Handle it. 1765 if ($return_type =~ /typedef/) { 1766 output_declaration($declaration_name, 1767 'function', 1768 {'function' => $declaration_name, 1769 'typedef' => 1, 1770 'module' => $modulename, 1771 'functiontype' => $return_type, 1772 'parameterlist' => \@parameterlist, 1773 'parameterdescs' => \%parameterdescs, 1774 'parametertypes' => \%parametertypes, 1775 'sectionlist' => \@sectionlist, 1776 'sections' => \%sections, 1777 'purpose' => $declaration_purpose 1778 }); 1779 } else { 1780 output_declaration($declaration_name, 1781 'function', 1782 {'function' => $declaration_name, 1783 'module' => $modulename, 1784 'functiontype' => $return_type, 1785 'parameterlist' => \@parameterlist, 1786 'parameterdescs' => \%parameterdescs, 1787 'parametertypes' => \%parametertypes, 1788 'sectionlist' => \@sectionlist, 1789 'sections' => \%sections, 1790 'purpose' => $declaration_purpose 1791 }); 1792 } |
1775} 1776 1777sub reset_state { 1778 $function = ""; 1779 %parameterdescs = (); 1780 %parametertypes = (); 1781 @parameterlist = (); 1782 %sections = (); --- 586 unchanged lines hidden --- | 1793} 1794 1795sub reset_state { 1796 $function = ""; 1797 %parameterdescs = (); 1798 %parametertypes = (); 1799 @parameterlist = (); 1800 %sections = (); --- 586 unchanged lines hidden --- |