Lines Matching +full:eq +full:- +full:level
2 # SPDX-License-Identifier: GPL-2.0
43 "enable-lineno" => \$enable_lineno,
44 "rst-source!" => \$description_is_rst,
47 "show-hints" => \$hint,
48 "search-string=s" => \$search_string,
53 pod2usage(-exitstatus => 0, -noperldoc, -verbose => 2) if $man;
60 pod2usage(2) if ($cmd eq "search" && !$arg);
105 $data{$nametag}->{what} = "File $name";
106 $data{$nametag}->{type} = "File";
107 $data{$nametag}->{file} = $name;
108 $data{$nametag}->{filepath} = $file;
109 $data{$nametag}->{is_file} = 1;
110 $data{$nametag}->{line_no} = 1;
134 if ($tag eq "description") {
144 if ($new_tag eq "where") {
153 push @{$symbols{$content}->{file}}, " $file:" . ($ln - 1);
159 …parse_error($file, $ln, "What '$what' doesn't have a description", "") if (!$data{$what}->{descrip…
162 $symbols{$w}->{xref} = $what;
173 push @{$data{$nametag}->{symbols}}, $content if ($data{$nametag}->{what});
181 @{$data{$what}->{label_list}} = @labels if ($data{$nametag}->{what});
186 $data{$what}->{type} = $type;
187 if (!defined($data{$what}->{file})) {
188 $data{$what}->{file} = $name;
189 $data{$what}->{filepath} = $file;
191 $data{$what}->{description} .= "\n\n" if (defined($data{$what}->{description}));
192 if ($name ne $data{$what}->{file}) {
193 $data{$what}->{file} .= " " . $name;
194 $data{$what}->{filepath} .= " " . $file;
198 $data{$what}->{line_no} = $ln;
200 $data{$what}->{line_no} = $ln if (!defined($data{$what}->{line_no}));
207 if ($new_tag eq "description") {
210 while ($content =~ s/\t+/' ' x (length($&) * 8 - length($`) % 8)/e) {}
215 $data{$what}->{$tag} .= $content;
221 $data{$what}->{$tag} = $content;
228 if (!$tag && $data{$nametag}->{what}) {
229 $data{$nametag}->{description} .= $_;
233 if ($tag eq "description") {
235 while ($content =~ s/\t+/' ' x (length($&) * 8 - length($`) % 8)/e) {}
237 $data{$what}->{$tag} .= "\n";
250 $data{$what}->{$tag} .= $content;
255 $data{$what}->{$tag} .= "\n$1";
256 $data{$what}->{$tag} =~ s/\n+$//;
263 $data{$nametag}->{description} =~ s/^\n+// if ($data{$nametag}->{description});
265 …parse_error($file, $ln, "What '$what' doesn't have a description", "") if (!$data{$what}->{descrip…
268 $symbols{$w}->{xref} = $what;
278 next if ($data{$what}->{file} eq "File");
280 foreach my $p (@{$data{$what}->{label_list}}) {
283 $label =~ tr/A-Z/a-z/;
286 $label =~s/([\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xff])/_/g;
297 $data{$what}->{label} = $label;
310 # Boundaries are punct characters, spaces and end-of-line
314 my $symbols = qr { ([\x01-\x08\x0e-\x1f\x21-\x2f\x3a-\x40\x7b-\xff]) }x;
322 ($data{$a}->{type} eq "File") cmp ($data{$b}->{type} eq "File") ||
325 my $type = $data{$what}->{type};
327 my @file = split / /, $data{$what}->{file};
328 my @filepath = split / /, $data{$what}->{filepath};
333 $data{$what}->{line_no};
341 if ($what =~ m#^(\/?(?:[\w\-]+\/?){1,2})#) {
350 $bar =~ s/./-/g;
354 printf ".. _%s:\n\n", $data{$what}->{label};
365 print "+-" . "-" x $len . "-+\n";
367 printf "| %s", $name . " " x ($len - length($name)) . " |\n";
368 print "+-" . "-" x $len . "-+\n";
379 $path =~ s,[/\-],_,g;;
382 if ($type eq "File") {
389 if ($type eq "File") {
391 $bar =~ s/./-/g;
396 $desc = $data{$what}->{description} if (defined($data{$what}->{description}));
404 # level order for each markup.
405 $desc =~ s/\n[\-\*\=\^\~]+\n/\n\n/g;
407 # Enrich text by creating cross-references
410 my $init_indent = -1;
411 my $literal_indent = -1;
423 $literal_indent = -1;
433 my @matches = $d =~ m,Documentation/ABI/([\w\/\-]+),g;
438 $path =~ s,[/\-],_,g;;
448 if (defined($data{$s}) && defined($data{$s}->{label})) {
452 $xref = ":ref:`$xref <" . $data{$s}->{label} . ">`";
467 $desc =~ s/\n[\-\*\=\^\~]+\n/\n\n/g;
469 if ($desc =~ m/\:\n/ || $desc =~ m/\n[\t ]+/ || $desc =~ m/[\x00-\x08\x0b-\x1f\x7b-\xff]/) {
477 $desc =~s/([\x00-\x08\x0b-\x1f\x21-\x2a\x2d\x2f\x3c-\x40\x5c\x5e-\x60\x7b-\xff])/\\$1/g;
482 print "DESCRIPTION MISSING for $what\n\n" if (!$data{$what}->{is_file});
485 if ($data{$what}->{symbols}) {
488 foreach my $content(@{$data{$what}->{symbols}}) {
489 my $label = $data{$symbols{$content}->{xref}}->{label};
492 $content =~s/([\x00-\x1f\x21-\x2f\x3a-\x40\x7b-\xff])/\\$1/g;
494 print "- :ref:`$content <$label>`\n\n";
498 if (defined($data{$what}->{users})) {
499 my $users = $data{$what}->{users};
515 my $type = $data{$what}->{type};
516 next if ($type eq "File");
518 my $file = $data{$what}->{filepath};
522 $bar =~ s/./-/g;
526 my $kernelversion = $data{$what}->{kernelversion} if (defined($data{$what}->{kernelversion}));
527 my $contact = $data{$what}->{contact} if (defined($data{$what}->{contact}));
528 my $users = $data{$what}->{users} if (defined($data{$what}->{users}));
529 my $date = $data{$what}->{date} if (defined($data{$what}->{date}));
530 my $desc = $data{$what}->{description} if (defined($data{$what}->{description}));
619 next if ($c eq "__name");
622 printf STDERR "Error: Couldn't find a non-empty name on a children of $file/.*: ";
639 my $escape_symbols = qr { ([\x01-\x08\x0e-\x1f\x21-\x29\x2b-\x2d\x3a-\x40\x7b-\xfe]) }x;
662 # Documentation/admin-guide/kernel-parameters.txt, but this
701 if ($leave =~ m/\.\*/ || $leave eq "" || $leave =~ /\\d/) {
723 my @expr = @{$leaf{$leave}->{expr}};
737 print STDERR "--> $names[$i]\n";
751 my @expr = @{$leaf{"others"}->{expr}};
765 my $what = $leaf{$leave}->{what};
791 $is_console = 1 if (-t STDERR);
804 my $tm = $cur_time - $start_time;
805 my $time = sprintf "%d:%02d", int($tm), 60 * ($tm - int($tm));
810 STDERR->flush();
818 my $tm = $cur_time - $start_time;
819 my $time = sprintf "%d:%02d", int($tm), 60 * ($tm - int($tm));
838 $leaf{"others"}->{what} = "";
850 # Temporarily change [0-9]+ type of patterns
851 $what =~ s/\[0\-9\]\+/\xff/g;
853 # Temporarily change [\d+-\d+] type of patterns
854 $what =~ s/\[0\-\d+\]/\xff/g;
857 # Temporarily change [0-9] type of patterns
858 $what =~ s/\[(\d)\-(\d)\]/\xf4$1-$2\xf5/g;
872 # Recover [0-9] type of patterns
891 $what =~ s/(\d+)\\(-\d+)/$1$2/g;
910 next if ($leaf{$l}->{what} =~ m/\b$what\b/);
911 $leaf{$l}->{what} .= "\xac" . $what;
914 $leaf{$l}->{what} = $what;
927 foreach my $w(sort split /\xac/, $leaf{$l}->{what}) {
930 $leaf{$l}->{expr} = \@expr;
945 # with --enable-lineno
948 if ($cmd eq "undefined" || $cmd eq "search") {
956 print STDERR Data::Dumper->Dump([\%data], [qw(*data)]) if ($debug & $dbg_dump_abi_structs);
961 if ($cmd eq "undefined") {
963 } elsif ($cmd eq "search") {
966 if ($cmd eq "rest") {
972 my @files = @{$symbols{$what}->{file}};
985 get_abi.pl - parse the Linux ABI files and produce a ReST book.
989 B<get_abi.pl> [--debug <level>] [--enable-lineno] [--man] [--help]
990 [--(no-)rst-source] [--dir=<dir>] [--show-hints]
991 [--search-string <regex>]
998 B<search> I<SEARCH_REGEX> - search for I<SEARCH_REGEX> inside ABI
1000 B<rest> - output the ABI in ReST markup language
1002 B<validate> - validate the ABI contents
1004 B<undefined> - existing symbols at the system that aren't
1013 =item B<--dir>
1018 =item B<--rst-source> and B<--no-rst-source>
1021 selecting between a rst-compliant source ABI (B<--rst-source>), or a
1023 logic (B<--no-rst-source>).
1025 =item B<--enable-lineno>
1029 =item B<--debug> I<debug level>
1031 Print debug information according with the level, which is given by the
1034 - 1: Debug parsing What entries from ABI files;
1035 - 2: Shows what files are opened from ABI files;
1036 - 4: Dump the structs used to store the contents of the ABI files.
1038 =item B<--show-hints>
1043 =item B<--search-string> I<regex string>
1048 =item B<--help>
1052 =item B<--man>
1070 $ scripts/get_abi.pl search usb --dir Documentation/ABI/stable
1086 $ scripts/get_abi.pl rest --dir Documentation/ABI/obsolete
1096 Copyright (c) 2016-2021 by Mauro Carvalho Chehab <mchehab+huawei@kernel.org>.