kernel-doc (0a7263014b3a0e05b52ccef314e2ccf6f4550a8b) kernel-doc (b7886de43c9f8a19685cd6e81135de63b9529911)
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 ##

--- 2687 unchanged lines hidden (view full) ---

2696sub process_file($) {
2697 my $file;
2698 my $identifier;
2699 my $func;
2700 my $descr;
2701 my $in_purpose = 0;
2702 my $initial_section_counter = $section_counter;
2703 my ($orig_file) = @_;
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 ##

--- 2687 unchanged lines hidden (view full) ---

2696sub process_file($) {
2697 my $file;
2698 my $identifier;
2699 my $func;
2700 my $descr;
2701 my $in_purpose = 0;
2702 my $initial_section_counter = $section_counter;
2703 my ($orig_file) = @_;
2704 my $leading_space;
2704
2705 if (defined($ENV{'SRCTREE'})) {
2706 $file = "$ENV{'SRCTREE'}" . "/" . $orig_file;
2707 }
2708 else {
2709 $file = $orig_file;
2710 }
2711 if (defined($source_map{$file})) {

--- 105 unchanged lines hidden (view full) ---

2817 while ((substr($contents, 0, 1) eq " ") ||
2818 substr($contents, 0, 1) eq "\t") {
2819 $contents = substr($contents, 1);
2820 }
2821 if ($contents ne "") {
2822 $contents .= "\n";
2823 }
2824 $section = $newsection;
2705
2706 if (defined($ENV{'SRCTREE'})) {
2707 $file = "$ENV{'SRCTREE'}" . "/" . $orig_file;
2708 }
2709 else {
2710 $file = $orig_file;
2711 }
2712 if (defined($source_map{$file})) {

--- 105 unchanged lines hidden (view full) ---

2818 while ((substr($contents, 0, 1) eq " ") ||
2819 substr($contents, 0, 1) eq "\t") {
2820 $contents = substr($contents, 1);
2821 }
2822 if ($contents ne "") {
2823 $contents .= "\n";
2824 }
2825 $section = $newsection;
2826 $leading_space = undef;
2825 } elsif (/$doc_end/) {
2826 if (($contents ne "") && ($contents ne "\n")) {
2827 dump_section($file, $section, xml_escape($contents));
2828 $section = $section_default;
2829 $contents = "";
2830 }
2831 # look for doc_com + <text> + doc_end:
2832 if ($_ =~ m'\s*\*\s*[a-zA-Z_0-9:\.]+\*/') {

--- 18 unchanged lines hidden (view full) ---

2851 }
2852 $in_purpose = 0;
2853 } elsif ($in_purpose == 1) {
2854 # Continued declaration purpose
2855 chomp($declaration_purpose);
2856 $declaration_purpose .= " " . xml_escape($1);
2857 $declaration_purpose =~ s/\s+/ /g;
2858 } else {
2827 } elsif (/$doc_end/) {
2828 if (($contents ne "") && ($contents ne "\n")) {
2829 dump_section($file, $section, xml_escape($contents));
2830 $section = $section_default;
2831 $contents = "";
2832 }
2833 # look for doc_com + <text> + doc_end:
2834 if ($_ =~ m'\s*\*\s*[a-zA-Z_0-9:\.]+\*/') {

--- 18 unchanged lines hidden (view full) ---

2853 }
2854 $in_purpose = 0;
2855 } elsif ($in_purpose == 1) {
2856 # Continued declaration purpose
2857 chomp($declaration_purpose);
2858 $declaration_purpose .= " " . xml_escape($1);
2859 $declaration_purpose =~ s/\s+/ /g;
2860 } else {
2859 $contents .= $1 . "\n";
2861 my $cont = $1;
2862 if ($section =~ m/^@/ || $section eq $section_context) {
2863 if (!defined $leading_space) {
2864 if ($cont =~ m/^(\s+)/) {
2865 $leading_space = $1;
2866 } else {
2867 $leading_space = "";
2868 }
2869 }
2870
2871 $cont =~ s/^$leading_space//;
2872 }
2873 $contents .= $cont . "\n";
2860 }
2861 } else {
2862 # i dont know - bad line? ignore.
2863 print STDERR "${file}:$.: warning: bad line: $_";
2864 ++$warnings;
2865 }
2866 } elsif ($state == STATE_INLINE) { # scanning for inline parameters
2867 # First line (state 1) needs to be a @parameter

--- 161 unchanged lines hidden ---
2874 }
2875 } else {
2876 # i dont know - bad line? ignore.
2877 print STDERR "${file}:$.: warning: bad line: $_";
2878 ++$warnings;
2879 }
2880 } elsif ($state == STATE_INLINE) { # scanning for inline parameters
2881 # First line (state 1) needs to be a @parameter

--- 161 unchanged lines hidden ---