kernel-doc (5f8c7c98ae3888cf0a2cf320f514f75cc92f00be) kernel-doc (51f5a0c8f63990fcb6e09ed52be348df58c9e416)
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## ##

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

714
715 defined($args{'parameterdescs'}{$parameter_name}) || next;
716 ($args{'parameterdescs'}{$parameter_name} ne $undescribed) || next;
717 $type = $args{'parametertypes'}{$parameter};
718 if ($type =~ m/([^\(]*\(\*)\s*\)\s*\(([^\)]*)\)/) {
719 # pointer-to-function
720 print " $1 $parameter) ($2);\n";
721 } elsif ($type =~ m/^(.*?)\s*(:.*)/) {
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## ##

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

714
715 defined($args{'parameterdescs'}{$parameter_name}) || next;
716 ($args{'parameterdescs'}{$parameter_name} ne $undescribed) || next;
717 $type = $args{'parametertypes'}{$parameter};
718 if ($type =~ m/([^\(]*\(\*)\s*\)\s*\(([^\)]*)\)/) {
719 # pointer-to-function
720 print " $1 $parameter) ($2);\n";
721 } elsif ($type =~ m/^(.*?)\s*(:.*)/) {
722 # bitfield
722 print " $1 $parameter$2;\n";
723 } else {
724 print " ".$type." ".$parameter.";\n";
725 }
726 }
727 print "};";
728 print " </programlisting>\n";
729 print "</refsynopsisdiv>\n";

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

1256 $parameter_name =~ s/\[.*//;
1257
1258 ($args{'parameterdescs'}{$parameter_name} ne $undescribed) || next;
1259 $type = $args{'parametertypes'}{$parameter};
1260 if ($type =~ m/([^\(]*\(\*)\s*\)\s*\(([^\)]*)\)/) {
1261 # pointer-to-function
1262 print "\t$1 $parameter) ($2);\n";
1263 } elsif ($type =~ m/^(.*?)\s*(:.*)/) {
723 print " $1 $parameter$2;\n";
724 } else {
725 print " ".$type." ".$parameter.";\n";
726 }
727 }
728 print "};";
729 print " </programlisting>\n";
730 print "</refsynopsisdiv>\n";

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

1257 $parameter_name =~ s/\[.*//;
1258
1259 ($args{'parameterdescs'}{$parameter_name} ne $undescribed) || next;
1260 $type = $args{'parametertypes'}{$parameter};
1261 if ($type =~ m/([^\(]*\(\*)\s*\)\s*\(([^\)]*)\)/) {
1262 # pointer-to-function
1263 print "\t$1 $parameter) ($2);\n";
1264 } elsif ($type =~ m/^(.*?)\s*(:.*)/) {
1265 # bitfield
1264 print "\t$1 $parameter$2;\n";
1265 } else {
1266 print "\t".$type." ".$parameter.";\n";
1267 }
1268 }
1269 print "};\n\n";
1270
1271 print "Members:\n\n";

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

1692
1693 $state = 0;
1694}
1695
1696sub process_state3_function($$) {
1697 my $x = shift;
1698 my $file = shift;
1699
1266 print "\t$1 $parameter$2;\n";
1267 } else {
1268 print "\t".$type." ".$parameter.";\n";
1269 }
1270 }
1271 print "};\n\n";
1272
1273 print "Members:\n\n";

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

1694
1695 $state = 0;
1696}
1697
1698sub process_state3_function($$) {
1699 my $x = shift;
1700 my $file = shift;
1701
1702 $x =~ s@\/\/.*$@@gos; # strip C99-style comments to end of line
1703
1700 if ($x =~ m#\s*/\*\s+MACDOC\s*#io || ($x =~ /^#/ && $x !~ /^#define/)) {
1701 # do nothing
1702 }
1703 elsif ($x =~ /([^\{]*)/) {
1704 $prototype .= $1;
1705 }
1706 if (($x =~ /\{/) || ($x =~ /\#define/) || ($x =~ /;/)) {
1707 $prototype =~ s@/\*.*?\*/@@gos; # strip comments.

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

1714
1715sub process_state3_type($$) {
1716 my $x = shift;
1717 my $file = shift;
1718
1719 $x =~ s@[\r\n]+@ @gos; # strip newlines/cr's.
1720 $x =~ s@^\s+@@gos; # strip leading spaces
1721 $x =~ s@\s+$@@gos; # strip trailing spaces
1704 if ($x =~ m#\s*/\*\s+MACDOC\s*#io || ($x =~ /^#/ && $x !~ /^#define/)) {
1705 # do nothing
1706 }
1707 elsif ($x =~ /([^\{]*)/) {
1708 $prototype .= $1;
1709 }
1710 if (($x =~ /\{/) || ($x =~ /\#define/) || ($x =~ /;/)) {
1711 $prototype =~ s@/\*.*?\*/@@gos; # strip comments.

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

1718
1719sub process_state3_type($$) {
1720 my $x = shift;
1721 my $file = shift;
1722
1723 $x =~ s@[\r\n]+@ @gos; # strip newlines/cr's.
1724 $x =~ s@^\s+@@gos; # strip leading spaces
1725 $x =~ s@\s+$@@gos; # strip trailing spaces
1726 $x =~ s@\/\/.*$@@gos; # strip C99-style comments to end of line
1727
1722 if ($x =~ /^#/) {
1723 # To distinguish preprocessor directive from regular declaration later.
1724 $x .= ";";
1725 }
1726
1727 while (1) {
1728 if ( $x =~ /([^{};]*)([{};])(.*)/ ) {
1729 $prototype .= $1 . $2;

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

1797 elsif (/$doc_decl/o) {
1798 $identifier = $1;
1799 if (/\s*([\w\s]+?)\s*-/) {
1800 $identifier = $1;
1801 }
1802
1803 $state = 2;
1804 if (/-(.*)/) {
1728 if ($x =~ /^#/) {
1729 # To distinguish preprocessor directive from regular declaration later.
1730 $x .= ";";
1731 }
1732
1733 while (1) {
1734 if ( $x =~ /([^{};]*)([{};])(.*)/ ) {
1735 $prototype .= $1 . $2;

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

1803 elsif (/$doc_decl/o) {
1804 $identifier = $1;
1805 if (/\s*([\w\s]+?)\s*-/) {
1806 $identifier = $1;
1807 }
1808
1809 $state = 2;
1810 if (/-(.*)/) {
1805 # strip leading/trailing/multiple spaces #RDD:T:
1811 # strip leading/trailing/multiple spaces
1806 $descr= $1;
1807 $descr =~ s/^\s*//;
1808 $descr =~ s/\s*$//;
1809 $descr =~ s/\s+/ /;
1810 $declaration_purpose = xml_escape($descr);
1811 } else {
1812 $declaration_purpose = "";
1813 }

--- 161 unchanged lines hidden ---
1812 $descr= $1;
1813 $descr =~ s/^\s*//;
1814 $descr =~ s/\s*$//;
1815 $descr =~ s/\s+/ /;
1816 $declaration_purpose = xml_escape($descr);
1817 } else {
1818 $declaration_purpose = "";
1819 }

--- 161 unchanged lines hidden ---