kernel-doc (8f987768eb99631374f4ab0bb19cd062baf1397d) kernel-doc (2b35f4d9cab365d37c7b34ce51e1c1144c312d05)
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 ##
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-2009 Randy Dunlap ##
8## Copyright (C) 2005-2010 Randy Dunlap ##
9## ##
10## #define enhancements by Armin Kuster <akuster@mvista.com> ##
11## Copyright (c) 2000 MontaVista Software, Inc. ##
12## ##
13## This software falls under the GNU General Public License. ##
14## Please read the COPYING file for more information ##
15
16# 18/01/2001 - Cleanups

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

448# if (!defined $contents) {
449# use Carp;
450# confess "output_highlight got called with no args?\n";
451# }
452
453 if ($output_mode eq "html" || $output_mode eq "xml") {
454 $contents = local_unescape($contents);
455 # convert data read & converted thru xml_escape() into &xyz; format:
9## ##
10## #define enhancements by Armin Kuster <akuster@mvista.com> ##
11## Copyright (c) 2000 MontaVista Software, Inc. ##
12## ##
13## This software falls under the GNU General Public License. ##
14## Please read the COPYING file for more information ##
15
16# 18/01/2001 - Cleanups

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

448# if (!defined $contents) {
449# use Carp;
450# confess "output_highlight got called with no args?\n";
451# }
452
453 if ($output_mode eq "html" || $output_mode eq "xml") {
454 $contents = local_unescape($contents);
455 # convert data read & converted thru xml_escape() into &xyz; format:
456 $contents =~ s/\\\\\\/&/g;
456 $contents =~ s/\\\\\\/\&/g;
457 }
458# print STDERR "contents b4:$contents\n";
459 eval $dohighlight;
460 die $@ if $@;
461# print STDERR "contents af:$contents\n";
462
463 foreach $line (split "\n", $contents) {
464 if ($line eq ""){

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

765 print "</refnamediv>\n";
766
767 print "<refsynopsisdiv>\n";
768 print " <title>Synopsis</title>\n";
769 print " <programlisting>\n";
770 print $args{'type'} . " " . $args{'struct'} . " {\n";
771 foreach $parameter (@{$args{'parameterlist'}}) {
772 if ($parameter =~ /^#/) {
457 }
458# print STDERR "contents b4:$contents\n";
459 eval $dohighlight;
460 die $@ if $@;
461# print STDERR "contents af:$contents\n";
462
463 foreach $line (split "\n", $contents) {
464 if ($line eq ""){

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

765 print "</refnamediv>\n";
766
767 print "<refsynopsisdiv>\n";
768 print " <title>Synopsis</title>\n";
769 print " <programlisting>\n";
770 print $args{'type'} . " " . $args{'struct'} . " {\n";
771 foreach $parameter (@{$args{'parameterlist'}}) {
772 if ($parameter =~ /^#/) {
773 print "$parameter\n";
773 my $prm = $parameter;
774 # convert data read & converted thru xml_escape() into &xyz; format:
775 # This allows us to have #define macros interspersed in a struct.
776 $prm =~ s/\\\\\\/\&/g;
777 print "$prm\n";
774 next;
775 }
776
777 my $parameter_name = $parameter;
778 $parameter_name =~ s/\[.*//;
779
780 defined($args{'parameterdescs'}{$parameter_name}) || next;
781 ($args{'parameterdescs'}{$parameter_name} ne $undescribed) || next;

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

1696 "described in '$declaration_name'\n";
1697 }
1698 print STDERR "Warning(${file}:$.):" .
1699 " No description found for parameter '$param'\n";
1700 ++$warnings;
1701 }
1702 }
1703
778 next;
779 }
780
781 my $parameter_name = $parameter;
782 $parameter_name =~ s/\[.*//;
783
784 defined($args{'parameterdescs'}{$parameter_name}) || next;
785 ($args{'parameterdescs'}{$parameter_name} ne $undescribed) || next;

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

1700 "described in '$declaration_name'\n";
1701 }
1702 print STDERR "Warning(${file}:$.):" .
1703 " No description found for parameter '$param'\n";
1704 ++$warnings;
1705 }
1706 }
1707
1708 $param = xml_escape($param);
1709
1704 # strip spaces from $param so that it is one continous string
1705 # on @parameterlist;
1706 # this fixes a problem where check_sections() cannot find
1707 # a parameter like "addr[6 + 2]" because it actually appears
1708 # as "addr[6", "+", "2]" on the parameter list;
1709 # but it's better to maintain the param string unchanged for output,
1710 # so just weaken the string compare in check_sections() to ignore
1711 # "[blah" in a parameter string;

--- 570 unchanged lines hidden ---
1710 # strip spaces from $param so that it is one continous string
1711 # on @parameterlist;
1712 # this fixes a problem where check_sections() cannot find
1713 # a parameter like "addr[6 + 2]" because it actually appears
1714 # as "addr[6", "+", "2]" on the parameter list;
1715 # but it's better to maintain the param string unchanged for output,
1716 # so just weaken the string compare in check_sections() to ignore
1717 # "[blah" in a parameter string;

--- 570 unchanged lines hidden ---