Commit 9d4fdda3 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab Committed by Greg Kroah-Hartman

scripts: get_api.pl: Add sub-titles to ABI output

Instead of adding titles just for the files, add titles
for each part of the ABI output, in order to make easier
to search for a symbol there.
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Link: https://lore.kernel.org/r/64752a5de06ab8263c296e3ed01414b25861e1eb.1604312590.git.mchehab+huawei@kernel.orgSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent daaaf58a
...@@ -287,6 +287,8 @@ my $bondary = qr { (?<![\w\/\`\{])(?=[\w\/\`\{])|(?<=[\w\/\`\{])(?![\w\/\`\{]) } ...@@ -287,6 +287,8 @@ my $bondary = qr { (?<![\w\/\`\{])(?=[\w\/\`\{])|(?<=[\w\/\`\{])(?![\w\/\`\{]) }
sub output_rest { sub output_rest {
create_labels(); create_labels();
my $part = "";
foreach my $what (sort { foreach my $what (sort {
($data{$a}->{type} eq "File") cmp ($data{$b}->{type} eq "File") || ($data{$a}->{type} eq "File") cmp ($data{$b}->{type} eq "File") ||
$a cmp $b $a cmp $b
...@@ -306,6 +308,21 @@ sub output_rest { ...@@ -306,6 +308,21 @@ sub output_rest {
$w =~ s/([\(\)\_\-\*\=\^\~\\])/\\$1/g; $w =~ s/([\(\)\_\-\*\=\^\~\\])/\\$1/g;
if ($type ne "File") { if ($type ne "File") {
my $cur_part = $what;
if ($what =~ '/') {
if ($what =~ m#^(\/?(?:[\w\-]+\/?){1,2})#) {
$cur_part = "Symbols under $1";
$cur_part =~ s,/$,,;
}
}
if ($cur_part ne "" && $part ne $cur_part) {
$part = $cur_part;
my $bar = $part;
$bar =~ s/./-/g;
print "$part\n$bar\n\n";
}
printf ".. _%s:\n\n", $data{$what}->{label}; printf ".. _%s:\n\n", $data{$what}->{label};
my @names = split /, /,$w; my @names = split /, /,$w;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment