kernel-doc (32e794015aa698fd6bf1ec21b713f900a707fb15) | kernel-doc (272057447f646c51bc77c60044eb21c683fa366d) |
---|---|
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## ## --- 1248 unchanged lines hidden (view full) --- 1257 foreach $section (@{$args{'sectionlist'}}) { 1258 print " $section:\n"; 1259 print " -> "; 1260 output_highlight($args{'sections'}{$section}); 1261 } 1262} 1263 1264## | 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## ## --- 1248 unchanged lines hidden (view full) --- 1257 foreach $section (@{$args{'sectionlist'}}) { 1258 print " $section:\n"; 1259 print " -> "; 1260 output_highlight($args{'sections'}{$section}); 1261 } 1262} 1263 1264## |
1265# generic output function for typedefs | 1265# generic output function for all types (function, struct/union, typedef, enum); 1266# calls the generated, variable output_ function name based on 1267# functype and output_mode |
1266sub output_declaration { 1267 no strict 'refs'; 1268 my $name = shift; 1269 my $functype = shift; 1270 my $func = "output_${functype}_$output_mode"; 1271 if (($function_only==0) || 1272 ( $function_only == 1 && defined($function_table{$name})) || 1273 ( $function_only == 2 && !defined($function_table{$name}))) 1274 { 1275 &$func(@_); 1276 $section_counter++; 1277 } 1278} 1279 1280## | 1268sub output_declaration { 1269 no strict 'refs'; 1270 my $name = shift; 1271 my $functype = shift; 1272 my $func = "output_${functype}_$output_mode"; 1273 if (($function_only==0) || 1274 ( $function_only == 1 && defined($function_table{$name})) || 1275 ( $function_only == 2 && !defined($function_table{$name}))) 1276 { 1277 &$func(@_); 1278 $section_counter++; 1279 } 1280} 1281 1282## |
1281# generic output function - calls the right one based 1282# on current output mode. | 1283# generic output function - calls the right one based on current output mode. |
1283sub output_intro { 1284 no strict 'refs'; 1285 my $func = "output_intro_".$output_mode; 1286 &$func(@_); 1287 $section_counter++; 1288} 1289 1290## --- 485 unchanged lines hidden (view full) --- 1776 } 1777 dump_section($section, xml_escape($contents)); 1778 $section = $section_default; 1779 } 1780 1781 $in_doc_sect = 1; 1782 $contents = $newcontents; 1783 if ($contents ne "") { | 1284sub output_intro { 1285 no strict 'refs'; 1286 my $func = "output_intro_".$output_mode; 1287 &$func(@_); 1288 $section_counter++; 1289} 1290 1291## --- 485 unchanged lines hidden (view full) --- 1777 } 1778 dump_section($section, xml_escape($contents)); 1779 $section = $section_default; 1780 } 1781 1782 $in_doc_sect = 1; 1783 $contents = $newcontents; 1784 if ($contents ne "") { |
1784 if (substr($contents, 0, 1) eq " ") { 1785 $contents = substr($contents, 1); | 1785 while ((substr($contents, 0, 1) eq " ") || 1786 substr($contents, 0, 1) eq "\t") { 1787 $contents = substr($contents, 1); |
1786 } 1787 $contents .= "\n"; 1788 } 1789 $section = $newsection; 1790 } elsif (/$doc_end/) { 1791 1792 if ($contents ne "") { 1793 dump_section($section, xml_escape($contents)); --- 112 unchanged lines hidden --- | 1788 } 1789 $contents .= "\n"; 1790 } 1791 $section = $newsection; 1792 } elsif (/$doc_end/) { 1793 1794 if ($contents ne "") { 1795 dump_section($section, xml_escape($contents)); --- 112 unchanged lines hidden --- |