[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: * tp/Texinfo/XS/xspara.c (xspara__add_next) [debu
From: |
Gavin D. Smith |
Subject: |
branch master updated: * tp/Texinfo/XS/xspara.c (xspara__add_next) [debugging output]: Only print the word argument up until its length, as it is not null-terminated any more. (xspara_add_text): TODO comment removed. |
Date: |
Wed, 25 Oct 2023 14:21:07 -0400 |
This is an automated email from the git hooks/post-receive script.
gavin pushed a commit to branch master
in repository texinfo.
The following commit(s) were added to refs/heads/master by this push:
new 07b4c673ed * tp/Texinfo/XS/xspara.c (xspara__add_next) [debugging
output]: Only print the word argument up until its length, as it is not
null-terminated any more. (xspara_add_text): TODO comment removed.
07b4c673ed is described below
commit 07b4c673edfa61130583afad071f334c81f2a8c4
Author: Gavin Smith <gavinsmith0123@gmail.com>
AuthorDate: Wed Oct 25 19:20:59 2023 +0100
* tp/Texinfo/XS/xspara.c (xspara__add_next) [debugging output]:
Only print the word argument up until its length, as it is not
null-terminated any more.
(xspara_add_text): TODO comment removed.
---
ChangeLog | 7 +++++++
tp/Texinfo/XS/xspara.c | 16 ++++++++++------
2 files changed, 17 insertions(+), 6 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 0485f21b49..97c4965fd3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2023-10-25 Gavin Smith <gavinsmith0123@gmail.com>
+
+ * tp/Texinfo/XS/xspara.c (xspara__add_next) [debugging output]:
+ Only print the word argument up until its length, as it is not
+ null-terminated any more.
+ (xspara_add_text): TODO comment removed.
+
2023-10-25 Gavin Smith <gavinsmith0123@gmail.com>
* tp/Texinfo/XS/xspara.c (xspara_add_text): Process multiple
diff --git a/tp/Texinfo/XS/xspara.c b/tp/Texinfo/XS/xspara.c
index 2cb2dd90e2..3416096749 100644
--- a/tp/Texinfo/XS/xspara.c
+++ b/tp/Texinfo/XS/xspara.c
@@ -48,7 +48,7 @@
#include "xspara_text.h"
-static int debug = 0;
+static int debug = 1;
typedef struct {
TEXT space; /* Pending space, to be output before the pending word. */
@@ -792,8 +792,13 @@ xspara__add_next (TEXT *result, char *word, int word_len,
int transparent)
}
}
if (debug)
- fprintf (stderr, "WORD+ %s -> %s\n", word, state.word.space == 0 ?
- "UNDEF" : state.word.text);
+ {
+ static TEXT printed_word;
+ text_reset (&printed_word);
+ text_append_n (&printed_word, word, word_len);
+ fprintf (stderr, "WORD+ %s -> %s\n", printed_word.text,
+ state.word.space == 0 ? "UNDEF" : state.word.text);
+ }
}
/* Like _add_next but zero end_line_count at beginning. */
@@ -973,9 +978,8 @@ xspara_add_text (char *text, int len)
next_type = type_unknown;
}
- /* TODO: test just one character at a time to start. then
- we can gradually work on the various blocks of
- code to operate on multiple characters. */
+ /* For type_regular and type_spaces we operate on blocks of
+ multiple characters at once. */
if ((type != type_regular && type != type_spaces)
|| next_type != type || next_type == type_finished)
break;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: * tp/Texinfo/XS/xspara.c (xspara__add_next) [debugging output]: Only print the word argument up until its length, as it is not null-terminated any more. (xspara_add_text): TODO comment removed.,
Gavin D. Smith <=