texinfo-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

branch master updated: * tp/Texinfo/XS/parsetexi/parser.c (process_remai


From: Patrice Dumas
Subject: branch master updated: * tp/Texinfo/XS/parsetexi/parser.c (process_remaining_on_line): set directly line to an empty string instead of going to the end of line.
Date: Mon, 27 May 2024 17:48:48 -0400

This is an automated email from the git hooks/post-receive script.

pertusus pushed a commit to branch master
in repository texinfo.

The following commit(s) were added to refs/heads/master by this push:
     new 2b02592539 * tp/Texinfo/XS/parsetexi/parser.c 
(process_remaining_on_line): set directly line to an empty string instead of 
going to the end of line.
2b02592539 is described below

commit 2b025925391664653b2c889aba8265888991c164
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Mon May 27 23:48:39 2024 +0200

    * tp/Texinfo/XS/parsetexi/parser.c (process_remaining_on_line):
    set directly line to an empty string instead of going to the end of
    line.
    
    * tp/Texinfo/XS/parsetexi/parser.c (isolate_trailing_space):
    reuse text_len instead of calling strlen.
---
 ChangeLog                        | 9 +++++++++
 tp/Texinfo/XS/parsetexi/parser.c | 6 +++---
 2 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 51345a61c4..21aff83bec 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2024-05-27  Patrice Dumas  <pertusus@free.fr>
+
+       * tp/Texinfo/XS/parsetexi/parser.c (process_remaining_on_line):
+       set directly line to an empty string instead of going to the end of
+       line.
+
+       * tp/Texinfo/XS/parsetexi/parser.c (isolate_trailing_space):
+       reuse text_len instead of calling strlen.
+
 2024-05-27  Patrice Dumas  <pertusus@free.fr>
 
        * tp/Texinfo/XS/main/translations.c (replace_substrings),
diff --git a/tp/Texinfo/XS/parsetexi/parser.c b/tp/Texinfo/XS/parsetexi/parser.c
index f965861c6a..a3e67d8289 100644
--- a/tp/Texinfo/XS/parsetexi/parser.c
+++ b/tp/Texinfo/XS/parsetexi/parser.c
@@ -918,7 +918,7 @@ isolate_trailing_space (ELEMENT *current, enum element_type 
spaces_type)
       int i, trailing_spaces;
 
       trailing_spaces = 0;
-      for (i = strlen (text) - 1;
+      for (i = text_len - 1;
            i > 0 && strchr (whitespace_chars, text[i]);
            i--)
         trailing_spaces++;
@@ -1865,9 +1865,9 @@ process_remaining_on_line (ELEMENT **current_inout, const 
char **line_inout)
 
                       value_expansion_nr++;
 
-                      /* Move 'line' to end of string so next input to
+                      /* Set 'line' to end of string so next input to
                          be processed is taken from input stack. */
-                      line = remaining_line + strlen (remaining_line);
+                      line = "";
                     }
                   free (flag);
                   if (value)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]