[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: * tp/Texinfo/XS/convert/convert_html.c (html_conv
From: |
Patrice Dumas |
Subject: |
branch master updated: * tp/Texinfo/XS/convert/convert_html.c (html_convert_output): correct fclose error status reading. |
Date: |
Thu, 02 Nov 2023 06:45:04 -0400 |
This is an automated email from the git hooks/post-receive script.
pertusus pushed a commit to branch master
in repository texinfo.
The following commit(s) were added to refs/heads/master by this push:
new dddc4a4b94 * tp/Texinfo/XS/convert/convert_html.c
(html_convert_output): correct fclose error status reading.
dddc4a4b94 is described below
commit dddc4a4b94c8c4e9195bc6923159f3d3bd45e40e
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Thu Nov 2 11:44:54 2023 +0100
* tp/Texinfo/XS/convert/convert_html.c (html_convert_output): correct
fclose error status reading.
* tp/Texinfo/XS/main/translations.c (replace_substrings): allocate
output strings in all the cases.
* tp/Texinfo/XS/main/errors.c (message_list_document_error_internal):
show immediately error messages if DEBUG is set.
---
ChangeLog | 11 +++++++++++
tp/Texinfo/Convert/HTML.pm | 22 +++++++++-------------
tp/Texinfo/XS/convert/convert_html.c | 12 +++++++++---
tp/Texinfo/XS/main/errors.c | 4 +---
tp/Texinfo/XS/main/translations.c | 2 +-
5 files changed, 31 insertions(+), 20 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 3c3b32a2e5..46601275ae 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2023-11-02 Patrice Dumas <pertusus@free.fr>
+
+ * tp/Texinfo/XS/convert/convert_html.c (html_convert_output): correct
+ fclose error status reading.
+
+ * tp/Texinfo/XS/main/translations.c (replace_substrings): allocate
+ output strings in all the cases.
+
+ * tp/Texinfo/XS/main/errors.c (message_list_document_error_internal):
+ show immediately error messages if DEBUG is set.
+
2023-11-02 Patrice Dumas <pertusus@free.fr>
* tp/Texinfo/Convert/HTML.pm (_html_convert_output),
diff --git a/tp/Texinfo/Convert/HTML.pm b/tp/Texinfo/Convert/HTML.pm
index 44bdd4571c..5fbf546eec 100644
--- a/tp/Texinfo/Convert/HTML.pm
+++ b/tp/Texinfo/Convert/HTML.pm
@@ -8429,7 +8429,7 @@ sub converter_initialize($)
if ($self->{'document_descriptor'}) {
my $encoded_converter = $self->encode_converter_document();
- #print STDERR "AAA ".\%default_formatting_references."
".\%default_css_string_formatting_references." ".\%default_commands_open." ".
\%default_commands_conversion." ".\%default_types_open."
".\%default_types_conversion." ".\%default_output_units_conversion."\n";
+ #print STDERR "CCI ".\%default_formatting_references."
".\%default_css_string_formatting_references." ".\%default_commands_open." ".
\%default_commands_conversion." ".\%default_types_open."
".\%default_types_conversion." ".\%default_output_units_conversion."\n";
_XS_converter_initialize($encoded_converter,
\%default_formatting_references,
\%default_css_string_formatting_references,
@@ -11050,18 +11050,6 @@ sub _initialize_output_state($)
}
-sub _XS_prepare_output_units_global_targets($$$$)
-{
-}
-
-sub _XS_html_convert_init($)
-{
-}
-
-sub _XS_html_convert_convert($$$$)
-{
-}
-
sub _XS_html_prepare_title_titlepage($$$$)
{
}
@@ -11097,6 +11085,14 @@ sub _prepare_title_titlepage($$$$)
$self->{'current_filename'} = undef;
}
+sub _XS_prepare_output_units_global_targets($$$$)
+{
+}
+
+sub _XS_html_convert_convert($$$$)
+{
+}
+
sub convert($$)
{
my $self = shift;
diff --git a/tp/Texinfo/XS/convert/convert_html.c
b/tp/Texinfo/XS/convert/convert_html.c
index e21221c149..0eace7b80a 100644
--- a/tp/Texinfo/XS/convert/convert_html.c
+++ b/tp/Texinfo/XS/convert/convert_html.c
@@ -3715,7 +3715,7 @@ convert_output_output_unit_internal (CONVERTER *self,
free (result);
if (write_len != res_len)
{ /* register error message instead? */
- fprintf (stderr, "write to %s failed (%zu/%zu)\n",
+ fprintf (stderr, "ERROR: write to %s failed (%zu/%zu)\n",
encoded_out_filepath, write_len, res_len);
return 0;
}
@@ -3725,7 +3725,7 @@ convert_output_output_unit_internal (CONVERTER *self,
{
output_files_register_closed (&self->output_files_information,
encoded_out_filepath);
- if (!fclose (file_fh))
+ if (fclose (file_fh))
{
message_list_document_error (self->error_messages, self->conf,
"error on closing %s: %s",
@@ -3873,7 +3873,13 @@ html_convert_output (CONVERTER *self, ELEMENT *root,
status = convert_output_output_unit_internal (self, conversion,
&text, output_unit, unit_nr);
if (!status)
- goto out;
+ {
+ /*
+ fprintf (stderr, " FAILED U(%d %d): %s\n", i, unit_nr,
+ output_unit_texi (output_unit));
+ */
+ goto out;
+ }
unit_nr++;
}
if (special_units && special_units->number)
diff --git a/tp/Texinfo/XS/main/errors.c b/tp/Texinfo/XS/main/errors.c
index 1f533edaeb..37c4523ce3 100644
--- a/tp/Texinfo/XS/main/errors.c
+++ b/tp/Texinfo/XS/main/errors.c
@@ -213,10 +213,8 @@ message_list_document_error_internal (ERROR_MESSAGE_LIST
*error_messages,
error_message->error_line = error_line.text;
- /*
- if (debug_output)
+ if (conf && conf->DEBUG > 0)
fprintf (stderr, error_message->error_line);
- */
}
static void
diff --git a/tp/Texinfo/XS/main/translations.c
b/tp/Texinfo/XS/main/translations.c
index 586e23977e..4a0b65dd35 100644
--- a/tp/Texinfo/XS/main/translations.c
+++ b/tp/Texinfo/XS/main/translations.c
@@ -379,7 +379,7 @@ replace_substrings (char *string,
TEXT substituted;
if (!replaced_substrings)
- return string;
+ return strdup (string);
text_init (&substituted);
text_append (&substituted, "");
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: * tp/Texinfo/XS/convert/convert_html.c (html_convert_output): correct fclose error status reading.,
Patrice Dumas <=