kernel-doc (ebff7f929b2a72fa614f5e95fd34c56c82ac9c36) | kernel-doc (b7afa92b55043b71a37a2f658553d3e260859859) |
---|---|
1#!/usr/bin/perl -w 2 3use strict; 4 5## Copyright (c) 1998 Michael Zucchi, All Rights Reserved ## 6## Copyright (C) 2000, 1 Tim Waugh <twaugh@redhat.com> ## 7## Copyright (C) 2001 Simon Huggins ## 8## Copyright (C) 2005-2012 Randy Dunlap ## --- 2579 unchanged lines hidden (view full) --- 2588 $count++; 2589 if ($count % 2 == 1) { 2590 substr($prototype, $ix, 1) = ' '; 2591 } 2592 } 2593 } 2594} 2595 | 1#!/usr/bin/perl -w 2 3use strict; 4 5## Copyright (c) 1998 Michael Zucchi, All Rights Reserved ## 6## Copyright (C) 2000, 1 Tim Waugh <twaugh@redhat.com> ## 7## Copyright (C) 2001 Simon Huggins ## 8## Copyright (C) 2005-2012 Randy Dunlap ## --- 2579 unchanged lines hidden (view full) --- 2588 $count++; 2589 if ($count % 2 == 1) { 2590 substr($prototype, $ix, 1) = ' '; 2591 } 2592 } 2593 } 2594} 2595 |
2596sub process_state3_function($$) { | 2596sub process_proto_function($$) { |
2597 my $x = shift; 2598 my $file = shift; 2599 2600 $x =~ s@\/\/.*$@@gos; # strip C99-style comments to end of line 2601 2602 if ($x =~ m#\s*/\*\s+MACDOC\s*#io || ($x =~ /^#/ && $x !~ /^#\s*define/)) { 2603 # do nothing 2604 } --- 13 unchanged lines hidden (view full) --- 2618 { 2619 tracepoint_munge($file); 2620 } 2621 dump_function($prototype, $file); 2622 reset_state(); 2623 } 2624} 2625 | 2597 my $x = shift; 2598 my $file = shift; 2599 2600 $x =~ s@\/\/.*$@@gos; # strip C99-style comments to end of line 2601 2602 if ($x =~ m#\s*/\*\s+MACDOC\s*#io || ($x =~ /^#/ && $x !~ /^#\s*define/)) { 2603 # do nothing 2604 } --- 13 unchanged lines hidden (view full) --- 2618 { 2619 tracepoint_munge($file); 2620 } 2621 dump_function($prototype, $file); 2622 reset_state(); 2623 } 2624} 2625 |
2626sub process_state3_type($$) { | 2626sub process_proto_type($$) { |
2627 my $x = shift; 2628 my $file = shift; 2629 2630 $x =~ s@[\r\n]+@ @gos; # strip newlines/cr's. 2631 $x =~ s@^\s+@@gos; # strip leading spaces 2632 $x =~ s@\s+$@@gos; # strip trailing spaces 2633 $x =~ s@\/\/.*$@@gos; # strip C99-style comments to end of line 2634 --- 297 unchanged lines hidden (view full) --- 2932 ++$warnings; 2933 } 2934 } 2935 } elsif ($state == STATE_PROTO) { # scanning for function '{' (end of prototype) 2936 if (/$doc_inline_start/) { 2937 $state = STATE_INLINE; 2938 $inline_doc_state = STATE_INLINE_NAME; 2939 } elsif ($decl_type eq 'function') { | 2627 my $x = shift; 2628 my $file = shift; 2629 2630 $x =~ s@[\r\n]+@ @gos; # strip newlines/cr's. 2631 $x =~ s@^\s+@@gos; # strip leading spaces 2632 $x =~ s@\s+$@@gos; # strip trailing spaces 2633 $x =~ s@\/\/.*$@@gos; # strip C99-style comments to end of line 2634 --- 297 unchanged lines hidden (view full) --- 2932 ++$warnings; 2933 } 2934 } 2935 } elsif ($state == STATE_PROTO) { # scanning for function '{' (end of prototype) 2936 if (/$doc_inline_start/) { 2937 $state = STATE_INLINE; 2938 $inline_doc_state = STATE_INLINE_NAME; 2939 } elsif ($decl_type eq 'function') { |
2940 process_state3_function($_, $file); | 2940 process_proto_function($_, $file); |
2941 } else { | 2941 } else { |
2942 process_state3_type($_, $file); | 2942 process_proto_type($_, $file); |
2943 } 2944 } elsif ($state == STATE_DOCBLOCK) { 2945 if (/$doc_end/) 2946 { 2947 dump_doc_section($file, $section, xml_escape($contents)); 2948 $section = $section_default; 2949 $contents = ""; 2950 $function = ""; --- 94 unchanged lines hidden --- | 2943 } 2944 } elsif ($state == STATE_DOCBLOCK) { 2945 if (/$doc_end/) 2946 { 2947 dump_doc_section($file, $section, xml_escape($contents)); 2948 $section = $section_default; 2949 $contents = ""; 2950 $function = ""; --- 94 unchanged lines hidden --- |