texinfo-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[no subject]


From: Patrice Dumas
Date: Wed, 2 Mar 2022 05:32:47 -0500 (EST)

branch: master
commit 0382b6ccb706a24c034ecea776f4da92a7c5e934
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Wed Mar 2 00:25:52 2022 +0100

    * tp/Texinfo/Convert/HTML.pm (_parse_htmlxref_files)
    (_load_htmlxref_files, _prepare_css): decode file names for messages,
    encode file names for filesystem access.  Other minor changes in the
    code.
    
    * tp/Texinfo/Convert/HTML.pm (_parse_htmlxref_files, _process_css_file)
    (output), tp/Texinfo/Convert/Info.pm (output), tp/Texinfo/Report.pm
    (line_warn, line_error), tp/texi2any.pl: use
    Texinfo::Report::line_warn instead of Texinfo::Report::file_line_warn
    and similarly for error, by setting up $error_location_info using the
    file name and line number.
---
 ChangeLog                                          | 14 ++++
 tp/TODO                                            |  7 +-
 tp/Texinfo/Convert/HTML.pm                         | 90 ++++++++++++++--------
 tp/Texinfo/Convert/Info.pm                         | 20 ++---
 tp/Texinfo/Report.pm                               | 78 ++++---------------
 tp/t/results/converters_tests/empty.pl             |  6 +-
 .../converters_tests/minimal_empty_empty.pl        |  6 +-
 .../converters_tests/minimal_empty_with_bye.pl     |  6 +-
 .../converters_tests/minimal_empty_with_input.pl   |  6 +-
 .../converters_tests/simplest_no_node_section.pl   |  6 +-
 .../things_before_setfilename_no_element.pl        |  6 +-
 tp/t/results/formatting/cond.pl                    |  3 +-
 .../results/formatting/cond_ifhtml_ifinfo_iftex.pl |  3 +-
 .../cond_no-ifhtml_no-ifinfo_no-iftex.pl           |  3 +-
 tp/t/results/formatting/defcondx_Dbar.pl           |  3 +-
 tp/t/results/formatting/defcondx_Ubar.pl           |  3 +-
 tp/t/results/formatting/one_line.pl                |  3 +-
 tp/t/results/formatting/one_line_no_content.pl     |  3 +-
 .../formatting/simplest_test_date_in_header.pl     |  3 +-
 tp/t/results/formatting/simplest_test_prefix.pl    |  3 +-
 tp/t/results/formatting/texi_cond.pl               |  3 +-
 tp/t/results/html_tests/commands_in_abbr.pl        |  3 +-
 tp/t/results/html_tests/commands_in_alt.pl         |  3 +-
 ...lines_at_beginning_no_setfilename_no_element.pl |  3 +-
 .../html_tests/example_at_commands_arguments.pl    |  3 +-
 tp/t/results/html_tests/example_class.pl           |  3 +-
 tp/t/results/html_tests/example_empty_arguments.pl |  3 +-
 tp/t/results/html_tests/example_multi_class.pl     |  3 +-
 tp/t/results/html_tests/image_link_prefix.pl       |  3 +-
 tp/t/results/html_tests/mathjax_with_texinfo.pl    |  3 +-
 .../mathjax_with_texinfo_enable_encoding.pl        |  3 +-
 .../mathjax_with_texinfo_no_convert_to_latex.pl    |  3 +-
 tp/t/results/html_tests/raw_html.pl                |  3 +-
 tp/t/results/html_tests/shortcontents_no_top.pl    |  3 +-
 tp/t/results/html_tests/simple_menu.pl             |  3 +-
 tp/t/results/html_tests/simple_menu_in_example.pl  |  3 +-
 tp/t/results/html_tests/tex_expanded_in_copying.pl |  3 +-
 .../verbatim_in_multitable_in_example.pl           |  3 +-
 tp/t/results/html_tests/xml_protected_in_verb.pl   |  3 +-
 tp/t/results/htmlxref/htmlxref.pl                  |  8 +-
 tp/t/results/htmlxref/htmlxref_nodes.pl            |  8 +-
 tp/t/results/moreindices/double_index_entry.pl     |  3 +-
 tp/t/results/moreindices/nodes_before_top.pl       |  3 +-
 .../moreindices/nodes_before_top_no_nodes.pl       |  3 +-
 tp/t/results/moreindices/nodes_before_top_nodes.pl |  3 +-
 tp/t/results/moresectioning/equivalent_nodes.pl    |  3 +-
 .../moresectioning/equivalent_nodes_no_node.pl     |  3 +-
 tp/t/results/moresectioning/node_footnote_end.pl   |  3 +-
 .../moresectioning/node_footnote_separated.pl      |  3 +-
 .../moresectioning/node_footnote_use_node.pl       |  3 +-
 .../nodes_after_top_before_chapter.pl              |  3 +-
 ...s_after_top_before_chapter_use_nodes_chapter.pl |  3 +-
 .../nodes_after_top_before_section.pl              |  3 +-
 .../nodes_after_top_before_section_use_nodes.pl    |  3 +-
 ...s_after_top_before_section_use_nodes_chapter.pl |  3 +-
 tp/t/results/moresectioning/sectioning_frames.pl   |  3 +-
 .../transliterated_split_equivalent_nodes.pl       |  3 +-
 tp/texi2any.pl                                     |  3 +-
 58 files changed, 228 insertions(+), 168 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 3aa8a42e0d..6273ed226c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -15,6 +15,20 @@
 
        Patrice reported that encode_file_name should be used here.
 
+2022-03-01  Patrice Dumas  <pertusus@free.fr>
+
+       * tp/Texinfo/Convert/HTML.pm (_parse_htmlxref_files)
+       (_load_htmlxref_files, _prepare_css): decode file names for messages,
+       encode file names for filesystem access.  Other minor changes in the
+       code.
+
+       * tp/Texinfo/Convert/HTML.pm (_parse_htmlxref_files, _process_css_file)
+       (output), tp/Texinfo/Convert/Info.pm (output), tp/Texinfo/Report.pm
+       (line_warn, line_error), tp/texi2any.pl: use
+       Texinfo::Report::line_warn instead of Texinfo::Report::file_line_warn
+       and similarly for error, by setting up $error_location_info using the
+       file name and line number.
+
 2022-03-01  Patrice Dumas  <pertusus@free.fr>
 
        * tp/Texinfo/ParserNonXS.pm (parse_texi_file, _save_line_directive)
diff --git a/tp/TODO b/tp/TODO
index e7662a9f1c..e5dbfcbfc4 100644
--- a/tp/TODO
+++ b/tp/TODO
@@ -36,9 +36,6 @@ bytes.  To check that they can never be upgraded + document
  and in error messages through line_warn line_error.
  $source_info->{'file_name'} passed through 
 
- l 2071 decode
-         $previous_input->{'input_file_info'}->{'file_name'}, $!));
-
  $self->{'info'}->{'input_file_name'}
  $self->{'info'}->{'input_directory'}
 
@@ -97,6 +94,10 @@ Should we warn if output is on STDOUT and 
OUTPUT_ENCODING_NAME != MESSAGE_OUTPUT
 Check Archive::Zip/EPUB_CREATE_CONTAINER in epub with non ascii
 
 
+To check, requires bytes in input both for directory and file name
+locate_init_file
+
+
 Document bytes in input:
 create_destination_directory
 output_files_register_closed
diff --git a/tp/Texinfo/Convert/HTML.pm b/tp/Texinfo/Convert/HTML.pm
index 4ee05ac5f3..0198b17f94 100644
--- a/tp/Texinfo/Convert/HTML.pm
+++ b/tp/Texinfo/Convert/HTML.pm
@@ -6536,15 +6536,22 @@ sub _parse_htmlxref_files($$)
   my $htmlxref;
 
   foreach my $file (@$files) {
-    my ($fname) = $file;
+    my $fname = $file;
     if ($self->get_conf('TEST')) {
-      $fname =~ s/([^\/]+\/)*//; # strip directories for out-of-source builds
+      my ($volume, $directories);
+      # strip directories for out-of-source builds reproducible file names
+      ($volume, $directories, $fname) = File::Spec->splitpath($file);
     }
     print STDERR "html refs config file: $file\n" if 
($self->get_conf('DEBUG'));
-    unless (open (HTMLXREF, $file)) {
+    unless (open(HTMLXREF, $file)) {
+      my $htmlxref_file_name = $file;
+      my $encoding = $self->get_conf('DATA_INPUT_ENCODING_NAME');
+      if (defined($encoding)) {
+        $htmlxref_file_name = decode($encoding, $htmlxref_file_name);
+      }
       $self->document_warn($self,
         sprintf(__("could not open html refs config file %s: %s"),
-          $file, $!));
+          $htmlxref_file_name, $!));
       next;
     }
     my $line_nr = 0;
@@ -6571,12 +6578,13 @@ sub _parse_htmlxref_files($$)
       my $split_or_mono = shift @htmlxref;
       #print STDERR "$split_or_mono 
