kernel-doc (d742f24d6cce67656d93a704563c1594877a4ea0) | kernel-doc (cc794812eba917f271c6a09ac4cb1750497e404c) |
---|---|
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 ## --- 1951 unchanged lines hidden (view full) --- 1960 } else { 1961 # i dont know - bad line? ignore. 1962 print STDERR "${file}:$.: warning: bad line: $_"; 1963 ++$warnings; 1964 } 1965} 1966 1967 | 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 ## --- 1951 unchanged lines hidden (view full) --- 1960 } else { 1961 # i dont know - bad line? ignore. 1962 print STDERR "${file}:$.: warning: bad line: $_"; 1963 ++$warnings; 1964 } 1965} 1966 1967 |
1968# 1969# STATE_PROTO: reading a function/whatever prototype. 1970# 1971sub process_proto($$) { 1972 my $file = shift; 1973 1974 if (/$doc_inline_oneline/) { 1975 $section = $1; 1976 $contents = $2; 1977 if ($contents ne "") { 1978 $contents .= "\n"; 1979 dump_section($file, $section, $contents); 1980 $section = $section_default; 1981 $contents = ""; 1982 } 1983 } elsif (/$doc_inline_start/) { 1984 $state = STATE_INLINE; 1985 $inline_doc_state = STATE_INLINE_NAME; 1986 } elsif ($decl_type eq 'function') { 1987 process_proto_function($_, $file); 1988 } else { 1989 process_proto_type($_, $file); 1990 } 1991} 1992 1993 |
|
1968sub process_file($) { 1969 my $file; 1970 my $func; 1971 my $initial_section_counter = $section_counter; 1972 my ($orig_file) = @_; 1973 1974 $file = map_filename($orig_file); 1975 --- 50 unchanged lines hidden (view full) --- 2026 } 2027 } elsif ($inline_doc_state == STATE_INLINE_NAME) { 2028 $inline_doc_state = STATE_INLINE_ERROR; 2029 print STDERR "${file}:$.: warning: "; 2030 print STDERR "Incorrect use of kernel-doc format: $_"; 2031 ++$warnings; 2032 } 2033 } | 1994sub process_file($) { 1995 my $file; 1996 my $func; 1997 my $initial_section_counter = $section_counter; 1998 my ($orig_file) = @_; 1999 2000 $file = map_filename($orig_file); 2001 --- 50 unchanged lines hidden (view full) --- 2052 } 2053 } elsif ($inline_doc_state == STATE_INLINE_NAME) { 2054 $inline_doc_state = STATE_INLINE_ERROR; 2055 print STDERR "${file}:$.: warning: "; 2056 print STDERR "Incorrect use of kernel-doc format: $_"; 2057 ++$warnings; 2058 } 2059 } |
2034 } elsif ($state == STATE_PROTO) { # scanning for function '{' (end of prototype) 2035 if (/$doc_inline_oneline/) { 2036 $section = $1; 2037 $contents = $2; 2038 if ($contents ne "") { 2039 $contents .= "\n"; 2040 dump_section($file, $section, $contents); 2041 $section = $section_default; 2042 $contents = ""; 2043 } 2044 } elsif (/$doc_inline_start/) { 2045 $state = STATE_INLINE; 2046 $inline_doc_state = STATE_INLINE_NAME; 2047 } elsif ($decl_type eq 'function') { 2048 process_proto_function($_, $file); 2049 } else { 2050 process_proto_type($_, $file); 2051 } | 2060 } elsif ($state == STATE_PROTO) { 2061 process_proto($file, $_); |
2052 } elsif ($state == STATE_DOCBLOCK) { 2053 if (/$doc_end/) 2054 { 2055 dump_doc_section($file, $section, $contents); 2056 $section = $section_default; 2057 $contents = ""; 2058 $function = ""; 2059 %parameterdescs = (); --- 78 unchanged lines hidden --- | 2062 } elsif ($state == STATE_DOCBLOCK) { 2063 if (/$doc_end/) 2064 { 2065 dump_doc_section($file, $section, $contents); 2066 $section = $section_default; 2067 $contents = ""; 2068 $function = ""; 2069 %parameterdescs = (); --- 78 unchanged lines hidden --- |