kernel-doc (4fc31ba13d052c2933bf91095c063cf9a39effd0) kernel-doc (e814bccbafece52a24e152d2395b5d49eef55841)
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 ##

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

53Output format selection (mutually exclusive):
54 -docbook Output DocBook format.
55 -html Output HTML format.
56 -html5 Output HTML5 format.
57 -list Output symbol list format. This is for use by docproc.
58 -man Output troff manual page format. This is the default.
59 -rst Output reStructuredText format.
60 -text Output plain text format.
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 ##

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

53Output format selection (mutually exclusive):
54 -docbook Output DocBook format.
55 -html Output HTML format.
56 -html5 Output HTML5 format.
57 -list Output symbol list format. This is for use by docproc.
58 -man Output troff manual page format. This is the default.
59 -rst Output reStructuredText format.
60 -text Output plain text format.
61 -none Do not output documentation, only warnings.
61
62Output selection (mutually exclusive):
63 -export Only output documentation for symbols that have been
64 exported using EXPORT_SYMBOL() or EXPORT_SYMBOL_GPL()
65 in any input FILE or -export-file FILE.
66 -internal Only output documentation for symbols that have NOT been
67 exported using EXPORT_SYMBOL() or EXPORT_SYMBOL_GPL()
68 in any input FILE or -export-file FILE.

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

527 } elsif ($cmd eq "-list") {
528 $output_mode = "list";
529 @highlights = @highlights_list;
530 $blankline = $blankline_list;
531 } elsif ($cmd eq "-gnome") {
532 $output_mode = "gnome";
533 @highlights = @highlights_gnome;
534 $blankline = $blankline_gnome;
62
63Output selection (mutually exclusive):
64 -export Only output documentation for symbols that have been
65 exported using EXPORT_SYMBOL() or EXPORT_SYMBOL_GPL()
66 in any input FILE or -export-file FILE.
67 -internal Only output documentation for symbols that have NOT been
68 exported using EXPORT_SYMBOL() or EXPORT_SYMBOL_GPL()
69 in any input FILE or -export-file FILE.

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

528 } elsif ($cmd eq "-list") {
529 $output_mode = "list";
530 @highlights = @highlights_list;
531 $blankline = $blankline_list;
532 } elsif ($cmd eq "-gnome") {
533 $output_mode = "gnome";
534 @highlights = @highlights_gnome;
535 $blankline = $blankline_gnome;
536 } elsif ($cmd eq "-none") {
537 $output_mode = "none";
535 } elsif ($cmd eq "-module") { # not needed for XML, inherits from calling document
536 $modulename = shift @ARGV;
537 } elsif ($cmd eq "-function") { # to only output specific functions
538 $output_selection = OUTPUT_INCLUDE;
539 $function = shift @ARGV;
540 $function_table{$function} = 1;
541 } elsif ($cmd eq "-nofunction") { # output all except specific functions
542 $output_selection = OUTPUT_EXCLUDE;

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

2112 my %args = %{$_[0]};
2113 my ($parameter, $section);
2114
2115 foreach $section (@{$args{'sectionlist'}}) {
2116 print "DOC: $section\n";
2117 }
2118}
2119
538 } elsif ($cmd eq "-module") { # not needed for XML, inherits from calling document
539 $modulename = shift @ARGV;
540 } elsif ($cmd eq "-function") { # to only output specific functions
541 $output_selection = OUTPUT_INCLUDE;
542 $function = shift @ARGV;
543 $function_table{$function} = 1;
544 } elsif ($cmd eq "-nofunction") { # output all except specific functions
545 $output_selection = OUTPUT_EXCLUDE;

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

2115 my %args = %{$_[0]};
2116 my ($parameter, $section);
2117
2118 foreach $section (@{$args{'sectionlist'}}) {
2119 print "DOC: $section\n";
2120 }
2121}
2122
2123
2124## none mode output functions
2125
2126sub output_function_none(%) {
2127}
2128
2129sub output_enum_none(%) {
2130}
2131
2132sub output_typedef_none(%) {
2133}
2134
2135sub output_struct_none(%) {
2136}
2137
2138sub output_blockhead_none(%) {
2139}
2140
2120##
2121# generic output function for all types (function, struct/union, typedef, enum);
2122# calls the generated, variable output_ function name based on
2123# functype and output_mode
2124sub output_declaration {
2125 no strict 'refs';
2126 my $name = shift;
2127 my $functype = shift;

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

2177 $nested = $1;
2178
2179 # ignore members marked private:
2180 $members =~ s/\/\*\s*private:.*?\/\*\s*public:.*?\*\///gosi;
2181 $members =~ s/\/\*\s*private:.*//gosi;
2182 # strip comments:
2183 $members =~ s/\/\*.*?\*\///gos;
2184 $nested =~ s/\/\*.*?\*\///gos;
2141##
2142# generic output function for all types (function, struct/union, typedef, enum);
2143# calls the generated, variable output_ function name based on
2144# functype and output_mode
2145sub output_declaration {
2146 no strict 'refs';
2147 my $name = shift;
2148 my $functype = shift;

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

2198 $nested = $1;
2199
2200 # ignore members marked private:
2201 $members =~ s/\/\*\s*private:.*?\/\*\s*public:.*?\*\///gosi;
2202 $members =~ s/\/\*\s*private:.*//gosi;
2203 # strip comments:
2204 $members =~ s/\/\*.*?\*\///gos;
2205 $nested =~ s/\/\*.*?\*\///gos;
2185 # strip kmemcheck_bitfield_{begin,end}.*;
2186 $members =~ s/kmemcheck_bitfield_.*?;//gos;
2187 # strip attributes
2188 $members =~ s/__attribute__\s*\(\([a-z,_\*\s\(\)]*\)\)//i;
2189 $members =~ s/__aligned\s*\([^;]*\)//gos;
2190 $members =~ s/\s*CRYPTO_MINALIGN_ATTR//gos;
2191 # replace DECLARE_BITMAP
2192 $members =~ s/DECLARE_BITMAP\s*\(([^,)]+), ([^,)]+)\)/unsigned long $1\[BITS_TO_LONGS($2)\]/gos;
2193 # replace DECLARE_HASHTABLE
2194 $members =~ s/DECLARE_HASHTABLE\s*\(([^,)]+), ([^,)]+)\)/unsigned long $1\[1 << (($2) - 1)\]/gos;

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

