summaryrefslogtreecommitdiffstats
path: root/Documentation/sphinx
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@s-opensource.com>2016-07-07 12:20:27 +0200
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2016-07-07 12:22:20 +0200
commit6c4c7dadb4a1bb82d04d6c5096656f8fe63ba2a4 (patch)
tree190a666459a78a31fa6239bac47bb1bef3653bc2 /Documentation/sphinx
parentdoc-rst: parse-headers: be more formal about the valid symbols (diff)
downloadlinux-6c4c7dadb4a1bb82d04d6c5096656f8fe63ba2a4.tar.xz
linux-6c4c7dadb4a1bb82d04d6c5096656f8fe63ba2a4.zip
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>
Diffstat (limited to 'Documentation/sphinx')
-rwxr-xr-xDocumentation/sphinx/parse-headers.pl9
1 files changed, 7 insertions, 2 deletions
diff --git a/Documentation/sphinx/parse-headers.pl b/Documentation/sphinx/parse-headers.pl
index 5e366756084f..b657cadb53ae 100755
--- a/Documentation/sphinx/parse-headers.pl
+++ b/Documentation/sphinx/parse-headers.pl
@@ -76,7 +76,9 @@ while (<IN>) {
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/;
@@ -88,7 +90,10 @@ while (<IN>) {
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/;