Skip to content

Commit

Permalink
doc-rst: parse-headers: better handle typedefs
Browse files Browse the repository at this point in the history
When typedef is used on its multiline format, we need to
also parse enum and struct in the same line.

Signed-off-by: Mauro Carvalho Chehab <[email protected]>
  • Loading branch information
mchehab committed Jul 7, 2016
1 parent 9c80c74 commit 6c4c7da
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions Documentation/sphinx/parse-headers.pl
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,9 @@
next;
}
if ($ln =~ m/^\s*enum\s+([_\w][\w\d_]+)\s+\{/
|| $ln =~ m/^\s*enum\s+([_\w][\w\d_]+)$/) {
|| $ln =~ m/^\s*enum\s+([_\w][\w\d_]+)$/
|| $ln =~ m/^\s*typedef\s*enum\s+([_\w][\w\d_]+)\s+\{/
|| $ln =~ m/^\s*typedef\s*enum\s+([_\w][\w\d_]+)$/) {
my $s = $1;
my $n = $1;
$n =~ tr/A-Z/a-z/;
Expand All @@ -88,7 +90,10 @@
next;
}
if ($ln =~ m/^\s*struct\s+([_\w][\w\d_]+)\s+\{/
|| $ln =~ m/^\s*struct\s+([[_\w][\w\d_]+)$/) {
|| $ln =~ m/^\s*struct\s+([[_\w][\w\d_]+)$/
|| $ln =~ m/^\s*typedef\s*struct\s+([_\w][\w\d_]+)\s+\{/
|| $ln =~ m/^\s*typedef\s*struct\s+([[_\w][\w\d_]+)$/
) {
my $s = $1;
my $n = $1;
$n =~ tr/A-Z/a-z/;
Expand Down

0 comments on commit 6c4c7da

Please sign in to comment.