Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3a80a766 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab
Browse files

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: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
parent abfc97f7
Loading
Loading
Loading
Loading
+12 −0
Original line number Original line Diff line number Diff line
@@ -1886,6 +1886,18 @@ sub dump_typedef($$) {
			    'purpose' => $declaration_purpose
			    'purpose' => $declaration_purpose
			   });
			   });
    }
    }
    elsif ($x =~ /typedef\s+\w+\s*\(\*\s*(\w\S+)\s*\)\s*\(/) { # functions
	$declaration_name = $1;

	output_declaration($declaration_name,
			   'typedef',
			   {'typedef' => $declaration_name,
			    'module' => $modulename,
			    'sectionlist' => \@sectionlist,
			    'sections' => \%sections,
			    'purpose' => $declaration_purpose
			   });
    }
    else {
    else {
	print STDERR "${file}:$.: error: Cannot parse typedef!\n";
	print STDERR "${file}:$.: error: Cannot parse typedef!\n";
	++$errors;
	++$errors;