3140 else
3141 {
3142 $contents .= $1 . "\n";
3143 }
3144 }
3145 }
3146 }
3147 if ($initial_section_counter == $section_counter) {
2206 # strip attributes
2207 $members =~ s/__attribute__\s*\(\([a-z,_\*\s\(\)]*\)\)//i;
2208 $members =~ s/__aligned\s*\([^;]*\)//gos;
2209 $members =~ s/\s*CRYPTO_MINALIGN_ATTR//gos;
2210 # replace DECLARE_BITMAP
2211 $members =~ s/DECLARE_BITMAP\s*\(([^,)]+), ([^,)]+)\)/unsigned long $1\[BITS_TO_LONGS($2)\]/gos;
2212 # replace DECLARE_HASHTABLE
2213 $members =~ s/DECLARE_HASHTABLE\s*\(([^,)]+), ([^,)]+)\)/unsigned long $1\[1 << (($2) - 1)\]/gos;

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

3159 else
3160 {
3161 $contents .= $1 . "\n";
3162 }
3163 }
3164 }
3165 }
3166 if ($initial_section_counter == $section_counter) {
3148 print STDERR "${file}:1: warning: no structured comments found\n";
3167 if ($output_mode ne "none") {
3168 print STDERR "${file}:1: warning: no structured comments found\n";
3169 }
3149 if (($output_selection == OUTPUT_INCLUDE) && ($show_not_found == 1)) {
3150 print STDERR " Was looking for '$_'.\n" for keys %function_table;
3151 }
3152 if ($output_mode eq "xml") {
3153 # The template wants at least one RefEntry here; make one.
3154 print "<refentry>\n";
3155 print " <refnamediv>\n";
3156 print " <refname>\n";

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

3222}
3223if ($verbose && $errors) {
3224 print STDERR "$errors errors\n";
3225}
3226if ($verbose && $warnings) {
3227 print STDERR "$warnings warnings\n";
3228}
3229
3170 if (($output_selection == OUTPUT_INCLUDE) && ($show_not_found == 1)) {
3171 print STDERR " Was looking for '$_'.\n" for keys %function_table;
3172 }
3173 if ($output_mode eq "xml") {
3174 # The template wants at least one RefEntry here; make one.
3175 print "<refentry>\n";
3176 print " <refnamediv>\n";
3177 print " <refname>\n";

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

3243}
3244if ($verbose && $errors) {
3245 print STDERR "$errors errors\n";
3246}
3247if ($verbose && $warnings) {
3248 print STDERR "$warnings warnings\n";
3249}
3250
3230exit($errors);
3251exit($output_mode eq "none" ? 0 : $errors);