diff options
Diffstat (limited to 'scripts/kernel-doc')
-rwxr-xr-x | scripts/kernel-doc | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/scripts/kernel-doc b/scripts/kernel-doc index 44ee94d2ab76..d27aad78e1d8 100755 --- a/scripts/kernel-doc +++ b/scripts/kernel-doc | |||
@@ -378,6 +378,10 @@ sub dump_section { | |||
378 | # print STDERR "parameter def '$1' = '$contents'\n"; | 378 | # print STDERR "parameter def '$1' = '$contents'\n"; |
379 | $name = $1; | 379 | $name = $1; |
380 | $parameterdescs{$name} = $contents; | 380 | $parameterdescs{$name} = $contents; |
381 | } elsif ($name eq "@\.\.\.") { | ||
382 | # print STDERR "parameter def '...' = '$contents'\n"; | ||
383 | $name = "..."; | ||
384 | $parameterdescs{$name} = $contents; | ||
381 | } else { | 385 | } else { |
382 | # print STDERR "other section '$name' = '$contents'\n"; | 386 | # print STDERR "other section '$name' = '$contents'\n"; |
383 | if (defined($sections{$name}) && ($sections{$name} ne "")) { | 387 | if (defined($sections{$name}) && ($sections{$name} ne "")) { |
@@ -1588,12 +1592,12 @@ sub push_parameter($$$) { | |||
1588 | 1592 | ||
1589 | if ($type eq "" && $param =~ /\.\.\.$/) | 1593 | if ($type eq "" && $param =~ /\.\.\.$/) |
1590 | { | 1594 | { |
1591 | $type=""; | 1595 | if (!defined $parameterdescs{$param} || $parameterdescs{$param} eq "") { |
1592 | $parameterdescs{$param} = "variable arguments"; | 1596 | $parameterdescs{$param} = "variable arguments"; |
1597 | } | ||
1593 | } | 1598 | } |
1594 | elsif ($type eq "" && ($param eq "" or $param eq "void")) | 1599 | elsif ($type eq "" && ($param eq "" or $param eq "void")) |
1595 | { | 1600 | { |
1596 | $type=""; | ||
1597 | $param="void"; | 1601 | $param="void"; |
1598 | $parameterdescs{void} = "no arguments"; | 1602 | $parameterdescs{void} = "no arguments"; |
1599 | } | 1603 | } |
@@ -1648,7 +1652,7 @@ sub dump_function($$) { | |||
1648 | $prototype =~ s/^noinline +//; | 1652 | $prototype =~ s/^noinline +//; |
1649 | $prototype =~ s/__devinit +//; | 1653 | $prototype =~ s/__devinit +//; |
1650 | $prototype =~ s/__init +//; | 1654 | $prototype =~ s/__init +//; |
1651 | $prototype =~ s/^#define\s+//; #ak added | 1655 | $prototype =~ s/^#\s*define\s+//; #ak added |
1652 | $prototype =~ s/__attribute__\s*\(\([a-z,]*\)\)//; | 1656 | $prototype =~ s/__attribute__\s*\(\([a-z,]*\)\)//; |
1653 | 1657 | ||
1654 | # Yes, this truly is vile. We are looking for: | 1658 | # Yes, this truly is vile. We are looking for: |
@@ -1764,13 +1768,13 @@ sub process_state3_function($$) { | |||
1764 | 1768 | ||
1765 | $x =~ s@\/\/.*$@@gos; # strip C99-style comments to end of line | 1769 | $x =~ s@\/\/.*$@@gos; # strip C99-style comments to end of line |
1766 | 1770 | ||
1767 | if ($x =~ m#\s*/\*\s+MACDOC\s*#io || ($x =~ /^#/ && $x !~ /^#define/)) { | 1771 | if ($x =~ m#\s*/\*\s+MACDOC\s*#io || ($x =~ /^#/ && $x !~ /^#\s*define/)) { |
1768 | # do nothing | 1772 | # do nothing |
1769 | } | 1773 | } |
1770 | elsif ($x =~ /([^\{]*)/) { | 1774 | elsif ($x =~ /([^\{]*)/) { |
1771 | $prototype .= $1; | 1775 | $prototype .= $1; |
1772 | } | 1776 | } |
1773 | if (($x =~ /\{/) || ($x =~ /\#define/) || ($x =~ /;/)) { | 1777 | if (($x =~ /\{/) || ($x =~ /\#\s*define/) || ($x =~ /;/)) { |
1774 | $prototype =~ s@/\*.*?\*/@@gos; # strip comments. | 1778 | $prototype =~ s@/\*.*?\*/@@gos; # strip comments. |
1775 | $prototype =~ s@[\r\n]+@ @gos; # strip newlines/cr's. | 1779 | $prototype =~ s@[\r\n]+@ @gos; # strip newlines/cr's. |
1776 | $prototype =~ s@^\s+@@gos; # strip leading spaces | 1780 | $prototype =~ s@^\s+@@gos; # strip leading spaces |