[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[no subject]
From: |
Patrice Dumas |
Date: |
Sun, 22 Oct 2023 05:36:41 -0400 (EDT) |
branch: master
commit 70bff15bfd4e2ec8d80c6eeae035c2b4e1e76292
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Sun Oct 22 10:56:25 2023 +0200
* tp/Texinfo/XS/convert/converter.c,
tp/Texinfo/XS/convert/convert_html.c: fix integer conf use, taking
into account that -1 means undefined.
---
ChangeLog | 6 ++++++
tp/Texinfo/XS/convert/convert_html.c | 8 ++++----
tp/Texinfo/XS/convert/converter.c | 2 +-
3 files changed, 11 insertions(+), 5 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 90d14adda0..474bbf70eb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -5,6 +5,12 @@
doing it in add_text instead (as is done in the corresponding
XS code).
+2023-10-21 Patrice Dumas <pertusus@free.fr>
+
+ * tp/Texinfo/XS/convert/converter.c,
+ tp/Texinfo/XS/convert/convert_html.c: fix integer conf use, taking
+ into account that -1 means undefined.
+
2023-10-21 Patrice Dumas <pertusus@free.fr>
* tp/Texinfo/XS/convert/converter.c (find_output_unit_file)
diff --git a/tp/Texinfo/XS/convert/convert_html.c
b/tp/Texinfo/XS/convert/convert_html.c
index 3c5b356d20..e8b24539b2 100644
--- a/tp/Texinfo/XS/convert/convert_html.c
+++ b/tp/Texinfo/XS/convert/convert_html.c
@@ -92,8 +92,8 @@ html_get_tree_root_element (CONVERTER *self, ELEMENT *command,
}
}
else if (current->cmd == CM_titlepage
- && self->conf->USE_TITLEPAGE_FOR_TITLE
- && self->conf->SHOW_TITLE
+ && self->conf->USE_TITLEPAGE_FOR_TITLE > 0
+ && self->conf->SHOW_TITLE > 0
&& output_units->number > 0)
{
ROOT_AND_UNIT *result = malloc (sizeof (ROOT_AND_UNIT));
@@ -771,7 +771,7 @@ html_prepare_conversion_units (CONVERTER *self,
{
int output_units_descriptor;
- if (self->conf->USE_NODES)
+ if (self->conf->USE_NODES > 0)
output_units_descriptor = split_by_node (self->document->tree);
else
output_units_descriptor = split_by_section (self->document->tree);
@@ -1527,7 +1527,7 @@ prepare_output_units_global_targets (CONVERTER *self,
free (root_unit);
}
- if (self->conf->DEBUG >= 0 && self->conf->DEBUG)
+ if (self->conf->DEBUG > 0)
{
int i;
fprintf (stderr, "GLOBAL DIRECTIONS:\n");
diff --git a/tp/Texinfo/XS/convert/converter.c
b/tp/Texinfo/XS/convert/converter.c
index d8f8608740..cb29766772 100644
--- a/tp/Texinfo/XS/convert/converter.c
+++ b/tp/Texinfo/XS/convert/converter.c
@@ -186,7 +186,7 @@ set_global_document_commands (CONVERTER *converter,
{
ELEMENT *element;
enum command_id cmd = cmd_list[i];
- if (converter->conf->DEBUG >= 0 && converter->conf->DEBUG)
+ if (converter->conf->DEBUG > 0)
{
fprintf (stderr, "SET_global(%s) %s\n",
command_location_names[location],