kernel-doc (654784284430bf2739985914b65e09c7c35a7273) | kernel-doc (e314ba3130940cb58b533b20969a6ee9b12435ed) |
---|---|
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 ## --- 216 unchanged lines hidden (view full) --- 225 usage(); 226} 227 228my $kernelversion; 229my $dohighlight = ""; 230 231my $verbose = 0; 232my $output_mode = "man"; | 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 ## --- 216 unchanged lines hidden (view full) --- 225 usage(); 226} 227 228my $kernelversion; 229my $dohighlight = ""; 230 231my $verbose = 0; 232my $output_mode = "man"; |
233my $output_preformatted = 0; |
|
233my $no_doc_sections = 0; 234my %highlights = %highlights_man; 235my $blankline = $blankline_man; 236my $modulename = "Kernel API"; 237my $function_only = 0; 238my $man_date = ('January', 'February', 'March', 'April', 'May', 'June', 239 'July', 'August', 'September', 'October', 240 'November', 'December')[(localtime)[4]] . --- 214 unchanged lines hidden (view full) --- 455 } 456# print STDERR "contents b4:$contents\n"; 457 eval $dohighlight; 458 die $@ if $@; 459# print STDERR "contents af:$contents\n"; 460 461 foreach $line (split "\n", $contents) { 462 if ($line eq ""){ | 234my $no_doc_sections = 0; 235my %highlights = %highlights_man; 236my $blankline = $blankline_man; 237my $modulename = "Kernel API"; 238my $function_only = 0; 239my $man_date = ('January', 'February', 'March', 'April', 'May', 'June', 240 'July', 'August', 'September', 'October', 241 'November', 'December')[(localtime)[4]] . --- 214 unchanged lines hidden (view full) --- 456 } 457# print STDERR "contents b4:$contents\n"; 458 eval $dohighlight; 459 die $@ if $@; 460# print STDERR "contents af:$contents\n"; 461 462 foreach $line (split "\n", $contents) { 463 if ($line eq ""){ |
463 print $lineprefix, local_unescape($blankline); | 464 if (! $output_preformatted) { 465 print $lineprefix, local_unescape($blankline); 466 } |
464 } else { 465 $line =~ s/\\\\\\/\&/g; 466 if ($output_mode eq "man" && substr($line, 0, 1) eq ".") { 467 print "\\&$line"; 468 } else { 469 print $lineprefix, $line; 470 } 471 } --- 166 unchanged lines hidden (view full) --- 638 my $section; 639 # print out each section 640 $lineprefix=" "; 641 foreach $section (@{$args{'sectionlist'}}) { 642 print "<refsect1>\n"; 643 print "<title>$section</title>\n"; 644 if ($section =~ m/EXAMPLE/i) { 645 print "<informalexample><programlisting>\n"; | 467 } else { 468 $line =~ s/\\\\\\/\&/g; 469 if ($output_mode eq "man" && substr($line, 0, 1) eq ".") { 470 print "\\&$line"; 471 } else { 472 print $lineprefix, $line; 473 } 474 } --- 166 unchanged lines hidden (view full) --- 641 my $section; 642 # print out each section 643 $lineprefix=" "; 644 foreach $section (@{$args{'sectionlist'}}) { 645 print "<refsect1>\n"; 646 print "<title>$section</title>\n"; 647 if ($section =~ m/EXAMPLE/i) { 648 print "<informalexample><programlisting>\n"; |
649 $output_preformatted = 1; |
|
646 } else { 647 print "<para>\n"; 648 } 649 output_highlight($args{'sections'}{$section}); | 650 } else { 651 print "<para>\n"; 652 } 653 output_highlight($args{'sections'}{$section}); |
654 $output_preformatted = 0; |
|
650 if ($section =~ m/EXAMPLE/i) { 651 print "</programlisting></informalexample>\n"; 652 } else { 653 print "</para>\n"; 654 } 655 print "</refsect1>\n"; 656 } 657} --- 286 unchanged lines hidden (view full) --- 944 # print out each section 945 $lineprefix=" "; 946 foreach $section (@{$args{'sectionlist'}}) { 947 if (!$args{'content-only'}) { 948 print "<refsect1>\n <title>$section</title>\n"; 949 } 950 if ($section =~ m/EXAMPLE/i) { 951 print "<example><para>\n"; | 655 if ($section =~ m/EXAMPLE/i) { 656 print "</programlisting></informalexample>\n"; 657 } else { 658 print "</para>\n"; 659 } 660 print "</refsect1>\n"; 661 } 662} --- 286 unchanged lines hidden (view full) --- 949 # print out each section 950 $lineprefix=" "; 951 foreach $section (@{$args{'sectionlist'}}) { 952 if (!$args{'content-only'}) { 953 print "<refsect1>\n <title>$section</title>\n"; 954 } 955 if ($section =~ m/EXAMPLE/i) { 956 print "<example><para>\n"; |
957 $output_preformatted = 1; |
|
952 } else { 953 print "<para>\n"; 954 } 955 output_highlight($args{'sections'}{$section}); | 958 } else { 959 print "<para>\n"; 960 } 961 output_highlight($args{'sections'}{$section}); |
962 $output_preformatted = 0; |
|
956 if ($section =~ m/EXAMPLE/i) { 957 print "</para></example>\n"; 958 } else { 959 print "</para>"; 960 } 961 if (!$args{'content-only'}) { 962 print "\n</refsect1>\n"; 963 } --- 59 unchanged lines hidden (view full) --- 1023 } 1024 1025 # print out each section 1026 $lineprefix=" "; 1027 foreach $section (@{$args{'sectionlist'}}) { 1028 print "<simplesect>\n <title>$section</title>\n"; 1029 if ($section =~ m/EXAMPLE/i) { 1030 print "<example><programlisting>\n"; | 963 if ($section =~ m/EXAMPLE/i) { 964 print "</para></example>\n"; 965 } else { 966 print "</para>"; 967 } 968 if (!$args{'content-only'}) { 969 print "\n</refsect1>\n"; 970 } --- 59 unchanged lines hidden (view full) --- 1030 } 1031 1032 # print out each section 1033 $lineprefix=" "; 1034 foreach $section (@{$args{'sectionlist'}}) { 1035 print "<simplesect>\n <title>$section</title>\n"; 1036 if ($section =~ m/EXAMPLE/i) { 1037 print "<example><programlisting>\n"; |
1038 $output_preformatted = 1; |
|
1031 } else { 1032 } 1033 print "<para>\n"; 1034 output_highlight($args{'sections'}{$section}); | 1039 } else { 1040 } 1041 print "<para>\n"; 1042 output_highlight($args{'sections'}{$section}); |
1043 $output_preformatted = 0; |
|
1035 print "</para>\n"; 1036 if ($section =~ m/EXAMPLE/i) { 1037 print "</programlisting></example>\n"; 1038 } else { 1039 } 1040 print " </simplesect>\n"; 1041 } 1042 --- 1256 unchanged lines hidden --- | 1044 print "</para>\n"; 1045 if ($section =~ m/EXAMPLE/i) { 1046 print "</programlisting></example>\n"; 1047 } else { 1048 } 1049 print " </simplesect>\n"; 1050 } 1051 --- 1256 unchanged lines hidden --- |