[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: * tp/Texinfo/XS/main/debug.c (print_associate_inf
From: |
Patrice Dumas |
Subject: |
branch master updated: * tp/Texinfo/XS/main/debug.c (print_associate_info_debug), tp/Texinfo/XS/main/extra.c (lookup_extra_integer), tp/Texinfo/XS/main/manipulate_tree.c (increase_ref_counter) (get_copy_ref), tp/Texinfo/XS/main/tree_types.h (KEY_PAIR), tp/Texinfo/XS/main/utils.c (section_level), tp/Texinfo/XS/parsetexi/handle_commands.c (handle_other_command) (handle_line_command): use int for the integer field in KEY_PAIR values union. Update declarations and remove casts. |
Date: |
Sat, 25 Nov 2023 18:34:01 -0500 |
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 b3cb857a16 * tp/Texinfo/XS/main/debug.c (print_associate_info_debug),
tp/Texinfo/XS/main/extra.c (lookup_extra_integer),
tp/Texinfo/XS/main/manipulate_tree.c (increase_ref_counter) (get_copy_ref),
tp/Texinfo/XS/main/tree_types.h (KEY_PAIR), tp/Texinfo/XS/main/utils.c
(section_level), tp/Texinfo/XS/parsetexi/handle_commands.c
(handle_other_command) (handle_line_command): use int for the integer field in
KEY_PAIR values union. Update declarations and remove casts.
b3cb857a16 is described below
commit b3cb857a160b5d4226adff3d10e9e84881349705
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Sun Nov 26 00:33:51 2023 +0100
* tp/Texinfo/XS/main/debug.c (print_associate_info_debug),
tp/Texinfo/XS/main/extra.c (lookup_extra_integer),
tp/Texinfo/XS/main/manipulate_tree.c (increase_ref_counter)
(get_copy_ref), tp/Texinfo/XS/main/tree_types.h (KEY_PAIR),
tp/Texinfo/XS/main/utils.c (section_level),
tp/Texinfo/XS/parsetexi/handle_commands.c (handle_other_command)
(handle_line_command): use int for the integer field in KEY_PAIR values
union. Update declarations and remove casts.
---
ChangeLog | 11 +++++++++++
tp/Texinfo/XS/main/debug.c | 4 ++--
tp/Texinfo/XS/main/extra.c | 2 +-
tp/Texinfo/XS/main/manipulate_tree.c | 8 ++++----
tp/Texinfo/XS/main/tree_types.h | 2 +-
tp/Texinfo/XS/main/utils.c | 4 ++--
tp/Texinfo/XS/parsetexi/handle_commands.c | 4 ++--
7 files changed, 23 insertions(+), 12 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index f77bb426d4..7b41967a76 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2023-11-25 Patrice Dumas <pertusus@free.fr>
+
+ * tp/Texinfo/XS/main/debug.c (print_associate_info_debug),
+ tp/Texinfo/XS/main/extra.c (lookup_extra_integer),
+ tp/Texinfo/XS/main/manipulate_tree.c (increase_ref_counter)
+ (get_copy_ref), tp/Texinfo/XS/main/tree_types.h (KEY_PAIR),
+ tp/Texinfo/XS/main/utils.c (section_level),
+ tp/Texinfo/XS/parsetexi/handle_commands.c (handle_other_command)
+ (handle_line_command): use int for the integer field in KEY_PAIR values
+ union. Update declarations and remove casts.
+
2023-11-25 Patrice Dumas <pertusus@free.fr>
* tp/Texinfo/XS/main/tree.c (remove_from_element_list): do not accept
diff --git a/tp/Texinfo/XS/main/debug.c b/tp/Texinfo/XS/main/debug.c
index c4e88fc552..90251905c6 100644
--- a/tp/Texinfo/XS/main/debug.c
+++ b/tp/Texinfo/XS/main/debug.c
@@ -145,7 +145,7 @@ char *print_associate_info_debug (const ASSOCIATED_INFO
*info)
text_printf (&text, "deleted");
break;
case extra_integer:
- text_printf (&text, "integer: %d", (int)k->integer);
+ text_printf (&text, "integer: %d", k->integer);
break;
case extra_string:
text_printf (&text, "string: %s", k->string);
@@ -169,7 +169,7 @@ char *print_associate_info_debug (const ASSOCIATED_INFO
*info)
{
KEY_PAIR *k_integer = lookup_extra (f->contents.list[j],
"integer");
if (k_integer)
- text_printf (&text, "%d|", (int)k_integer->integer);
+ text_printf (&text, "%d|", k_integer->integer);
else
text_printf (&text, "%s|", f->contents.list[j]->text.text);
}
diff --git a/tp/Texinfo/XS/main/extra.c b/tp/Texinfo/XS/main/extra.c
index 720d0868f1..3aa47e7403 100644
--- a/tp/Texinfo/XS/main/extra.c
+++ b/tp/Texinfo/XS/main/extra.c
@@ -250,7 +250,7 @@ lookup_extra_integer (const ELEMENT *e, char *key, int *ret)
free (msg);
}
*ret = 0;
- return (int)k->integer;
+ return k->integer;
}
/* if CREATE is true, create an extra contents element if there is none */
diff --git a/tp/Texinfo/XS/main/manipulate_tree.c
b/tp/Texinfo/XS/main/manipulate_tree.c
index d4b31aadce..316bd4f2bc 100644
--- a/tp/Texinfo/XS/main/manipulate_tree.c
+++ b/tp/Texinfo/XS/main/manipulate_tree.c
@@ -39,7 +39,7 @@ void
increase_ref_counter (ELEMENT *element)
{
KEY_PAIR *k_counter;
- long *counter_ptr;
+ int *counter_ptr;
k_counter = lookup_extra_by_index (element, "_counter", -1);
if (!k_counter)
@@ -189,7 +189,7 @@ ELEMENT *
get_copy_ref (ELEMENT *element)
{
KEY_PAIR *k_counter, *k_copy;
- long *counter_ptr;
+ int *counter_ptr;
ELEMENT *result;
k_copy = lookup_extra_by_index (element, "_copy", -1);
@@ -442,8 +442,8 @@ relocate_source_marks (SOURCE_MARK_LIST *source_mark_list,
ELEMENT *new_e,
end_position = begin_position + len;
- indices_to_remove = malloc (sizeof(int) * list_number);
- memset (indices_to_remove, 0, sizeof(int) * list_number);
+ indices_to_remove = malloc (sizeof (int) * list_number);
+ memset (indices_to_remove, 0, sizeof (int) * list_number);
while (i < list_number)
{
diff --git a/tp/Texinfo/XS/main/tree_types.h b/tp/Texinfo/XS/main/tree_types.h
index ccd8e517b2..a288f74611 100644
--- a/tp/Texinfo/XS/main/tree_types.h
+++ b/tp/Texinfo/XS/main/tree_types.h
@@ -122,7 +122,7 @@ typedef struct KEY_PAIR {
struct ELEMENT *element;
ELEMENT_LIST *list;
char *string;
- long integer;
+ int integer;
};
} KEY_PAIR;
diff --git a/tp/Texinfo/XS/main/utils.c b/tp/Texinfo/XS/main/utils.c
index 27960f015d..b562cb6e28 100644
--- a/tp/Texinfo/XS/main/utils.c
+++ b/tp/Texinfo/XS/main/utils.c
@@ -1126,7 +1126,7 @@ section_level (const ELEMENT *section)
KEY_PAIR *k_level_modifier = lookup_extra (section, "level_modifier");
if (k_level_modifier && level >= 0)
{
- int section_modifier = (int) k_level_modifier->integer;
+ int section_modifier = k_level_modifier->integer;
level -= section_modifier;
if (level < min_level)
if (command_structuring_level[section->cmd] < min_level)
@@ -1211,7 +1211,7 @@ decompose_integer (int number, int base, int
*decomposed_nr)
/* in practice we are with letters in base 26, 10 is
more than enough */
int space = 11;
- int *result = malloc (space * sizeof(int));
+ int *result = malloc (space * sizeof (int));
*decomposed_nr = space - 1;
for (i = 0; i < space; i++)
{
diff --git a/tp/Texinfo/XS/parsetexi/handle_commands.c
b/tp/Texinfo/XS/parsetexi/handle_commands.c
index c2a428497f..b3700958c5 100644
--- a/tp/Texinfo/XS/parsetexi/handle_commands.c
+++ b/tp/Texinfo/XS/parsetexi/handle_commands.c
@@ -416,7 +416,7 @@ handle_other_command (ELEMENT *current, char **line_inout,
/* In a @multitable */
else if ((parent = item_multitable_parent (current)))
{
- long max_columns = 0;
+ int max_columns = 0;
KEY_PAIR *k_max_columns;
k_max_columns = lookup_extra (parent, "max_columns");
@@ -785,7 +785,7 @@ handle_line_command (ELEMENT *current, char **line_inout,
}
else if (cmd == CM_subentry)
{
- long level = 1;
+ int level = 1;
ELEMENT *parent = current->parent;
if (!(command_flags(parent) & CF_index_entry_command)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: * tp/Texinfo/XS/main/debug.c (print_associate_info_debug), tp/Texinfo/XS/main/extra.c (lookup_extra_integer), tp/Texinfo/XS/main/manipulate_tree.c (increase_ref_counter) (get_copy_ref), tp/Texinfo/XS/main/tree_types.h (KEY_PAIR), tp/Texinfo/XS/main/utils.c (section_level), tp/Texinfo/XS/parsetexi/handle_commands.c (handle_other_command) (handle_line_command): use int for the integer field in KEY_PAIR values union. Update declarations and remove casts.,
Patrice Dumas <=