kernel-doc (7c225c69f86c934e3be9be63ecde754e286838d7) | kernel-doc (3a025e1d1c2ea42fa497c9c6b21c284e0f69e28b) |
---|---|
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; |
2206 # strip kmemcheck_bitfield_{begin,end}.*; 2207 $members =~ s/kmemcheck_bitfield_.*?;//gos; |
|
2185 # strip attributes 2186 $members =~ s/__attribute__\s*\(\([a-z,_\*\s\(\)]*\)\)//i; 2187 $members =~ s/__aligned\s*\([^;]*\)//gos; 2188 $members =~ s/\s*CRYPTO_MINALIGN_ATTR//gos; 2189 # replace DECLARE_BITMAP 2190 $members =~ s/DECLARE_BITMAP\s*\(([^,)]+), ([^,)]+)\)/unsigned long $1\[BITS_TO_LONGS($2)\]/gos; 2191 # replace DECLARE_HASHTABLE 2192 $members =~ s/DECLARE_HASHTABLE\s*\(([^,)]+), ([^,)]+)\)/unsigned long $1\[1 << (($2) - 1)\]/gos; --- 945 unchanged lines hidden (view full) --- 3138 else 3139 { 3140 $contents .= $1 . "\n"; 3141 } 3142 } 3143 } 3144 } 3145 if ($initial_section_counter == $section_counter) { | 2208 # strip attributes 2209 $members =~ s/__attribute__\s*\(\([a-z,_\*\s\(\)]*\)\)//i; 2210 $members =~ s/__aligned\s*\([^;]*\)//gos; 2211 $members =~ s/\s*CRYPTO_MINALIGN_ATTR//gos; 2212 # replace DECLARE_BITMAP 2213 $members =~ s/DECLARE_BITMAP\s*\(([^,)]+), ([^,)]+)\)/unsigned long $1\[BITS_TO_LONGS($2)\]/gos; 2214 # replace DECLARE_HASHTABLE 2215 $members =~ s/DECLARE_HASHTABLE\s*\(([^,)]+), ([^,)]+)\)/unsigned long $1\[1 << (($2) - 1)\]/gos; --- 945 unchanged lines hidden (view full) --- 3161 else 3162 { 3163 $contents .= $1 . "\n"; 3164 } 3165 } 3166 } 3167 } 3168 if ($initial_section_counter == $section_counter) { |
3146 print STDERR "${file}:1: warning: no structured comments found\n"; | 3169 if ($output_mode ne "none") { 3170 print STDERR "${file}:1: warning: no structured comments found\n"; 3171 } |
3147 if (($output_selection == OUTPUT_INCLUDE) && ($show_not_found == 1)) { 3148 print STDERR " Was looking for '$_'.\n" for keys %function_table; 3149 } 3150 if ($output_mode eq "xml") { 3151 # The template wants at least one RefEntry here; make one. 3152 print "<refentry>\n"; 3153 print " <refnamediv>\n"; 3154 print " <refname>\n"; --- 74 unchanged lines hidden --- | 3172 if (($output_selection == OUTPUT_INCLUDE) && ($show_not_found == 1)) { 3173 print STDERR " Was looking for '$_'.\n" for keys %function_table; 3174 } 3175 if ($output_mode eq "xml") { 3176 # The template wants at least one RefEntry here; make one. 3177 print "<refentry>\n"; 3178 print " <refnamediv>\n"; 3179 print " <refname>\n"; --- 74 unchanged lines hidden --- |