[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[no subject]
From: |
Patrice Dumas |
Date: |
Thu, 21 Dec 2023 16:37:01 -0500 (EST) |
branch: master
commit 9d9515c45555cfbc0880385a1f411b4945beeede
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Thu Dec 21 22:36:51 2023 +0100
* tp/Texinfo/XS/convert/convert_html.c
(html_default_format_button_icon_img, format_button_icon_img):
implement format_button_icon_img in C.
---
ChangeLog | 6 ++++++
tp/Texinfo/XS/convert/convert_html.c | 37 ++++++++++++++++++++++++++++++++++--
2 files changed, 41 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 93606c5ea9..cd3b445da8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2023-12-21 Patrice Dumas <pertusus@free.fr>
+
+ * tp/Texinfo/XS/convert/convert_html.c
+ (html_default_format_button_icon_img, format_button_icon_img):
+ implement format_button_icon_img in C.
+
2023-12-21 Patrice Dumas <pertusus@free.fr>
* tp/Texinfo/XS/convert/convert_html.c (html_format_button_function):
diff --git a/tp/Texinfo/XS/convert/convert_html.c
b/tp/Texinfo/XS/convert/convert_html.c
index f46339a8bb..a19a2d95de 100644
--- a/tp/Texinfo/XS/convert/convert_html.c
+++ b/tp/Texinfo/XS/convert/convert_html.c
@@ -6532,6 +6532,41 @@ format_begin_file (CONVERTER *self, const char *filename,
}
}
+char *
+html_default_format_button_icon_img (CONVERTER *self,
+ const char *button_name,
+ const char *icon, const char *name)
+{
+ TEXT result;
+ char *icon_protected;
+
+ if (!icon)
+ return strdup ("");
+
+ text_init (&result);
+
+ text_append_n (&result, "<img src=\"", 10);
+ icon_protected = url_protect_url_text (self, icon);
+ text_append (&result, icon_protected);
+ free (icon_protected);
+
+ text_append_n (&result, "\" border=\"0\" alt=\"", 18);
+ if (name)
+ {
+ if (button_name)
+ text_printf (&result, "%s: %s", button_name, name);
+ else
+ text_append (&result, name);
+ }
+ else if (button_name)
+ text_append (&result, button_name);
+
+ text_append_n (&result, "\" align=\"middle\"", 16);
+ close_html_lone_element (self, &result);
+
+ return result.text;
+}
+
char *
format_button_icon_img (CONVERTER *self,
const char *button_name,
@@ -6539,14 +6574,12 @@ format_button_icon_img (CONVERTER *self,
{
FORMATTING_REFERENCE *formatting_reference
= &self->current_formatting_references[FR_format_button_icon_img];
-/*
if (formatting_reference->status == FRS_status_default_set)
{
return html_default_format_button_icon_img (self, button_name,
icon, name);
}
else
-*/
{
return call_formatting_function_format_button_icon_img (self,
formatting_reference,
- master updated (39b90e4bfa -> 9d9515c455), Patrice Dumas, 2023/12/21
- [no subject], Patrice Dumas, 2023/12/21
- [no subject], Patrice Dumas, 2023/12/21
- [no subject], Patrice Dumas, 2023/12/21
- [no subject], Patrice Dumas, 2023/12/21
- [no subject], Patrice Dumas, 2023/12/21
- [no subject],
Patrice Dumas <=
- [no subject], Patrice Dumas, 2023/12/21