[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[no subject]
From: |
Patrice Dumas |
Date: |
Sat, 11 May 2024 07:49:23 -0400 (EDT) |
branch: master
commit 4881491efd5ce809ece889a8382a6cced470cac7
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Sat May 11 13:30:53 2024 +0200
* tp/Texinfo/XS/main/text.c (text_alloc): inline fatal() call
in order not to depend on utils.h.
* tp/Texinfo/XS/main/utils.c (bug): change message.
* tp/Texinfo/XS/xspara_text.c: remove unused text_destroy.
Other minor changes in texts and comments.
---
ChangeLog | 11 +++++++++++
tp/TODO | 5 -----
tp/Texinfo/XS/main/text.c | 7 ++++---
tp/Texinfo/XS/main/utils.c | 2 +-
tp/Texinfo/XS/parsetexi/def.c | 1 -
tp/Texinfo/XS/xspara_text.c | 6 ------
tp/Texinfo/XS/xspara_text.h | 1 -
7 files changed, 16 insertions(+), 17 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 220058ef75..b6834cc009 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2024-05-11 Patrice Dumas <pertusus@free.fr>
+
+ * tp/Texinfo/XS/main/text.c (text_alloc): inline fatal() call
+ in order not to depend on utils.h.
+
+ * tp/Texinfo/XS/main/utils.c (bug): change message.
+
+ * tp/Texinfo/XS/xspara_text.c: remove unused text_destroy.
+
+ Other minor changes in texts and comments.
+
2024-05-10 Patrice Dumas <pertusus@free.fr>
* tp/Texinfo/XS/main/tree_types.h: remove now unused DEF_ARG.
diff --git a/tp/TODO b/tp/TODO
index 0b93899b5e..d4b4d1646a 100644
--- a/tp/TODO
+++ b/tp/TODO
@@ -10,11 +10,6 @@ This is the todo list for texi2any
Before next release
===================
-Consider text in def_category_inserted and untranslated_def_category_inserted
-never to be true text but always be Texinfo? Currently it is different for
-untranslated_def_category_inserted (nevever recusrse in the element in
-converters) and def_category_inserted? Or use args instead of contents
-to mark that it is special?
Bugs
====
diff --git a/tp/Texinfo/XS/main/text.c b/tp/Texinfo/XS/main/text.c
index 3a4564a23b..7ec4667bea 100644
--- a/tp/Texinfo/XS/main/text.c
+++ b/tp/Texinfo/XS/main/text.c
@@ -19,8 +19,6 @@
#include <stdio.h>
#include <stdarg.h>
-/* for fatal */
-#include "utils.h"
#include "text.h"
/* wrapper for vasprintf */
@@ -46,7 +44,10 @@ text_alloc (TEXT *t, size_t len)
t->space *= 2;
t->text = realloc (t->text, t->space);
if (!t->text)
- fatal ("realloc failed");
+ {
+ fprintf (stderr, "text realloc failed\n");
+ abort ();
+ }
}
}
diff --git a/tp/Texinfo/XS/main/utils.c b/tp/Texinfo/XS/main/utils.c
index f48a9afb5e..74cc9e9d5e 100644
--- a/tp/Texinfo/XS/main/utils.c
+++ b/tp/Texinfo/XS/main/utils.c
@@ -187,7 +187,7 @@ xasprintf (char **ptr, const char *template, ...)
void bug (char *message)
{
- fprintf (stderr, "texi2any (XS parser): bug: %s\n", message);
+ fprintf (stderr, "texi2any (XS): bug: %s\n", message);
}
void fatal (char *message)
diff --git a/tp/Texinfo/XS/parsetexi/def.c b/tp/Texinfo/XS/parsetexi/def.c
index 742a4e9b18..a06371502b 100644
--- a/tp/Texinfo/XS/parsetexi/def.c
+++ b/tp/Texinfo/XS/parsetexi/def.c
@@ -127,7 +127,6 @@ next_bracketed_or_word_agg (ELEMENT *current, int *i)
if (num == 1)
{
- /* FIXME e is probably already this element */
e = current->contents.list[*i - 1];
/* there is only one bracketed element */
diff --git a/tp/Texinfo/XS/xspara_text.c b/tp/Texinfo/XS/xspara_text.c
index 9bade688f2..6fbd71b8c9 100644
--- a/tp/Texinfo/XS/xspara_text.c
+++ b/tp/Texinfo/XS/xspara_text.c
@@ -87,9 +87,3 @@ text_init (TEXT *t)
t->text = 0;
}
-void
-text_destroy (TEXT *t)
-{
- t->end = t->space = 0;
- free(t->text); t->text = 0;
-}
diff --git a/tp/Texinfo/XS/xspara_text.h b/tp/Texinfo/XS/xspara_text.h
index 4f700574c8..ac2494dada 100644
--- a/tp/Texinfo/XS/xspara_text.h
+++ b/tp/Texinfo/XS/xspara_text.h
@@ -27,7 +27,6 @@ void text_reset (TEXT *t);
void text_append (TEXT *t, char *s);
void text_append_n (TEXT *t, char *s, size_t len);
void text_printf (TEXT *t, char *format, ...);
-void text_destroy (TEXT *t);
#define text_base(t) ((t)->space ? (t)->text : (char *) 0)