Commit 1ad560e4 authored by Jani Nikula's avatar Jani Nikula

kernel-doc: abstract filename mapping

Reduce duplication in follow-up work. No functional changes.
Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
parent da9726ec
...@@ -2730,26 +2730,35 @@ sub local_unescape($) { ...@@ -2730,26 +2730,35 @@ sub local_unescape($) {
return $text; return $text;
} }
sub process_file($) { sub map_filename($) {
my $file; my $file;
my $identifier;
my $func;
my $descr;
my $in_purpose = 0;
my $initial_section_counter = $section_counter;
my ($orig_file) = @_; my ($orig_file) = @_;
my $leading_space;
if (defined($ENV{'SRCTREE'})) { if (defined($ENV{'SRCTREE'})) {
$file = "$ENV{'SRCTREE'}" . "/" . $orig_file; $file = "$ENV{'SRCTREE'}" . "/" . $orig_file;
} } else {
else {
$file = $orig_file; $file = $orig_file;
} }
if (defined($source_map{$file})) { if (defined($source_map{$file})) {
$file = $source_map{$file}; $file = $source_map{$file};
} }
return $file;
}
sub process_file($) {
my $file;
my $identifier;
my $func;
my $descr;
my $in_purpose = 0;
my $initial_section_counter = $section_counter;
my ($orig_file) = @_;
my $leading_space;
$file = map_filename($orig_file);
if (!open(IN,"<$file")) { if (!open(IN,"<$file")) {
print STDERR "Error: Cannot open file $file\n"; print STDERR "Error: Cannot open file $file\n";
++$errors; ++$errors;
......
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