[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[no subject]
From: |
Patrice Dumas |
Date: |
Sat, 5 Oct 2024 03:34:12 -0400 (EDT) |
branch: master
commit 38c570ede1022c3435d0f8232ea3879e9bf40b2c
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Sat Oct 5 09:34:12 2024 +0200
* tp/Texinfo/XS/convert/format_html.c (external_node_href),
tp/Texinfo/XS/convert/html_prepare_converter.c (parse_htmlxref_files):
no warning for an empty URL prefix, instead set it as an empty string.
---
ChangeLog | 6 ++++++
tp/Texinfo/XS/convert/html_prepare_converter.c | 25 ++++++++++++++++---------
2 files changed, 22 insertions(+), 9 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 3c49a51359..abf5c164be 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2024-08-24 Patrice Dumas <pertusus@free.fr>
+
+ * tp/Texinfo/XS/convert/format_html.c (external_node_href),
+ tp/Texinfo/XS/convert/html_prepare_converter.c (parse_htmlxref_files):
+ no warning for an empty URL prefix, instead set it as an empty string.
+
2024-08-21 Patrice Dumas <pertusus@free.fr>
Implement reading xhtmlxref in C and XS
diff --git a/tp/Texinfo/XS/convert/html_prepare_converter.c
b/tp/Texinfo/XS/convert/html_prepare_converter.c
index 4817a5a7e6..887702abda 100644
--- a/tp/Texinfo/XS/convert/html_prepare_converter.c
+++ b/tp/Texinfo/XS/convert/html_prepare_converter.c
@@ -973,6 +973,8 @@ parse_htmlxref_files (CONVERTER *self, HTMLXREF_MANUAL_LIST
*htmlxref_list,
}
}
+ /* No warning for an empty URL prefix as it is the only way to
+ override an entry appearing in a file processed later on
if (!href)
{
SOURCE_INFO source_info;
@@ -985,7 +987,7 @@ parse_htmlxref_files (CONVERTER *self, HTMLXREF_MANUAL_LIST
*htmlxref_list,
free (manual);
continue;
}
-
+ */
free (split_or_mono);
htmlxref_manual
@@ -1002,17 +1004,22 @@ parse_htmlxref_files (CONVERTER *self,
HTMLXREF_MANUAL_LIST *htmlxref_list,
continue;
}
- subst_href = substitute_variables (href, &variables);
+ if (href)
+ {
+ subst_href = substitute_variables (href, &variables);
- free (href);
+ free (href);
- if (htmlxref_type != htmlxref_split_type_mono)
- {
- size_t j;
- for (j = strlen (subst_href); j > 0; j--)
- if (subst_href[j-1] == '/')
- subst_href[j-1] = '\0';
+ if (htmlxref_type != htmlxref_split_type_mono)
+ {
+ size_t j;
+ for (j = strlen (subst_href); j > 0; j--)
+ if (subst_href[j-1] == '/')
+ subst_href[j-1] = '\0';
+ }
}
+ else
+ subst_href = strdup ("");
/*
fprintf (stderr, "HHH %s '%s' %d\n", htmlxref_manual->manual,