mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-11-17 12:14:43 +00:00
doc-rst: parse-headers: better handle typedefs
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 <mchehab@s-opensource.com>
This commit is contained in:
parent
9c80c74563
commit
6c4c7dadb4
1 changed files with 7 additions and 2 deletions
|
|
@ -76,7 +76,9 @@ while (<IN>) {
|
||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
if ($ln =~ m/^\s*enum\s+([_\w][\w\d_]+)\s+\{/
|
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 $s = $1;
|
||||||
my $n = $1;
|
my $n = $1;
|
||||||
$n =~ tr/A-Z/a-z/;
|
$n =~ tr/A-Z/a-z/;
|
||||||
|
|
@ -88,7 +90,10 @@ while (<IN>) {
|
||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
if ($ln =~ m/^\s*struct\s+([_\w][\w\d_]+)\s+\{/
|
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 $s = $1;
|
||||||
my $n = $1;
|
my $n = $1;
|
||||||
$n =~ tr/A-Z/a-z/;
|
$n =~ tr/A-Z/a-z/;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue