diff options
Diffstat (limited to 'scripts/kernel-doc')
-rwxr-xr-x | scripts/kernel-doc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/scripts/kernel-doc b/scripts/kernel-doc index 08894f4aab2c..f5862abe0311 100755 --- a/scripts/kernel-doc +++ b/scripts/kernel-doc | |||
@@ -719,6 +719,7 @@ sub output_struct_xml(%) { | |||
719 | # pointer-to-function | 719 | # pointer-to-function |
720 | print " $1 $parameter) ($2);\n"; | 720 | print " $1 $parameter) ($2);\n"; |
721 | } elsif ($type =~ m/^(.*?)\s*(:.*)/) { | 721 | } elsif ($type =~ m/^(.*?)\s*(:.*)/) { |
722 | # bitfield | ||
722 | print " $1 $parameter$2;\n"; | 723 | print " $1 $parameter$2;\n"; |
723 | } else { | 724 | } else { |
724 | print " ".$type." ".$parameter.";\n"; | 725 | print " ".$type." ".$parameter.";\n"; |
@@ -1261,6 +1262,7 @@ sub output_struct_text(%) { | |||
1261 | # pointer-to-function | 1262 | # pointer-to-function |
1262 | print "\t$1 $parameter) ($2);\n"; | 1263 | print "\t$1 $parameter) ($2);\n"; |
1263 | } elsif ($type =~ m/^(.*?)\s*(:.*)/) { | 1264 | } elsif ($type =~ m/^(.*?)\s*(:.*)/) { |
1265 | # bitfield | ||
1264 | print "\t$1 $parameter$2;\n"; | 1266 | print "\t$1 $parameter$2;\n"; |
1265 | } else { | 1267 | } else { |
1266 | print "\t".$type." ".$parameter.";\n"; | 1268 | print "\t".$type." ".$parameter.";\n"; |
@@ -1697,6 +1699,8 @@ sub process_state3_function($$) { | |||
1697 | my $x = shift; | 1699 | my $x = shift; |
1698 | my $file = shift; | 1700 | my $file = shift; |
1699 | 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/)) { | 1704 | if ($x =~ m#\s*/\*\s+MACDOC\s*#io || ($x =~ /^#/ && $x !~ /^#define/)) { |
1701 | # do nothing | 1705 | # do nothing |
1702 | } | 1706 | } |
@@ -1719,6 +1723,8 @@ sub process_state3_type($$) { | |||
1719 | $x =~ s@[\r\n]+@ @gos; # strip newlines/cr's. | 1723 | $x =~ s@[\r\n]+@ @gos; # strip newlines/cr's. |
1720 | $x =~ s@^\s+@@gos; # strip leading spaces | 1724 | $x =~ s@^\s+@@gos; # strip leading spaces |
1721 | $x =~ s@\s+$@@gos; # strip trailing 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 =~ /^#/) { | 1728 | if ($x =~ /^#/) { |
1723 | # To distinguish preprocessor directive from regular declaration later. | 1729 | # To distinguish preprocessor directive from regular declaration later. |
1724 | $x .= ";"; | 1730 | $x .= ";"; |
@@ -1802,7 +1808,7 @@ sub process_file($) { | |||
1802 | 1808 | ||
1803 | $state = 2; | 1809 | $state = 2; |
1804 | if (/-(.*)/) { | 1810 | if (/-(.*)/) { |
1805 | # strip leading/trailing/multiple spaces #RDD:T: | 1811 | # strip leading/trailing/multiple spaces |
1806 | $descr= $1; | 1812 | $descr= $1; |
1807 | $descr =~ s/^\s*//; | 1813 | $descr =~ s/^\s*//; |
1808 | $descr =~ s/\s*$//; | 1814 | $descr =~ s/\s*$//; |