[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: * tp/Texinfo/XS/convert/convert_html.c (convert_o
From: |
Patrice Dumas |
Subject: |
branch master updated: * tp/Texinfo/XS/convert/convert_html.c (convert_output_output_unit_internal): do not output the NUL in fwrite. |
Date: |
Thu, 02 Nov 2023 11:13:22 -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 58319a42e9 * tp/Texinfo/XS/convert/convert_html.c
(convert_output_output_unit_internal): do not output the NUL in fwrite.
58319a42e9 is described below
commit 58319a42e92009be211f3b2b48324211d9709b12
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Thu Nov 2 17:13:27 2023 +0100
* tp/Texinfo/XS/convert/convert_html.c
(convert_output_output_unit_internal): do not output the NUL in
fwrite.
* tp/Texinfo/XS/convert/convert_html.c (convert_to_html_internal):
set HMSF_preformatted_classes after closing a style type.
* tp/Texinfo/XS/convert/convert_html.c
(convert_output_output_unit_internal): pass output_unit_filename to
format_end_file and format_begin_file instead of full paths.
* tp/Texinfo/XS/convert/convert_html.c (html_converter_initialize):
do not register pre class for non preformatted commands with small
variants.
* tp/Texinfo/XS/main/utils.c (SMALL_BLOCK_COMMANDS_LIST): fix typo in
name.
---
ChangeLog | 20 ++++++++++++++++++++
tp/Texinfo/XS/convert/convert_html.c | 12 +++++++-----
tp/Texinfo/XS/main/utils.c | 2 +-
tp/Texinfo/XS/main/utils.h | 2 +-
4 files changed, 29 insertions(+), 7 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 40b17332d6..a7285c9872 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,23 @@
+2023-11-02 Patrice Dumas <pertusus@free.fr>
+
+ * tp/Texinfo/XS/convert/convert_html.c
+ (convert_output_output_unit_internal): do not output the NUL in
+ fwrite.
+
+ * tp/Texinfo/XS/convert/convert_html.c (convert_to_html_internal):
+ set HMSF_preformatted_classes after closing a style type.
+
+ * tp/Texinfo/XS/convert/convert_html.c
+ (convert_output_output_unit_internal): pass output_unit_filename to
+ format_end_file and format_begin_file instead of full paths.
+
+ * tp/Texinfo/XS/convert/convert_html.c (html_converter_initialize):
+ do not register pre class for non preformatted commands with small
+ variants.
+
+ * tp/Texinfo/XS/main/utils.c (SMALL_BLOCK_COMMANDS_LIST): fix typo in
+ name.
+
2023-11-02 Patrice Dumas <pertusus@free.fr>
* tp/Texinfo/XS/convert/convert_html.c (html_set_pages_files)
diff --git a/tp/Texinfo/XS/convert/convert_html.c
b/tp/Texinfo/XS/convert/convert_html.c
index f5b3b655cd..976375623a 100644
--- a/tp/Texinfo/XS/convert/convert_html.c
+++ b/tp/Texinfo/XS/convert/convert_html.c
@@ -2204,7 +2204,8 @@ html_converter_initialize (CONVERTER *self)
{
enum command_id small_cmd = small_block_associated_command[i][0];
enum command_id cmd = small_block_associated_command[i][1];
- register_pre_class_command (small_cmd, cmd);
+ if (builtin_command_data[cmd].flags & CF_preformatted)
+ register_pre_class_command (small_cmd, cmd);
}
for (i = 1; i < BUILTIN_CMD_NUMBER; i++)
@@ -3365,7 +3366,8 @@ convert_to_html_internal (CONVERTER *self, ELEMENT
*element,
{
pop_string_stack (&top_document_ctx->preformatted_classes);
pop_command_or_type (&top_document_ctx->composition_context);
- self->modified_state |= HMSF_composition_context;
+ self->modified_state |= HMSF_preformatted_classes
+ | HMSF_composition_context;
}
if (self->conf->DEBUG > 0)
@@ -3689,9 +3691,9 @@ convert_output_output_unit_internal (CONVERTER *self,
/* do end file first in case it requires some CSS */
file_end = call_formatting_function_format_end_file (self,
- out_filepath, output_unit);
+ output_unit_filename,
output_unit);
file_beginning = call_formatting_function_format_begin_file (self,
- out_filepath, file_output_unit);
+ output_unit_filename,
file_output_unit);
text_reset (text);
if (file_beginning)
{
@@ -3717,7 +3719,7 @@ convert_output_output_unit_internal (CONVERTER *self,
result = encode_with_iconv (conversion->iconv, text->text, 0);
else
result = text->text;
- res_len = strlen (result)+1;
+ res_len = strlen (result);
write_len = fwrite (result, sizeof (char), res_len,
file_fh);
if (conversion)
diff --git a/tp/Texinfo/XS/main/utils.c b/tp/Texinfo/XS/main/utils.c
index b6a0fa7b73..99c4f045d2 100644
--- a/tp/Texinfo/XS/main/utils.c
+++ b/tp/Texinfo/XS/main/utils.c
@@ -58,7 +58,7 @@ const size_t directions_length = sizeof (direction_names) /
sizeof (direction_na
const enum command_id small_block_associated_command[][2] = {
#define smbc_command_name(name) {CM_small##name, CM_##name},
- SMALL_BLOC_COMMANDS_LIST
+ SMALL_BLOCK_COMMANDS_LIST
#undef smbc_command_name
{0, 0},
};
diff --git a/tp/Texinfo/XS/main/utils.h b/tp/Texinfo/XS/main/utils.h
index ca9c1ced69..52a5e183dd 100644
--- a/tp/Texinfo/XS/main/utils.h
+++ b/tp/Texinfo/XS/main/utils.h
@@ -94,7 +94,7 @@ typedef struct COMMAND_OPTION_VALUE {
};
} COMMAND_OPTION_VALUE;
-#define SMALL_BLOC_COMMANDS_LIST \
+#define SMALL_BLOCK_COMMANDS_LIST \
smbc_command_name(example)\
smbc_command_name(display) \
smbc_command_name(format) \
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: * tp/Texinfo/XS/convert/convert_html.c (convert_output_output_unit_internal): do not output the NUL in fwrite.,
Patrice Dumas <=