kernel-doc (17b787171e693778eb9246978ad6116e52fa692c) | kernel-doc (07048d13136bc068efb20e1d3e372577c2ef6906) |
---|---|
1#!/usr/bin/env perl 2 3use warnings; 4use strict; 5 6## Copyright (c) 1998 Michael Zucchi, All Rights Reserved ## 7## Copyright (C) 2000, 1 Tim Waugh <twaugh@redhat.com> ## 8## Copyright (C) 2001 Simon Huggins ## --- 1766 unchanged lines hidden (view full) --- 1775 if (/$export_symbol/) { 1776 $function_table{$2} = 1; 1777 } 1778 } 1779 1780 close(IN); 1781} 1782 | 1#!/usr/bin/env perl 2 3use warnings; 4use strict; 5 6## Copyright (c) 1998 Michael Zucchi, All Rights Reserved ## 7## Copyright (C) 2000, 1 Tim Waugh <twaugh@redhat.com> ## 8## Copyright (C) 2001 Simon Huggins ## --- 1766 unchanged lines hidden (view full) --- 1775 if (/$export_symbol/) { 1776 $function_table{$2} = 1; 1777 } 1778 } 1779 1780 close(IN); 1781} 1782 |
1783# 1784# Parsers for the various processing states. 1785# 1786# STATE_NORMAL: looking for the /** to begin everything. 1787# 1788sub process_normal() { 1789 if (/$doc_start/o) { 1790 $state = STATE_NAME; # next line is always the function name 1791 $in_doc_sect = 0; 1792 $declaration_start_line = $. + 1; 1793 } 1794} 1795 1796 1797 |
|
1783sub process_file($) { 1784 my $file; 1785 my $identifier; 1786 my $func; 1787 my $descr; 1788 my $initial_section_counter = $section_counter; 1789 my ($orig_file) = @_; 1790 my $leading_space; --- 11 unchanged lines hidden (view full) --- 1802 $section_counter = 0; 1803 while (<IN>) { 1804 while (s/\\\s*$//) { 1805 $_ .= <IN>; 1806 } 1807 # Replace tabs by spaces 1808 while ($_ =~ s/\t+/' ' x (length($&) * 8 - length($`) % 8)/e) {}; 1809 if ($state == STATE_NORMAL) { | 1798sub process_file($) { 1799 my $file; 1800 my $identifier; 1801 my $func; 1802 my $descr; 1803 my $initial_section_counter = $section_counter; 1804 my ($orig_file) = @_; 1805 my $leading_space; --- 11 unchanged lines hidden (view full) --- 1817 $section_counter = 0; 1818 while (<IN>) { 1819 while (s/\\\s*$//) { 1820 $_ .= <IN>; 1821 } 1822 # Replace tabs by spaces 1823 while ($_ =~ s/\t+/' ' x (length($&) * 8 - length($`) % 8)/e) {}; 1824 if ($state == STATE_NORMAL) { |
1810 if (/$doc_start/o) { 1811 $state = STATE_NAME; # next line is always the function name 1812 $in_doc_sect = 0; 1813 $declaration_start_line = $. + 1; 1814 } | 1825 process_normal(); |
1815 } elsif ($state == STATE_NAME) {# this line is the function name (always) 1816 if (/$doc_block/o) { 1817 $state = STATE_DOCBLOCK; 1818 $contents = ""; 1819 $new_start_line = $. + 1; 1820 1821 if ( $1 eq "" ) { 1822 $section = $section_intro; --- 288 unchanged lines hidden --- | 1826 } elsif ($state == STATE_NAME) {# this line is the function name (always) 1827 if (/$doc_block/o) { 1828 $state = STATE_DOCBLOCK; 1829 $contents = ""; 1830 $new_start_line = $. + 1; 1831 1832 if ( $1 eq "" ) { 1833 $section = $section_intro; --- 288 unchanged lines hidden --- |