diff options
author | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2015-10-08 14:21:44 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2015-10-10 09:29:05 -0400 |
commit | 3a80a766328fe73df5951639b5c9013ddba6efec (patch) | |
tree | 2054be48288e1ae320525c5e5231e9a77cb82602 /scripts/kernel-doc | |
parent | abfc97f722348032c9b6b2cd8f464446aaac6a72 (diff) |
kernel-doc: Add a parser for function typedefs
The current typedef parser only works for non-function typedefs.
As we need to also document some function typedefs, add a
parser for it.
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'scripts/kernel-doc')
-rwxr-xr-x | scripts/kernel-doc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/scripts/kernel-doc b/scripts/kernel-doc index 9a08fb5c1af6..55ce47ffa02d 100755 --- a/scripts/kernel-doc +++ b/scripts/kernel-doc | |||
@@ -1886,6 +1886,18 @@ sub dump_typedef($$) { | |||
1886 | 'purpose' => $declaration_purpose | 1886 | 'purpose' => $declaration_purpose |
1887 | }); | 1887 | }); |
1888 | } | 1888 | } |
1889 | elsif ($x =~ /typedef\s+\w+\s*\(\*\s*(\w\S+)\s*\)\s*\(/) { # functions | ||
1890 | $declaration_name = $1; | ||
1891 | |||
1892 | output_declaration($declaration_name, | ||
1893 | 'typedef', | ||
1894 | {'typedef' => $declaration_name, | ||
1895 | 'module' => $modulename, | ||
1896 | 'sectionlist' => \@sectionlist, | ||
1897 | 'sections' => \%sections, | ||
1898 | 'purpose' => $declaration_purpose | ||
1899 | }); | ||
1900 | } | ||
1889 | else { | 1901 | else { |
1890 | print STDERR "${file}:$.: error: Cannot parse typedef!\n"; | 1902 | print STDERR "${file}:$.: error: Cannot parse typedef!\n"; |
1891 | ++$errors; | 1903 | ++$errors; |