[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: * tp/Texinfo/XS/parsetexi/end_line.c (end_line_st
From: |
Patrice Dumas |
Subject: |
branch master updated: * tp/Texinfo/XS/parsetexi/end_line.c (end_line_starting_block), tp/Texinfo/XS/parsetexi/handle_commands.c (handle_block_command), tp/Texinfo/XS/parsetexi/macro.c (expand_linemacro_arguments), tp/Texinfo/XS/parsetexi/parser.c (process_remaining_on_line): avoid mixing declarations and code. |
Date: |
Sat, 12 Aug 2023 10:00:26 -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 429a907c73 * tp/Texinfo/XS/parsetexi/end_line.c
(end_line_starting_block), tp/Texinfo/XS/parsetexi/handle_commands.c
(handle_block_command), tp/Texinfo/XS/parsetexi/macro.c
(expand_linemacro_arguments), tp/Texinfo/XS/parsetexi/parser.c
(process_remaining_on_line): avoid mixing declarations and code.
429a907c73 is described below
commit 429a907c73c0646107eeff0113890c9d95f91cc6
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Sat Aug 12 15:58:55 2023 +0200
* tp/Texinfo/XS/parsetexi/end_line.c (end_line_starting_block),
tp/Texinfo/XS/parsetexi/handle_commands.c (handle_block_command),
tp/Texinfo/XS/parsetexi/macro.c (expand_linemacro_arguments),
tp/Texinfo/XS/parsetexi/parser.c (process_remaining_on_line): avoid
mixing declarations and code.
* tp/Texinfo/XS/parsetexi/handle_commands.c (parse_rawline_command):
remove unused variable.
---
ChangeLog | 11 +++++++++++
tp/Texinfo/XS/parsetexi/end_line.c | 3 ++-
tp/Texinfo/XS/parsetexi/handle_commands.c | 5 +++--
tp/Texinfo/XS/parsetexi/macro.c | 2 +-
tp/Texinfo/XS/parsetexi/parser.c | 3 ++-
5 files changed, 19 insertions(+), 5 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 7c476c148c..b574fa5b38 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2023-08-12 Patrice Dumas <pertusus@free.fr>
+
+ * tp/Texinfo/XS/parsetexi/end_line.c (end_line_starting_block),
+ tp/Texinfo/XS/parsetexi/handle_commands.c (handle_block_command),
+ tp/Texinfo/XS/parsetexi/macro.c (expand_linemacro_arguments),
+ tp/Texinfo/XS/parsetexi/parser.c (process_remaining_on_line): avoid
+ mixing declarations and code.
+
+ * tp/Texinfo/XS/parsetexi/handle_commands.c (parse_rawline_command):
+ remove unused variable.
+
2023-08-12 Gavin Smith <gavinsmith0123@gmail.com>
* README-hacking: add note re "git stash list".
diff --git a/tp/Texinfo/XS/parsetexi/end_line.c
b/tp/Texinfo/XS/parsetexi/end_line.c
index c6623a9e2e..b0b2851b96 100644
--- a/tp/Texinfo/XS/parsetexi/end_line.c
+++ b/tp/Texinfo/XS/parsetexi/end_line.c
@@ -873,6 +873,7 @@ end_line_starting_block (ELEMENT *current)
}
else if (command_data(command).flags & CF_blockitem)
{
+ KEY_PAIR *k;
if (command == CM_enumerate)
{
char *spec = "1";
@@ -979,7 +980,7 @@ end_line_starting_block (ELEMENT *current)
}
/* Check if command_as_argument isn't an accent command */
- KEY_PAIR *k = lookup_extra (current, "command_as_argument");
+ k = lookup_extra (current, "command_as_argument");
if (k && k->value)
{
enum command_id cmd = ((ELEMENT *) k->value)->cmd;
diff --git a/tp/Texinfo/XS/parsetexi/handle_commands.c
b/tp/Texinfo/XS/parsetexi/handle_commands.c
index d9c4637e81..880870ba70 100644
--- a/tp/Texinfo/XS/parsetexi/handle_commands.c
+++ b/tp/Texinfo/XS/parsetexi/handle_commands.c
@@ -165,7 +165,7 @@ parse_rawline_command (char *line, enum command_id cmd,
ELEMENT *args = new_element (ET_NONE);
char *p = 0, *q = 0, *r = 0;
- char *value = 0, *remaining = 0;;
+ char *value = 0;
*special_arg = 1;
@@ -1065,6 +1065,7 @@ handle_block_command (ELEMENT *current, char **line_inout,
if (flags & CF_def)
{
ELEMENT *def_line;
+ char *val;
push_context (ct_def, cmd);
block = new_element (ET_NONE);
block->cmd = cmd;
@@ -1080,7 +1081,7 @@ handle_block_command (ELEMENT *current, char **line_inout,
add_extra_string_dup (current, "original_def_cmdname",
command_name(cmd));
/* Check txidefnamenospace flag */
- char *val = fetch_value ("txidefnamenospace");
+ val = fetch_value ("txidefnamenospace");
if (val)
add_extra_integer (current, "omit_def_name_space", 1);
}
diff --git a/tp/Texinfo/XS/parsetexi/macro.c b/tp/Texinfo/XS/parsetexi/macro.c
index 251e30cad0..4765e104a3 100644
--- a/tp/Texinfo/XS/parsetexi/macro.c
+++ b/tp/Texinfo/XS/parsetexi/macro.c
@@ -595,6 +595,7 @@ expand_linemacro_arguments (ELEMENT *macro, char
**line_inout,
}
else
{
+ ELEMENT *spaces_element = new_element (ET_NONE);
set_toplevel_braces_nr (&count_toplevel_braces,
argument_content);
@@ -608,7 +609,6 @@ expand_linemacro_arguments (ELEMENT *macro, char
**line_inout,
add_to_element_contents (argument, argument_content);
arg = &(argument_content->text);
- ELEMENT *spaces_element = new_element (ET_NONE);
text_append_n (&spaces_element->text, pline,
whitespaces_len);
add_info_element_oot (argument, "spaces_before_argument",
diff --git a/tp/Texinfo/XS/parsetexi/parser.c b/tp/Texinfo/XS/parsetexi/parser.c
index b6eaf16964..a94de6f1b7 100644
--- a/tp/Texinfo/XS/parsetexi/parser.c
+++ b/tp/Texinfo/XS/parsetexi/parser.c
@@ -1539,8 +1539,9 @@ process_remaining_on_line (ELEMENT **current_inout, char
**line_inout)
p += strspn (p, whitespace_chars);
if (*p == '@')
{
+ char *command;
p++;
- char *command = read_command_name (&p);
+ command = read_command_name (&p);
if (command)
{
cmd = lookup_command (command);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: * tp/Texinfo/XS/parsetexi/end_line.c (end_line_starting_block), tp/Texinfo/XS/parsetexi/handle_commands.c (handle_block_command), tp/Texinfo/XS/parsetexi/macro.c (expand_linemacro_arguments), tp/Texinfo/XS/parsetexi/parser.c (process_remaining_on_line): avoid mixing declarations and code.,
Patrice Dumas <=