$Texi2HTML::Config::htmlxref_entries{$split_or_mono} $line_nr\n";
       if (!defined($split_or_mono)) {
-        $self->file_line_warn(__("missing type"),
-                                        $fname, $line_nr);
+        $self->line_warn($self, __("missing type"),
+                 {'file_name' => $fname, 'line_nr' => $line_nr});
         next;
       } elsif (!defined($htmlxref_entries{$split_or_mono})) {
-        $self->file_line_warn(sprintf(__("unrecognized type: %s"),
-                                      $split_or_mono), $fname, $line_nr);
+        $self->line_warn($self, sprintf(__("unrecognized type: %s"),
+                                        $split_or_mono),
+                    {'file_name' => $fname, 'line_nr' => $line_nr});
         next;
       }
       my $href = shift @htmlxref;
@@ -6623,19 +6631,18 @@ sub _load_htmlxref_files {
   unshift @htmlxref_dirs, '.';
 
   my @texinfo_htmlxref_files;
-  my $init_file_from_conf = $self->get_conf('HTMLXREF');
-  if ($init_file_from_conf) {
-    if (!$self->get_conf('TEST')) {
-      @texinfo_htmlxref_files = ( $init_file_from_conf );
-    } else {
-      @texinfo_htmlxref_files
-      = Texinfo::Common::locate_init_file ($init_file_from_conf,
-        \@htmlxref_dirs, 1);
-    }
-  } elsif (!$self->get_conf('TEST')) {
+  my $htmlxref_file_name = 'htmlxref.cnf';
+  my $htmlxref_file_name_from_conf = $self->get_conf('HTMLXREF');
+  $htmlxref_file_name = $htmlxref_file_name_from_conf
+    if (defined($htmlxref_file_name_from_conf));
+
+  # no htmlxref for tests, unless explicitely specified with HTMLXREF
+  if (!$self->get_conf('TEST') or defined($htmlxref_file_name_from_conf)) {
+    my ($encoded_htmlxref_file_name, $htmlxref_file_encoding)
+      = $self->encoded_output_file_name($htmlxref_file_name);
     @texinfo_htmlxref_files
-      = Texinfo::Common::locate_init_file ('htmlxref.cnf',
-                                           \@htmlxref_dirs, 1);
+      = Texinfo::Common::locate_init_file($encoded_htmlxref_file_name,
+                                          \@htmlxref_dirs, 1);
   }
   $self->{'htmlxref_files'} = \@texinfo_htmlxref_files;
 
@@ -7075,7 +7082,7 @@ sub _default_format_css_lines($;$)
     $css_text .= "$element_class {$css_style}\n"
       if defined($css_style );
   }
-  $css_text .= join('',@css_rule_lines) . "\n"
+  $css_text .= join('', @css_rule_lines) . "\n"
     if (@css_rule_lines);
   $css_text .= "-->\n</style>\n";
   foreach my $ref (@$css_refs) {
@@ -7090,6 +7097,7 @@ sub _process_css_file($$$)
   my $self = shift;
   my $fh =shift;
   my $file = shift;
+
   my $in_rules = 0;
   my $in_comment = 0;
   my $in_import = 0;
@@ -7105,6 +7113,7 @@ sub _process_css_file($$$)
       # https://developer.mozilla.org/en-US/docs/Web/CSS/@charset
       my $charset = 'utf-8';
       my $charset_line;
+      # should always be the first line
       if ($line =~ /^\@charset  *"([^"]+)" *; *$/) {
         $charset = $1;
         $charset_line = 1;
@@ -7179,12 +7188,12 @@ sub _process_css_file($$$)
       }
     }
   }
-  $self->file_line_warn(sprintf(__("string not closed in css file"),
-                        $file, $line_nr)) if ($in_string);
-  $self->file_line_warn(sprintf(__("--css-include ended in comment"),
-                        $file, $line_nr)) if ($in_comment);
-  $self->file_line_warn(sprintf(__("\@import not finished in css file"),
-                        $file, $line_nr))
+  $self->line_warn($self, __("string not closed in css file"),
+                 {'file_name' => $file, 'line_nr' => $line_nr}) if 
($in_string);
+  $self->line_warn($self, __("--css-include ended in comment"),
+                 {'file_name' => $file, 'line_nr' => $line_nr}) if 
($in_comment);
+  $self->line_warn($self, __("\@import not finished in css file"),
+                 {'file_name' => $file, 'line_nr' => $line_nr})
     if ($in_import and !$in_comment and !$in_string);
   return ($imports, $rules);
 }
@@ -7208,25 +7217,40 @@ sub _prepare_css($)
     } else {
       $css_file = $self->Texinfo::Common::locate_include_file($file);
       unless (defined($css_file)) {
+        my $input_file_name = $file;
+        my $encoding = $self->get_conf('DATA_INPUT_ENCODING_NAME');
+        if (defined($encoding)) {
+          $input_file_name = decode($encoding, $input_file_name);
+        }
         $self->document_warn($self, sprintf(
-               __("CSS file %s not found"), $file));
+               __("CSS file %s not found"), $input_file_name));
         next;
       }
       unless (open (CSSFILE, $css_file)) {
+        my $css_file_name = $css_file;
+        my $encoding = $self->get_conf('DATA_INPUT_ENCODING_NAME');
+        if (defined($encoding)) {
+          $css_file_name = decode($encoding, $css_file_name);
+        }
         $self->document_warn($self, sprintf(__(
              "could not open --include-file %s: %s"),
-              $css_file, $!));
+              $css_file_name, $!));
         next;
       }
       $css_file_fh = \*CSSFILE;
     }
     my ($import_lines, $rules_lines);
     ($import_lines, $rules_lines)
-      = $self->_process_css_file ($css_file_fh, $css_file);
+      = $self->_process_css_file($css_file_fh, $css_file);
     if (!close($css_file_fh)) {
+      my $css_file_name = $css_file;
+      my $encoding = $self->get_conf('DATA_INPUT_ENCODING_NAME');
+      if (defined($encoding)) {
+        $css_file_name = decode($encoding, $css_file_name);
+      }
       $self->document_warn($self,
             sprintf(__("error on closing CSS file %s: %s"),
-                                   $css_file, $!));
+                                   $css_file_name, $!));
     }
     push @css_import_lines, @$import_lines;
     push @css_rule_lines, @$rules_lines;
@@ -9438,9 +9462,9 @@ sub output($$)
     $self->{'title_string'} = $self->convert_tree_new_formatting_context(
           {'type' => '_string', 'contents' => [$self->{'title_tree'}]},
           'title_string');
-    $self->file_line_warn(__(
+    $self->line_warn($self, __(
                          "must specify a title with a title command or \@top"),
-                         $self->{'parser_info'}->{'input_file_name'});
+                     {'file_name' => 
$self->{'parser_info'}->{'input_file_name'}});
   } else {
     $self->{'title_string'} = $html_title_string;
   }
diff --git a/tp/Texinfo/Convert/Info.pm b/tp/Texinfo/Convert/Info.pm
index 777af3256f..338156bd86 100644
--- a/tp/Texinfo/Convert/Info.pm
+++ b/tp/Texinfo/Convert/Info.pm
@@ -101,8 +101,8 @@ sub output($)
   my @indirect_files;
   if (!defined($tree_units) or not defined($tree_units->[0]->{'extra'})
       or not defined($tree_units->[0]->{'extra'}->{'unit_command'})) {
-    $self->file_line_warn(__("document without nodes"), 
-                          $self->{'parser_info'}->{'input_file_name'});
+    $self->line_warn($self, __("document without nodes"),
+             {'file_name' => $self->{'parser_info'}->{'input_file_name'}});
     my $output = $header.$self->convert_tree($root);
     $self->count_context_bug_message('no element ');
 
@@ -118,8 +118,8 @@ sub output($)
   } else {
     unless ($self->{'structuring'} and $self->{'structuring'}->{'top_node'}
      and $self->{'structuring'}->{'top_node'}->{'extra'}->{'normalized'} eq 
'Top') {
-      $self->file_line_warn(__("document without Top node"),
-                            $self->{'parser_info'}->{'input_file_name'});
+      $self->line_warn($self, __("document without Top node"),
+             {'file_name' => $self->{'parser_info'}->{'input_file_name'}});
     }
     $out_file_nr = 1;
     my $first_node = 0;
@@ -132,7 +132,7 @@ sub output($)
         $first_node = 1;
         if (defined($self->{'text_before_first_node'})) {
           $complete_header .= $self->{'text_before_first_node'};
-          $complete_header_bytes += 
+          $complete_header_bytes +=
             Texinfo::Convert::Plaintext::count_bytes($self,
                                    $self->{'text_before_first_node'});
         }
@@ -147,9 +147,9 @@ sub output($)
         $result .= $node_text;
       }
       $self->update_count_context();
-      if (defined($self->get_conf('SPLIT_SIZE')) 
-          and $self->{'count_context'}->[-1]->{'bytes'} > 
-                  $out_file_nr * $self->get_conf('SPLIT_SIZE') 
+      if (defined($self->get_conf('SPLIT_SIZE'))
+          and $self->{'count_context'}->[-1]->{'bytes'} >
+                  $out_file_nr * $self->get_conf('SPLIT_SIZE')
           and @nodes_root_elements and $fh) {
         my $close_error;
         if (!close ($fh)) {
@@ -177,7 +177,7 @@ sub output($)
           # and add the file with a number.
           @{$self->{'opened_files'}} = grep {$_ ne $output_file}
                @{$self->{'opened_files'}};
-          push @{$self->{'opened_files'}}, 
+          push @{$self->{'opened_files'}},
                    $output_file.'-'.$out_file_nr;
           push @indirect_files, [$output_filename.'-'.$out_file_nr,
                                  $complete_header_bytes];
@@ -354,7 +354,7 @@ sub _info_header($$$)
   if ($self->{'global_commands'} and $self->{'global_commands'}->{'copying'}) {
     print STDERR "COPYING HEADER\n" if ($self->get_conf('DEBUG'));
     $self->{'in_copying_header'} = 1;
-    my $copying = $self->convert_tree({'contents' => 
+    my $copying = $self->convert_tree({'contents' =>
           $self->{'global_commands'}->{'copying'}->{'contents'}});
     $result .= $copying;
     $result .= $self->process_footnotes();
diff --git a/tp/Texinfo/Report.pm b/tp/Texinfo/Report.pm
index 9600bb306d..703935366a 100644
--- a/tp/Texinfo/Report.pm
+++ b/tp/Texinfo/Report.pm
@@ -77,7 +77,8 @@ sub line_warn($$$$)
   return if (!defined($error_location_info));
   my $warn_line;
 
-  if ($error_location_info->{'macro'} ne '') {
+  if (defined($error_location_info->{'macro'})
+      and $error_location_info->{'macro'} ne '') {
     $warn_line = sprintf(__p("Texinfo source file warning",
                              "warning: %s (possibly involving \@%s)\n"),
                          $text, $error_location_info->{'macro'});
@@ -88,9 +89,12 @@ sub line_warn($$$$)
   }
   warn $warn_line if (defined($configuration_information)
                       and $configuration_information->get_conf('DEBUG'));
+  my %location_info = %{$error_location_info};
+  delete $location_info{'file_name'} if (exists ($location_info{'file_name'})
+                                  and not 
defined($location_info{'file_name'}));
   push @{$self->{'errors_warnings'}},
        { 'type' => 'warning', 'text' => $text, 'error_line' => $warn_line,
-         %{$error_location_info} };
+         %location_info };
 }
 
 # format a line error
@@ -108,6 +112,9 @@ sub line_error($$$$)
     my $error_text = "$text$macro_text\n";
     warn $error_text if (defined($configuration_information)
                          and $configuration_information->get_conf('DEBUG'));
+    my %location_info = %{$error_location_info};
+    delete $location_info{'file_name'} if (exists ($location_info{'file_name'})
+                                  and not 
defined($location_info{'file_name'}));
     push @{$self->{'errors_warnings'}},
          { 'type' => 'error', 'text' => $text,
            'error_line' => $error_text,
@@ -157,52 +164,6 @@ sub document_error($$$)
   $self->{'error_nrs'}++;
 }
 
-sub file_line_warn($$$;$)
-{
-  my $self = shift;
-  my $text = shift;
-  chomp($text);
-  my $file = shift;
-  my $line_nr = shift;
-
-  my $warn_line;
-  if (!defined($file)) {
-    $warn_line = sprintf(__p("file warning", "warning: %s\n"), $text);
-  } elsif (!defined($line_nr)) {
-    $warn_line = sprintf(__p("file warning", "%s: warning: %s\n"),
-                         $file, $text);
-  } else {
-    $warn_line = sprintf(__p("file warning", "%s:%d: warning: %s\n"),
-                         $file, $line_nr, $text);
-  }
-  #print STDERR "REPORT FILE_LINE_WARN $self $self->{'errors_warnings'}\n";
-  push @{$self->{'errors_warnings'}},
-    { 'type' => 'warning', 'text' => $text, 'error_line' => $warn_line};
-}
-
-sub file_line_error($$$;$)
-{
-  my $self = shift;
-  my $text = shift;
-  chomp($text);
-  my $file = shift;
-  my $line_nr = shift;
-
-  my $error_line;
-  if (!defined($file)) {
-    $error_line = "$text\n";
-  } elsif (!defined($line_nr)) {
-    $error_line = "$file: $text\n";
-  } else {
-    $error_line = "$file:$line_nr: $text\n";
-  }
-  #print STDERR "REPORT FILE_LINE_WARN $self $self->{'errors_warnings'}\n";
-  push @{$self->{'errors_warnings'}},
-    { 'type' => 'error', 'text' => $text, 'error_line' => $error_line};
-  $self->{'error_nrs'}++;
-}
-
-
 1;
 
 __END__
@@ -315,10 +276,14 @@ Register a warning or an error.  The I<$text> is the text 
of the
 error or warning.  The I<$configuration_information> object gives
 some information that can modify the messages or their delivery.
 The optional I<$error_location_info> holds the information on the error or
-warning location.  The I<$error_location_info> structure corresponds to
-the I<source_info> key of Texinfo tree elements as described
-in L<Texinfo::Parser/source_info>, and is normally obtained from Texinfo
-elements I<source_info> keys.
+warning location.  The I<$error_location_info> reference on hash may be
+obtained from Texinfo elements I<source_info> keys.   It may also
+be setup to point to a file name, using the C<file_name> key and
+to a line number, using the C<line_nr> key.  The C<file_name> key value
+should be a binary string.
+
+The I<source_info> key of Texinfo tree elements is described
+in more details in L<Texinfo::Parser/source_info>.
 
 =item $registrar->document_warn($configuration_information, $text)
 
@@ -330,15 +295,6 @@ Register a document-wide error or warning.  I<$text> is 
the error or
 warning message.  The I<$configuration_information> object gives
 some information that can modify the messages or their delivery.
 
-=item $registrar->file_line_warn($text, $file, $line_nr)
-
-=item $registrar->file_line_error($text, $file, $line_nr)
-X<C<file_line_warn>>
-X<C<file_line_error>>
-
-Register the error or warning message I<$text> for file I<$file>, with,
-optionally the line I<$line_nr> in the file.
-
 =back
 
 =head1 AUTHOR
diff --git a/tp/t/results/converters_tests/empty.pl 
b/tp/t/results/converters_tests/empty.pl
index 790e35e081..c3705bf2db 100644
--- a/tp/t/results/converters_tests/empty.pl
+++ b/tp/t/results/converters_tests/empty.pl
@@ -37,8 +37,9 @@ $result_floats{'empty'} = {};
 
 $result_converted_errors{'file_html'}->{'empty'} = [
   {
-    'error_line' => 'empty.texi: warning: must specify a title with a title 
command or @top
+    'error_line' => 'warning: must specify a title with a title command or @top
 ',
+    'file_name' => 'empty.texi',
     'text' => 'must specify a title with a title command or @top',
     'type' => 'warning'
   }
@@ -47,8 +48,9 @@ $result_converted_errors{'file_html'}->{'empty'} = [
 
 $result_converted_errors{'file_info'}->{'empty'} = [
   {
-    'error_line' => 'empty.texi: warning: document without nodes
+    'error_line' => 'warning: document without nodes
 ',
+    'file_name' => 'empty.texi',
     'text' => 'document without nodes',
     'type' => 'warning'
   }
diff --git a/tp/t/results/converters_tests/minimal_empty_empty.pl 
b/tp/t/results/converters_tests/minimal_empty_empty.pl
index 5d41084508..9160024be8 100644
--- a/tp/t/results/converters_tests/minimal_empty_empty.pl
+++ b/tp/t/results/converters_tests/minimal_empty_empty.pl
@@ -60,8 +60,9 @@ $result_floats{'minimal_empty_empty'} = {};
 
 $result_converted_errors{'file_html'}->{'minimal_empty_empty'} = [
   {
-    'error_line' => 'minimal_empty_empty.texi: warning: must specify a title 
with a title command or @top
+    'error_line' => 'warning: must specify a title with a title command or @top
 ',
+    'file_name' => 'minimal_empty_empty.texi',
     'text' => 'must specify a title with a title command or @top',
     'type' => 'warning'
   }
@@ -70,8 +71,9 @@ 
$result_converted_errors{'file_html'}->{'minimal_empty_empty'} = [
 
 $result_converted_errors{'file_info'}->{'minimal_empty_empty'} = [
   {
-    'error_line' => 'minimal_empty_empty.texi: warning: document without nodes
+    'error_line' => 'warning: document without nodes
 ',
+    'file_name' => 'minimal_empty_empty.texi',
     'text' => 'document without nodes',
     'type' => 'warning'
   }
diff --git a/tp/t/results/converters_tests/minimal_empty_with_bye.pl 
b/tp/t/results/converters_tests/minimal_empty_with_bye.pl
index 59528f7f24..4b9be4ee86 100644
--- a/tp/t/results/converters_tests/minimal_empty_with_bye.pl
+++ b/tp/t/results/converters_tests/minimal_empty_with_bye.pl
@@ -75,8 +75,9 @@ $result_floats{'minimal_empty_with_bye'} = {};
 
 $result_converted_errors{'file_html'}->{'minimal_empty_with_bye'} = [
   {
-    'error_line' => 'minimal_empty_with_bye.texi: warning: must specify a 
title with a title command or @top
+    'error_line' => 'warning: must specify a title with a title command or @top
 ',
+    'file_name' => 'minimal_empty_with_bye.texi',
     'text' => 'must specify a title with a title command or @top',
     'type' => 'warning'
   }
@@ -85,8 +86,9 @@ 
$result_converted_errors{'file_html'}->{'minimal_empty_with_bye'} = [
 
 $result_converted_errors{'file_info'}->{'minimal_empty_with_bye'} = [
   {
-    'error_line' => 'minimal_empty_with_bye.texi: warning: document without 
nodes
+    'error_line' => 'warning: document without nodes
 ',
+    'file_name' => 'minimal_empty_with_bye.texi',
     'text' => 'document without nodes',
     'type' => 'warning'
   }
diff --git a/tp/t/results/converters_tests/minimal_empty_with_input.pl 
b/tp/t/results/converters_tests/minimal_empty_with_input.pl
index 1051a16ce6..f5d3bc3507 100644
--- a/tp/t/results/converters_tests/minimal_empty_with_input.pl
+++ b/tp/t/results/converters_tests/minimal_empty_with_input.pl
@@ -60,8 +60,9 @@ $result_floats{'minimal_empty_with_input'} = {};
 
 $result_converted_errors{'file_html'}->{'minimal_empty_with_input'} = [
   {
-    'error_line' => 'minimal_empty_with_input.texi: warning: must specify a 
title with a title command or @top
+    'error_line' => 'warning: must specify a title with a title command or @top
 ',
+    'file_name' => 'minimal_empty_with_input.texi',
     'text' => 'must specify a title with a title command or @top',
     'type' => 'warning'
   }
@@ -70,8 +71,9 @@ 
$result_converted_errors{'file_html'}->{'minimal_empty_with_input'} = [
 
 $result_converted_errors{'file_info'}->{'minimal_empty_with_input'} = [
   {
-    'error_line' => 'minimal_empty_with_input.texi: warning: document without 
nodes
+    'error_line' => 'warning: document without nodes
 ',
+    'file_name' => 'minimal_empty_with_input.texi',
     'text' => 'document without nodes',
     'type' => 'warning'
   }
diff --git a/tp/t/results/converters_tests/simplest_no_node_section.pl 
b/tp/t/results/converters_tests/simplest_no_node_section.pl
index 33ea545b42..451aa9bb5c 100644
--- a/tp/t/results/converters_tests/simplest_no_node_section.pl
+++ b/tp/t/results/converters_tests/simplest_no_node_section.pl
@@ -159,8 +159,9 @@ $result_floats{'simplest_no_node_section'} = {};
 
 $result_converted_errors{'file_html'}->{'simplest_no_node_section'} = [
   {
-    'error_line' => 'simplest_no_node_section.texi: warning: must specify a 
title with a title command or @top
+    'error_line' => 'warning: must specify a title with a title command or @top
 ',
+    'file_name' => 'simplest_no_node_section.texi',
     'text' => 'must specify a title with a title command or @top',
     'type' => 'warning'
   }
@@ -169,8 +170,9 @@ 
$result_converted_errors{'file_html'}->{'simplest_no_node_section'} = [
 
 $result_converted_errors{'file_info'}->{'simplest_no_node_section'} = [
   {
-    'error_line' => 'simplest_no_node_section.texi: warning: document without 
nodes
+    'error_line' => 'warning: document without nodes
 ',
+    'file_name' => 'simplest_no_node_section.texi',
     'text' => 'document without nodes',
     'type' => 'warning'
   }
diff --git 
a/tp/t/results/converters_tests/things_before_setfilename_no_element.pl 
b/tp/t/results/converters_tests/things_before_setfilename_no_element.pl
index c10f11cf44..2035415dbc 100644
--- a/tp/t/results/converters_tests/things_before_setfilename_no_element.pl
+++ b/tp/t/results/converters_tests/things_before_setfilename_no_element.pl
@@ -1379,8 +1379,9 @@ 
$result_converted{'html'}->{'things_before_setfilename_no_element'} = '<!DOCTYPE
 
 $result_converted_errors{'html'}->{'things_before_setfilename_no_element'} = [
   {
-    'error_line' => 'things_before_setfilename_no_element.texi: warning: must 
specify a title with a title command or @top
+    'error_line' => 'warning: must specify a title with a title command or @top
 ',
+    'file_name' => 'things_before_setfilename_no_element.texi',
     'text' => 'must specify a title with a title command or @top',
     'type' => 'warning'
   }
@@ -1473,8 +1474,9 @@ End:
 
 $result_converted_errors{'info'}->{'things_before_setfilename_no_element'} = [
   {
-    'error_line' => 'things_before_setfilename_no_element.texi: warning: 
document without nodes
+    'error_line' => 'warning: document without nodes
 ',
+    'file_name' => 'things_before_setfilename_no_element.texi',
     'text' => 'document without nodes',
     'type' => 'warning'
   }
diff --git a/tp/t/results/formatting/cond.pl b/tp/t/results/formatting/cond.pl
index b1e84499b8..7ef0b24bc0 100644
--- a/tp/t/results/formatting/cond.pl
+++ b/tp/t/results/formatting/cond.pl
@@ -509,8 +509,9 @@ This is html text.
 
 $result_converted_errors{'html'}->{'cond'} = [
   {
-    'error_line' => 'cond.texi: warning: must specify a title with a title 
command or @top
+    'error_line' => 'warning: must specify a title with a title command or @top
 ',
+    'file_name' => 'cond.texi',
     'text' => 'must specify a title with a title command or @top',
     'type' => 'warning'
   }
diff --git a/tp/t/results/formatting/cond_ifhtml_ifinfo_iftex.pl 
b/tp/t/results/formatting/cond_ifhtml_ifinfo_iftex.pl
index 69a173c7c8..9df079de12 100644
--- a/tp/t/results/formatting/cond_ifhtml_ifinfo_iftex.pl
+++ b/tp/t/results/formatting/cond_ifhtml_ifinfo_iftex.pl
@@ -527,8 +527,9 @@ This is tex text.
 
 $result_converted_errors{'html'}->{'cond_ifhtml_ifinfo_iftex'} = [
   {
-    'error_line' => 'cond.texi: warning: must specify a title with a title 
command or @top
+    'error_line' => 'warning: must specify a title with a title command or @top
 ',
+    'file_name' => 'cond.texi',
     'text' => 'must specify a title with a title command or @top',
     'type' => 'warning'
   },
diff --git a/tp/t/results/formatting/cond_no-ifhtml_no-ifinfo_no-iftex.pl 
b/tp/t/results/formatting/cond_no-ifhtml_no-ifinfo_no-iftex.pl
index 5d86d78b9c..1d9d2cfff2 100644
--- a/tp/t/results/formatting/cond_no-ifhtml_no-ifinfo_no-iftex.pl
+++ b/tp/t/results/formatting/cond_no-ifhtml_no-ifinfo_no-iftex.pl
@@ -491,8 +491,9 @@ span.program-in-footer {font-size: smaller}
 
 $result_converted_errors{'html'}->{'cond_no-ifhtml_no-ifinfo_no-iftex'} = [
   {
-    'error_line' => 'cond.texi: warning: must specify a title with a title 
command or @top
+    'error_line' => 'warning: must specify a title with a title command or @top
 ',
+    'file_name' => 'cond.texi',
     'text' => 'must specify a title with a title command or @top',
     'type' => 'warning'
   }
diff --git a/tp/t/results/formatting/defcondx_Dbar.pl 
b/tp/t/results/formatting/defcondx_Dbar.pl
index 3f67a267df..8bebf4a097 100644
--- a/tp/t/results/formatting/defcondx_Dbar.pl
+++ b/tp/t/results/formatting/defcondx_Dbar.pl
@@ -420,8 +420,9 @@ $result_floats{'defcondx_Dbar'} = {};
 
 $result_converted_errors{'file_html'}->{'defcondx_Dbar'} = [
   {
-    'error_line' => 'defxcond.texi: warning: must specify a title with a title 
command or @top
+    'error_line' => 'warning: must specify a title with a title command or @top
 ',
+    'file_name' => 'defxcond.texi',
     'text' => 'must specify a title with a title command or @top',
     'type' => 'warning'
   }
diff --git a/tp/t/results/formatting/defcondx_Ubar.pl 
b/tp/t/results/formatting/defcondx_Ubar.pl
index 06c79cfe35..ea7034d4e3 100644
--- a/tp/t/results/formatting/defcondx_Ubar.pl
+++ b/tp/t/results/formatting/defcondx_Ubar.pl
@@ -355,8 +355,9 @@ $result_floats{'defcondx_Ubar'} = {};
 
 $result_converted_errors{'file_html'}->{'defcondx_Ubar'} = [
   {
-    'error_line' => 'defxcond.texi: warning: must specify a title with a title 
command or @top
+    'error_line' => 'warning: must specify a title with a title command or @top
 ',
+    'file_name' => 'defxcond.texi',
     'text' => 'must specify a title with a title command or @top',
     'type' => 'warning'
   }
diff --git a/tp/t/results/formatting/one_line.pl 
b/tp/t/results/formatting/one_line.pl
index bb7da058a7..f411d6069e 100644
--- a/tp/t/results/formatting/one_line.pl
+++ b/tp/t/results/formatting/one_line.pl
@@ -88,8 +88,9 @@ span.program-in-footer {font-size: smaller}
 
 $result_converted_errors{'html'}->{'one_line'} = [
   {
-    'error_line' => 'one_line.texi: warning: must specify a title with a title 
command or @top
+    'error_line' => 'warning: must specify a title with a title command or @top
 ',
+    'file_name' => 'one_line.texi',
     'text' => 'must specify a title with a title command or @top',
     'type' => 'warning'
   }
diff --git a/tp/t/results/formatting/one_line_no_content.pl 
b/tp/t/results/formatting/one_line_no_content.pl
index 363146505a..1d82247a36 100644
--- a/tp/t/results/formatting/one_line_no_content.pl
+++ b/tp/t/results/formatting/one_line_no_content.pl
@@ -87,8 +87,9 @@ span.program-in-footer {font-size: smaller}
 
 $result_converted_errors{'html'}->{'one_line_no_content'} = [
   {
-    'error_line' => 'one_line_no_content.texi: warning: must specify a title 
with a title command or @top
+    'error_line' => 'warning: must specify a title with a title command or @top
 ',
+    'file_name' => 'one_line_no_content.texi',
     'text' => 'must specify a title with a title command or @top',
     'type' => 'warning'
   }
diff --git a/tp/t/results/formatting/simplest_test_date_in_header.pl 
b/tp/t/results/formatting/simplest_test_date_in_header.pl
index ffa27144af..7ac8d59369 100644
--- a/tp/t/results/formatting/simplest_test_date_in_header.pl
+++ b/tp/t/results/formatting/simplest_test_date_in_header.pl
@@ -230,8 +230,9 @@ $result_floats{'simplest_test_date_in_header'} = {};
 
 $result_converted_errors{'file_html'}->{'simplest_test_date_in_header'} = [
   {
-    'error_line' => 'simplest.texi: warning: must specify a title with a title 
command or @top
+    'error_line' => 'warning: must specify a title with a title command or @top
 ',
+    'file_name' => 'simplest.texi',
     'text' => 'must specify a title with a title command or @top',
     'type' => 'warning'
   }
diff --git a/tp/t/results/formatting/simplest_test_prefix.pl 
b/tp/t/results/formatting/simplest_test_prefix.pl
index 2db9dceb80..2913ede177 100644
--- a/tp/t/results/formatting/simplest_test_prefix.pl
+++ b/tp/t/results/formatting/simplest_test_prefix.pl
@@ -230,8 +230,9 @@ $result_floats{'simplest_test_prefix'} = {};
 
 $result_converted_errors{'file_html'}->{'simplest_test_prefix'} = [
   {
-    'error_line' => 'simplest.texi: warning: must specify a title with a title 
command or @top
+    'error_line' => 'warning: must specify a title with a title command or @top
 ',
+    'file_name' => 'simplest.texi',
     'text' => 'must specify a title with a title command or @top',
     'type' => 'warning'
   }
diff --git a/tp/t/results/formatting/texi_cond.pl 
b/tp/t/results/formatting/texi_cond.pl
index cb47a2c92a..7a64fdd1fe 100644
--- a/tp/t/results/formatting/texi_cond.pl
+++ b/tp/t/results/formatting/texi_cond.pl
@@ -509,8 +509,9 @@ This is html text.
 
 $result_converted_errors{'html'}->{'texi_cond'} = [
   {
-    'error_line' => 'cond.texi: warning: must specify a title with a title 
command or @top
+    'error_line' => 'warning: must specify a title with a title command or @top
 ',
+    'file_name' => 'cond.texi',
     'text' => 'must specify a title with a title command or @top',
     'type' => 'warning'
   }
diff --git a/tp/t/results/html_tests/commands_in_abbr.pl 
b/tp/t/results/html_tests/commands_in_abbr.pl
index 2cda22aebc..903430754d 100644
--- a/tp/t/results/html_tests/commands_in_abbr.pl
+++ b/tp/t/results/html_tests/commands_in_abbr.pl
@@ -298,8 +298,9 @@ div.example {margin-left: 3.2em}
 
 $result_converted_errors{'html'}->{'commands_in_abbr'} = [
   {
-    'error_line' => 'commands_in_abbr.texi: warning: must specify a title with 
a title command or @top
+    'error_line' => 'warning: must specify a title with a title command or @top
 ',
+    'file_name' => 'commands_in_abbr.texi',
     'text' => 'must specify a title with a title command or @top',
     'type' => 'warning'
   }
diff --git a/tp/t/results/html_tests/commands_in_alt.pl 
b/tp/t/results/html_tests/commands_in_alt.pl
index 326ebfc051..6bd1a0b50e 100644
--- a/tp/t/results/html_tests/commands_in_alt.pl
+++ b/tp/t/results/html_tests/commands_in_alt.pl
@@ -315,8 +315,9 @@ div.example {margin-left: 3.2em}
 
 $result_converted_errors{'html'}->{'commands_in_alt'} = [
   {
-    'error_line' => 'commands_in_alt.texi: warning: must specify a title with 
a title command or @top
+    'error_line' => 'warning: must specify a title with a title command or @top
 ',
+    'file_name' => 'commands_in_alt.texi',
     'text' => 'must specify a title with a title command or @top',
     'type' => 'warning'
   }
diff --git 
a/tp/t/results/html_tests/empty_lines_at_beginning_no_setfilename_no_element.pl 
b/tp/t/results/html_tests/empty_lines_at_beginning_no_setfilename_no_element.pl
index 4cac992828..2dcb3b72cb 100644
--- 
a/tp/t/results/html_tests/empty_lines_at_beginning_no_setfilename_no_element.pl
+++ 
b/tp/t/results/html_tests/empty_lines_at_beginning_no_setfilename_no_element.pl
@@ -184,8 +184,9 @@ div.center {text-align:center}
 
 
$result_converted_errors{'html'}->{'empty_lines_at_beginning_no_setfilename_no_element'}
 = [
   {
-    'error_line' => 'empty_lines_at_beginning_no_setfilename_no_element.texi: 
warning: must specify a title with a title command or @top
+    'error_line' => 'warning: must specify a title with a title command or @top
 ',
+    'file_name' => 'empty_lines_at_beginning_no_setfilename_no_element.texi',
     'text' => 'must specify a title with a title command or @top',
     'type' => 'warning'
   }
diff --git a/tp/t/results/html_tests/example_at_commands_arguments.pl 
b/tp/t/results/html_tests/example_at_commands_arguments.pl
index 910f19aca5..b8d6c527f7 100644
--- a/tp/t/results/html_tests/example_at_commands_arguments.pl
+++ b/tp/t/results/html_tests/example_at_commands_arguments.pl
@@ -340,8 +340,9 @@ div.example {margin-left: 3.2em}
 
 $result_converted_errors{'html'}->{'example_at_commands_arguments'} = [
   {
-    'error_line' => 'example_at_commands_arguments.texi: warning: must specify 
a title with a title command or @top
+    'error_line' => 'warning: must specify a title with a title command or @top
 ',
+    'file_name' => 'example_at_commands_arguments.texi',
     'text' => 'must specify a title with a title command or @top',
     'type' => 'warning'
   }
diff --git a/tp/t/results/html_tests/example_class.pl 
b/tp/t/results/html_tests/example_class.pl
index 1b4a297b75..a17330c9d4 100644
--- a/tp/t/results/html_tests/example_class.pl
+++ b/tp/t/results/html_tests/example_class.pl
@@ -278,8 +278,9 @@ div.example {margin-left: 3.2em}
 
 $result_converted_errors{'html'}->{'example_class'} = [
   {
-    'error_line' => 'example_class.texi: warning: must specify a title with a 
title command or @top
+    'error_line' => 'warning: must specify a title with a title command or @top
 ',
+    'file_name' => 'example_class.texi',
     'text' => 'must specify a title with a title command or @top',
     'type' => 'warning'
   }
diff --git a/tp/t/results/html_tests/example_empty_arguments.pl 
b/tp/t/results/html_tests/example_empty_arguments.pl
index 76a59b5048..43be65f5b7 100644
--- a/tp/t/results/html_tests/example_empty_arguments.pl
+++ b/tp/t/results/html_tests/example_empty_arguments.pl
@@ -472,8 +472,9 @@ div.example {margin-left: 3.2em}
 
 $result_converted_errors{'html'}->{'example_empty_arguments'} = [
   {
-    'error_line' => 'example_empty_arguments.texi: warning: must specify a 
title with a title command or @top
+    'error_line' => 'warning: must specify a title with a title command or @top
 ',
+    'file_name' => 'example_empty_arguments.texi',
     'text' => 'must specify a title with a title command or @top',
     'type' => 'warning'
   }
diff --git a/tp/t/results/html_tests/example_multi_class.pl 
b/tp/t/results/html_tests/example_multi_class.pl
index bf444d7d62..f79b09e4df 100644
--- a/tp/t/results/html_tests/example_multi_class.pl
+++ b/tp/t/results/html_tests/example_multi_class.pl
@@ -388,8 +388,9 @@ div.example {margin-left: 3.2em}
 
 $result_converted_errors{'html'}->{'example_multi_class'} = [
   {
-    'error_line' => 'example_multi_class.texi: warning: must specify a title 
with a title command or @top
+    'error_line' => 'warning: must specify a title with a title command or @top
 ',
+    'file_name' => 'example_multi_class.texi',
     'text' => 'must specify a title with a title command or @top',
     'type' => 'warning'
   }
diff --git a/tp/t/results/html_tests/image_link_prefix.pl 
b/tp/t/results/html_tests/image_link_prefix.pl
index f6ac5e2fdb..7cfdfc28e2 100644
--- a/tp/t/results/html_tests/image_link_prefix.pl
+++ b/tp/t/results/html_tests/image_link_prefix.pl
@@ -85,8 +85,9 @@ $result_converted{'html'}->{'image_link_prefix'} = '<!DOCTYPE 
html>
 
 $result_converted_errors{'html'}->{'image_link_prefix'} = [
   {
-    'error_line' => 'image_link_prefix.texi: warning: must specify a title 
with a title command or @top
+    'error_line' => 'warning: must specify a title with a title command or @top
 ',
+    'file_name' => 'image_link_prefix.texi',
     'text' => 'must specify a title with a title command or @top',
     'type' => 'warning'
   },
diff --git a/tp/t/results/html_tests/mathjax_with_texinfo.pl 
b/tp/t/results/html_tests/mathjax_with_texinfo.pl
index fe4a6dd439..44cbbdeda4 100644
--- a/tp/t/results/html_tests/mathjax_with_texinfo.pl
+++ b/tp/t/results/html_tests/mathjax_with_texinfo.pl
@@ -404,8 +404,9 @@ MathJax = {
 
 $result_converted_errors{'html'}->{'mathjax_with_texinfo'} = [
   {
-    'error_line' => 'mathjax_with_texinfo.texi: warning: must specify a title 
with a title command or @top
+    'error_line' => 'warning: must specify a title with a title command or @top
 ',
+    'file_name' => 'mathjax_with_texinfo.texi',
     'text' => 'must specify a title with a title command or @top',
     'type' => 'warning'
   }
diff --git a/tp/t/results/html_tests/mathjax_with_texinfo_enable_encoding.pl 
b/tp/t/results/html_tests/mathjax_with_texinfo_enable_encoding.pl
index 2b34564369..baaa375374 100644
--- a/tp/t/results/html_tests/mathjax_with_texinfo_enable_encoding.pl
+++ b/tp/t/results/html_tests/mathjax_with_texinfo_enable_encoding.pl
@@ -419,8 +419,9 @@ MathJax = {
 
 $result_converted_errors{'html'}->{'mathjax_with_texinfo_enable_encoding'} = [
   {
-    'error_line' => 'mathjax_with_texinfo_enable_encoding.texi: warning: must 
specify a title with a title command or @top
+    'error_line' => 'warning: must specify a title with a title command or @top
 ',
+    'file_name' => 'mathjax_with_texinfo_enable_encoding.texi',
     'text' => 'must specify a title with a title command or @top',
     'type' => 'warning'
   }
diff --git 
a/tp/t/results/html_tests/mathjax_with_texinfo_no_convert_to_latex.pl 
b/tp/t/results/html_tests/mathjax_with_texinfo_no_convert_to_latex.pl
index be26ea0d1d..2be26cf42a 100644
--- a/tp/t/results/html_tests/mathjax_with_texinfo_no_convert_to_latex.pl
+++ b/tp/t/results/html_tests/mathjax_with_texinfo_no_convert_to_latex.pl
@@ -404,8 +404,9 @@ MathJax = {
 
 $result_converted_errors{'html'}->{'mathjax_with_texinfo_no_convert_to_latex'} 
= [
   {
-    'error_line' => 'mathjax_with_texinfo_no_convert_to_latex.texi: warning: 
must specify a title with a title command or @top
+    'error_line' => 'warning: must specify a title with a title command or @top
 ',
+    'file_name' => 'mathjax_with_texinfo_no_convert_to_latex.texi',
     'text' => 'must specify a title with a title command or @top',
     'type' => 'warning'
   }
diff --git a/tp/t/results/html_tests/raw_html.pl 
b/tp/t/results/html_tests/raw_html.pl
index 724fb39a09..2d171f1ddf 100644
--- a/tp/t/results/html_tests/raw_html.pl
+++ b/tp/t/results/html_tests/raw_html.pl
@@ -134,8 +134,9 @@ $result_converted{'html'}->{'raw_html'} = '<!DOCTYPE html>
 
 $result_converted_errors{'html'}->{'raw_html'} = [
   {
-    'error_line' => 'raw_html.texi: warning: must specify a title with a title 
command or @top
+    'error_line' => 'warning: must specify a title with a title command or @top
 ',
+    'file_name' => 'raw_html.texi',
     'text' => 'must specify a title with a title command or @top',
     'type' => 'warning'
   }
diff --git a/tp/t/results/html_tests/shortcontents_no_top.pl 
b/tp/t/results/html_tests/shortcontents_no_top.pl
index b03b7391b2..8042b1ae09 100644
--- a/tp/t/results/html_tests/shortcontents_no_top.pl
+++ b/tp/t/results/html_tests/shortcontents_no_top.pl
@@ -286,8 +286,9 @@ ul.toc-numbered-mark {list-style: none}
 
 $result_converted_errors{'html'}->{'shortcontents_no_top'} = [
   {
-    'error_line' => 'shortcontents_no_top.texi: warning: must specify a title 
with a title command or @top
+    'error_line' => 'warning: must specify a title with a title command or @top
 ',
+    'file_name' => 'shortcontents_no_top.texi',
     'text' => 'must specify a title with a title command or @top',
     'type' => 'warning'
   }
diff --git a/tp/t/results/html_tests/simple_menu.pl 
b/tp/t/results/html_tests/simple_menu.pl
index 4747be5709..140673d5db 100644
--- a/tp/t/results/html_tests/simple_menu.pl
+++ b/tp/t/results/html_tests/simple_menu.pl
@@ -2321,8 +2321,9 @@ in detaildescription
 
 $result_converted_errors{'html'}->{'simple_menu'} = [
   {
-    'error_line' => 'simple_menu.texi: warning: must specify a title with a 
title command or @top
+    'error_line' => 'warning: must specify a title with a title command or @top
 ',
+    'file_name' => 'simple_menu.texi',
     'text' => 'must specify a title with a title command or @top',
     'type' => 'warning'
   }
diff --git a/tp/t/results/html_tests/simple_menu_in_example.pl 
b/tp/t/results/html_tests/simple_menu_in_example.pl
index 53a5006216..b47c753867 100644
--- a/tp/t/results/html_tests/simple_menu_in_example.pl
+++ b/tp/t/results/html_tests/simple_menu_in_example.pl
@@ -795,8 +795,9 @@ pre.menu-preformatted {font-family: serif}
 
 $result_converted_errors{'html'}->{'simple_menu_in_example'} = [
   {
-    'error_line' => 'simple_menu_in_example.texi: warning: must specify a 
title with a title command or @top
+    'error_line' => 'warning: must specify a title with a title command or @top
 ',
+    'file_name' => 'simple_menu_in_example.texi',
     'text' => 'must specify a title with a title command or @top',
     'type' => 'warning'
   }
diff --git a/tp/t/results/html_tests/tex_expanded_in_copying.pl 
b/tp/t/results/html_tests/tex_expanded_in_copying.pl
index 5ae2cffcb9..2bf717d8d3 100644
--- a/tp/t/results/html_tests/tex_expanded_in_copying.pl
+++ b/tp/t/results/html_tests/tex_expanded_in_copying.pl
@@ -196,8 +196,9 @@ $result_converted{'html'}->{'tex_expanded_in_copying'} = 
'<!DOCTYPE html>
 
 $result_converted_errors{'html'}->{'tex_expanded_in_copying'} = [
   {
-    'error_line' => 'tex_expanded_in_copying.texi: warning: must specify a 
title with a title command or @top
+    'error_line' => 'warning: must specify a title with a title command or @top
 ',
+    'file_name' => 'tex_expanded_in_copying.texi',
     'text' => 'must specify a title with a title command or @top',
     'type' => 'warning'
   }
diff --git a/tp/t/results/html_tests/verbatim_in_multitable_in_example.pl 
b/tp/t/results/html_tests/verbatim_in_multitable_in_example.pl
index a2f0454836..1e10abc80d 100644
--- a/tp/t/results/html_tests/verbatim_in_multitable_in_example.pl
+++ b/tp/t/results/html_tests/verbatim_in_multitable_in_example.pl
@@ -450,8 +450,9 @@ div.example {margin-left: 3.2em}
 
 $result_converted_errors{'html'}->{'verbatim_in_multitable_in_example'} = [
   {
-    'error_line' => 'verbatim_in_multitable_in_example.texi: warning: must 
specify a title with a title command or @top
+    'error_line' => 'warning: must specify a title with a title command or @top
 ',
+    'file_name' => 'verbatim_in_multitable_in_example.texi',
     'text' => 'must specify a title with a title command or @top',
     'type' => 'warning'
   }
diff --git a/tp/t/results/html_tests/xml_protected_in_verb.pl 
b/tp/t/results/html_tests/xml_protected_in_verb.pl
index cfd3d73bc8..f79a589149 100644
--- a/tp/t/results/html_tests/xml_protected_in_verb.pl
+++ b/tp/t/results/html_tests/xml_protected_in_verb.pl
@@ -199,8 +199,9 @@ $result_converted{'html'}->{'xml_protected_in_verb'} = 
'<!DOCTYPE html>
 
 $result_converted_errors{'html'}->{'xml_protected_in_verb'} = [
   {
-    'error_line' => 'xml_protected_in_verb.texi: warning: must specify a title 
with a title command or @top
+    'error_line' => 'warning: must specify a title with a title command or @top
 ',
+    'file_name' => 'xml_protected_in_verb.texi',
     'text' => 'must specify a title with a title command or @top',
     'type' => 'warning'
   }
diff --git a/tp/t/results/htmlxref/htmlxref.pl 
b/tp/t/results/htmlxref/htmlxref.pl
index 0c6279241e..883b61add7 100644
--- a/tp/t/results/htmlxref/htmlxref.pl
+++ b/tp/t/results/htmlxref/htmlxref.pl
@@ -3665,14 +3665,18 @@ $result_floats{'htmlxref'} = {};
 
 $result_converted_errors{'file_html'}->{'htmlxref'} = [
   {
-    'error_line' => 'htmlxref.cnf:15: warning: unrecognized type: foo
+    'error_line' => 'warning: unrecognized type: foo
 ',
+    'file_name' => 'htmlxref.cnf',
+    'line_nr' => 15,
     'text' => 'unrecognized type: foo',
     'type' => 'warning'
   },
   {
-    'error_line' => 'htmlxref.cnf:16: warning: missing type
+    'error_line' => 'warning: missing type
 ',
+    'file_name' => 'htmlxref.cnf',
+    'line_nr' => 16,
     'text' => 'missing type',
     'type' => 'warning'
   }
diff --git a/tp/t/results/htmlxref/htmlxref_nodes.pl 
b/tp/t/results/htmlxref/htmlxref_nodes.pl
index 5fcd546ace..bc51170667 100644
--- a/tp/t/results/htmlxref/htmlxref_nodes.pl
+++ b/tp/t/results/htmlxref/htmlxref_nodes.pl
@@ -3665,14 +3665,18 @@ $result_floats{'htmlxref_nodes'} = {};
 
 $result_converted_errors{'file_html'}->{'htmlxref_nodes'} = [
   {
-    'error_line' => 'htmlxref.cnf:15: warning: unrecognized type: foo
+    'error_line' => 'warning: unrecognized type: foo
 ',
+    'file_name' => 'htmlxref.cnf',
+    'line_nr' => 15,
     'text' => 'unrecognized type: foo',
     'type' => 'warning'
   },
   {
-    'error_line' => 'htmlxref.cnf:16: warning: missing type
+    'error_line' => 'warning: missing type
 ',
+    'file_name' => 'htmlxref.cnf',
+    'line_nr' => 16,
     'text' => 'missing type',
     'type' => 'warning'
   }
diff --git a/tp/t/results/moreindices/double_index_entry.pl 
b/tp/t/results/moreindices/double_index_entry.pl
index b2bd30e3b0..0579894f23 100644
--- a/tp/t/results/moreindices/double_index_entry.pl
+++ b/tp/t/results/moreindices/double_index_entry.pl
@@ -644,8 +644,9 @@ $result_indices_sort_strings{'double_index_entry'} = {
 
 $result_converted_errors{'file_html'}->{'double_index_entry'} = [
   {
-    'error_line' => 'double_index_entry.texi: warning: must specify a title 
with a title command or @top
+    'error_line' => 'warning: must specify a title with a title command or @top
 ',
+    'file_name' => 'double_index_entry.texi',
     'text' => 'must specify a title with a title command or @top',
     'type' => 'warning'
   }
diff --git a/tp/t/results/moreindices/nodes_before_top.pl 
b/tp/t/results/moreindices/nodes_before_top.pl
index a1eb16b41f..99111f31a6 100644
--- a/tp/t/results/moreindices/nodes_before_top.pl
+++ b/tp/t/results/moreindices/nodes_before_top.pl
@@ -2783,8 +2783,9 @@ $result_indices_sort_strings{'nodes_before_top'} = {
 
 $result_converted_errors{'file_html'}->{'nodes_before_top'} = [
   {
-    'error_line' => 'nodes_before_top.texi: warning: must specify a title with 
a title command or @top
+    'error_line' => 'warning: must specify a title with a title command or @top
 ',
+    'file_name' => 'nodes_before_top.texi',
     'text' => 'must specify a title with a title command or @top',
     'type' => 'warning'
   }
diff --git a/tp/t/results/moreindices/nodes_before_top_no_nodes.pl 
b/tp/t/results/moreindices/nodes_before_top_no_nodes.pl
index 02ae0c8a41..42e5a50094 100644
--- a/tp/t/results/moreindices/nodes_before_top_no_nodes.pl
+++ b/tp/t/results/moreindices/nodes_before_top_no_nodes.pl
@@ -2783,8 +2783,9 @@ $result_indices_sort_strings{'nodes_before_top_no_nodes'} 
= {
 
 $result_converted_errors{'file_html'}->{'nodes_before_top_no_nodes'} = [
   {
-    'error_line' => 'nodes_before_top.texi: warning: must specify a title with 
a title command or @top
+    'error_line' => 'warning: must specify a title with a title command or @top
 ',
+    'file_name' => 'nodes_before_top.texi',
     'text' => 'must specify a title with a title command or @top',
     'type' => 'warning'
   }
diff --git a/tp/t/results/moreindices/nodes_before_top_nodes.pl 
b/tp/t/results/moreindices/nodes_before_top_nodes.pl
index 2229e3d666..a0537d51be 100644
--- a/tp/t/results/moreindices/nodes_before_top_nodes.pl
+++ b/tp/t/results/moreindices/nodes_before_top_nodes.pl
@@ -2783,8 +2783,9 @@ $result_indices_sort_strings{'nodes_before_top_nodes'} = {
 
 $result_converted_errors{'file_html'}->{'nodes_before_top_nodes'} = [
   {
-    'error_line' => 'nodes_before_top.texi: warning: must specify a title with 
a title command or @top
+    'error_line' => 'warning: must specify a title with a title command or @top
 ',
+    'file_name' => 'nodes_before_top.texi',
     'text' => 'must specify a title with a title command or @top',
     'type' => 'warning'
   }
diff --git a/tp/t/results/moresectioning/equivalent_nodes.pl 
b/tp/t/results/moresectioning/equivalent_nodes.pl
index 1b13adf15c..381632af65 100644
--- a/tp/t/results/moresectioning/equivalent_nodes.pl
+++ b/tp/t/results/moresectioning/equivalent_nodes.pl
@@ -1043,8 +1043,9 @@ $result_floats{'equivalent_nodes'} = {
 
 $result_converted_errors{'file_html'}->{'equivalent_nodes'} = [
   {
-    'error_line' => 'equivalent_nodes.texi: warning: must specify a title with 
a title command or @top
+    'error_line' => 'warning: must specify a title with a title command or @top
 ',
+    'file_name' => 'equivalent_nodes.texi',
     'text' => 'must specify a title with a title command or @top',
     'type' => 'warning'
   }
diff --git a/tp/t/results/moresectioning/equivalent_nodes_no_node.pl 
b/tp/t/results/moresectioning/equivalent_nodes_no_node.pl
index d98315e9dd..1da34af757 100644
--- a/tp/t/results/moresectioning/equivalent_nodes_no_node.pl
+++ b/tp/t/results/moresectioning/equivalent_nodes_no_node.pl
@@ -1043,8 +1043,9 @@ $result_floats{'equivalent_nodes_no_node'} = {
 
 $result_converted_errors{'file_html'}->{'equivalent_nodes_no_node'} = [
   {
-    'error_line' => 'equivalent_nodes.texi: warning: must specify a title with 
a title command or @top
+    'error_line' => 'warning: must specify a title with a title command or @top
 ',
+    'file_name' => 'equivalent_nodes.texi',
     'text' => 'must specify a title with a title command or @top',
     'type' => 'warning'
   }
diff --git a/tp/t/results/moresectioning/node_footnote_end.pl 
b/tp/t/results/moresectioning/node_footnote_end.pl
index f8be995e13..c5a06020b9 100644
--- a/tp/t/results/moresectioning/node_footnote_end.pl
+++ b/tp/t/results/moresectioning/node_footnote_end.pl
@@ -1648,8 +1648,9 @@ $result_floats{'node_footnote_end'} = {};
 
 $result_converted_errors{'file_html'}->{'node_footnote_end'} = [
   {
-    'error_line' => 'node_footnote.texi: warning: must specify a title with a 
title command or @top
+    'error_line' => 'warning: must specify a title with a title command or @top
 ',
+    'file_name' => 'node_footnote.texi',
     'text' => 'must specify a title with a title command or @top',
     'type' => 'warning'
   }
diff --git a/tp/t/results/moresectioning/node_footnote_separated.pl 
b/tp/t/results/moresectioning/node_footnote_separated.pl
index 704aa8e78c..675ea5dbc8 100644
--- a/tp/t/results/moresectioning/node_footnote_separated.pl
+++ b/tp/t/results/moresectioning/node_footnote_separated.pl
@@ -1620,8 +1620,9 @@ $result_floats{'node_footnote_separated'} = {};
 
 $result_converted_errors{'file_html'}->{'node_footnote_separated'} = [
   {
-    'error_line' => 'node_footnote.texi: warning: must specify a title with a 
title command or @top
+    'error_line' => 'warning: must specify a title with a title command or @top
 ',
+    'file_name' => 'node_footnote.texi',
     'text' => 'must specify a title with a title command or @top',
     'type' => 'warning'
   }
diff --git a/tp/t/results/moresectioning/node_footnote_use_node.pl 
b/tp/t/results/moresectioning/node_footnote_use_node.pl
index 09a3dbbc1c..6b329b7117 100644
--- a/tp/t/results/moresectioning/node_footnote_use_node.pl
+++ b/tp/t/results/moresectioning/node_footnote_use_node.pl
@@ -1620,8 +1620,9 @@ $result_floats{'node_footnote_use_node'} = {};
 
 $result_converted_errors{'file_html'}->{'node_footnote_use_node'} = [
   {
-    'error_line' => 'node_footnote.texi: warning: must specify a title with a 
title command or @top
+    'error_line' => 'warning: must specify a title with a title command or @top
 ',
+    'file_name' => 'node_footnote.texi',
     'text' => 'must specify a title with a title command or @top',
     'type' => 'warning'
   }
diff --git a/tp/t/results/moresectioning/nodes_after_top_before_chapter.pl 
b/tp/t/results/moresectioning/nodes_after_top_before_chapter.pl
index 1f2772f650..0507e9c860 100644
--- a/tp/t/results/moresectioning/nodes_after_top_before_chapter.pl
+++ b/tp/t/results/moresectioning/nodes_after_top_before_chapter.pl
@@ -804,8 +804,9 @@ $result_floats{'nodes_after_top_before_chapter'} = {};
 
 $result_converted_errors{'file_html'}->{'nodes_after_top_before_chapter'} = [
   {
-    'error_line' => 'nodes_after_top_before_chapter.texi: warning: must 
specify a title with a title command or @top
+    'error_line' => 'warning: must specify a title with a title command or @top
 ',
+    'file_name' => 'nodes_after_top_before_chapter.texi',
     'text' => 'must specify a title with a title command or @top',
     'type' => 'warning'
   }
diff --git 
a/tp/t/results/moresectioning/nodes_after_top_before_chapter_use_nodes_chapter.pl
 
b/tp/t/results/moresectioning/nodes_after_top_before_chapter_use_nodes_chapter.pl
index 2aac5ab0cd..398615f70e 100644
--- 
a/tp/t/results/moresectioning/nodes_after_top_before_chapter_use_nodes_chapter.pl
+++ 
b/tp/t/results/moresectioning/nodes_after_top_before_chapter_use_nodes_chapter.pl
@@ -804,8 +804,9 @@ 
$result_floats{'nodes_after_top_before_chapter_use_nodes_chapter'} = {};
 
 
$result_converted_errors{'file_html'}->{'nodes_after_top_before_chapter_use_nodes_chapter'}
 = [
   {
-    'error_line' => 'nodes_after_top_before_chapter.texi: warning: must 
specify a title with a title command or @top
+    'error_line' => 'warning: must specify a title with a title command or @top
 ',
+    'file_name' => 'nodes_after_top_before_chapter.texi',
     'text' => 'must specify a title with a title command or @top',
     'type' => 'warning'
   }
diff --git a/tp/t/results/moresectioning/nodes_after_top_before_section.pl 
b/tp/t/results/moresectioning/nodes_after_top_before_section.pl
index 2458658786..9cd3a23535 100644
--- a/tp/t/results/moresectioning/nodes_after_top_before_section.pl
+++ b/tp/t/results/moresectioning/nodes_after_top_before_section.pl
@@ -804,8 +804,9 @@ $result_floats{'nodes_after_top_before_section'} = {};
 
 $result_converted_errors{'file_html'}->{'nodes_after_top_before_section'} = [
   {
-    'error_line' => 'nodes_after_top_before_section.texi: warning: must 
specify a title with a title command or @top
+    'error_line' => 'warning: must specify a title with a title command or @top
 ',
+    'file_name' => 'nodes_after_top_before_section.texi',
     'text' => 'must specify a title with a title command or @top',
     'type' => 'warning'
   }
diff --git 
a/tp/t/results/moresectioning/nodes_after_top_before_section_use_nodes.pl 
b/tp/t/results/moresectioning/nodes_after_top_before_section_use_nodes.pl
index debf11de82..2dde6aa1f7 100644
--- a/tp/t/results/moresectioning/nodes_after_top_before_section_use_nodes.pl
+++ b/tp/t/results/moresectioning/nodes_after_top_before_section_use_nodes.pl
@@ -804,8 +804,9 @@ $result_floats{'nodes_after_top_before_section_use_nodes'} 
= {};
 
 
$result_converted_errors{'file_html'}->{'nodes_after_top_before_section_use_nodes'}
 = [
   {
-    'error_line' => 'nodes_after_top_before_section.texi: warning: must 
specify a title with a title command or @top
+    'error_line' => 'warning: must specify a title with a title command or @top
 ',
+    'file_name' => 'nodes_after_top_before_section.texi',
     'text' => 'must specify a title with a title command or @top',
     'type' => 'warning'
   }
diff --git 
a/tp/t/results/moresectioning/nodes_after_top_before_section_use_nodes_chapter.pl
 
b/tp/t/results/moresectioning/nodes_after_top_before_section_use_nodes_chapter.pl
index 11ac2c3209..9dcd48eab2 100644
--- 
a/tp/t/results/moresectioning/nodes_after_top_before_section_use_nodes_chapter.pl
+++ 
b/tp/t/results/moresectioning/nodes_after_top_before_section_use_nodes_chapter.pl
@@ -804,8 +804,9 @@ 
$result_floats{'nodes_after_top_before_section_use_nodes_chapter'} = {};
 
 
$result_converted_errors{'file_html'}->{'nodes_after_top_before_section_use_nodes_chapter'}
 = [
   {
-    'error_line' => 'nodes_after_top_before_section.texi: warning: must 
specify a title with a title command or @top
+    'error_line' => 'warning: must specify a title with a title command or @top
 ',
+    'file_name' => 'nodes_after_top_before_section.texi',
     'text' => 'must specify a title with a title command or @top',
     'type' => 'warning'
   }
diff --git a/tp/t/results/moresectioning/sectioning_frames.pl 
b/tp/t/results/moresectioning/sectioning_frames.pl
index 36a862bd5f..33cd0fdef0 100644
--- a/tp/t/results/moresectioning/sectioning_frames.pl
+++ b/tp/t/results/moresectioning/sectioning_frames.pl
@@ -3777,8 +3777,9 @@ $result_floats{'sectioning_frames'} = {};
 
 $result_converted_errors{'file_html'}->{'sectioning_frames'} = [
   {
-    'error_line' => 'sectioning.texi: warning: must specify a title with a 
title command or @top
+    'error_line' => 'warning: must specify a title with a title command or @top
 ',
+    'file_name' => 'sectioning.texi',
     'text' => 'must specify a title with a title command or @top',
     'type' => 'warning'
   }
diff --git a/tp/t/results/sectioning/transliterated_split_equivalent_nodes.pl 
b/tp/t/results/sectioning/transliterated_split_equivalent_nodes.pl
index 3341f00e4e..454ee0de3e 100644
--- a/tp/t/results/sectioning/transliterated_split_equivalent_nodes.pl
+++ b/tp/t/results/sectioning/transliterated_split_equivalent_nodes.pl
@@ -1156,8 +1156,9 @@ element: @node @^a
 
 
$result_converted_errors{'file_html'}->{'transliterated_split_equivalent_nodes'}
 = [
   {
-    'error_line' => 'transliterated_split_equivalent_nodes.texi: warning: must 
specify a title with a title command or @top
+    'error_line' => 'warning: must specify a title with a title command or @top
 ',
+    'file_name' => 'transliterated_split_equivalent_nodes.texi',
     'text' => 'must specify a title with a title command or @top',
     'type' => 'warning'
   }
diff --git a/tp/texi2any.pl b/tp/texi2any.pl
index 484b959198..7be6892c68 100755
--- a/tp/texi2any.pl
+++ b/tp/texi2any.pl
@@ -659,8 +659,9 @@ sub handle_errors($$$)
         $s .= "$file:";
       }
       if (defined($error_message->{'line_nr'})) {
-        $s .= $error_message->{'line_nr'} . ': ';
+        $s .= $error_message->{'line_nr'} . ':';
       }
+      $s .= ' ' if ($s ne '');
 
       $s .= _encode_message($error_message->{'error_line'});
       warn $s;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]