[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: * info/man.c (xrefs_of_manpage): use int for cons
From: |
Patrice Dumas |
Subject: |
branch master updated: * info/man.c (xrefs_of_manpage): use int for consistency. |
Date: |
Tue, 08 Oct 2024 15:45:42 -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 7b82feaa85 * info/man.c (xrefs_of_manpage): use int for consistency.
7b82feaa85 is described below
commit 7b82feaa8524b7172c1c443a2b5eadbda8c19981
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Tue Oct 8 21:45:29 2024 +0200
* info/man.c (xrefs_of_manpage): use int for consistency.
* info/display.c (display_process_line), info/util.c (ansi_escape)
(printed_representation), info/man.c (clean_manpage), info/window.c
(calculate_line_starts, window_compute_line_map): use int for
ansi_escape len and printed_representation pbytes and pchars for
consistency and also in case wcwidth in printed_representation returns
a negative value.
---
ChangeLog | 11 +++++++++++
info/display.c | 4 ++--
info/man.c | 6 +++---
info/util.c | 6 +++---
info/util.h | 4 ++--
info/window.c | 6 +++---
6 files changed, 24 insertions(+), 13 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index dc9823d51d..dedf2bb83c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2024-10-08 Patrice Dumas <pertusus@free.fr>
+
+ * info/man.c (xrefs_of_manpage): use int for consistency.
+
+ * info/display.c (display_process_line), info/util.c (ansi_escape)
+ (printed_representation), info/man.c (clean_manpage), info/window.c
+ (calculate_line_starts, window_compute_line_map): use int for
+ ansi_escape len and printed_representation pbytes and pchars for
+ consistency and also in case wcwidth in printed_representation returns
+ a negative value.
+
2024-10-08 Patrice Dumas <pertusus@free.fr>
* info/nodes.c (SUBFILE), info/nodes.h (TAG): go back to long type
diff --git a/info/display.c b/info/display.c
index 8fd01d4e87..205cf5db58 100644
--- a/info/display.c
+++ b/info/display.c
@@ -330,8 +330,8 @@ display_process_line (WINDOW *win,
{
mbi_iterator_t iter;
const char *cur_ptr;
- size_t pchars = 0; /* Printed chars */
- size_t pbytes = 0; /* Bytes to output. */
+ int pchars = 0; /* Printed chars */
+ int pbytes = 0; /* Bytes to output. */
char *rep;
int in_match = 0;
int in_ref = 0, in_ref_proper = 0;
diff --git a/info/man.c b/info/man.c
index 384283397a..5e1bd23945 100644
--- a/info/man.c
+++ b/info/man.c
@@ -299,7 +299,7 @@ clean_manpage (char *manpage)
mbi_advance (iter))
{
const char *cur_ptr = mbi_cur_ptr (iter);
- size_t cur_len = mb_len (mbi_cur (iter));
+ int cur_len = mb_len (mbi_cur (iter));
if (cur_len == 1)
{
@@ -578,8 +578,8 @@ xrefs_of_manpage (NODE *node)
followed by non-whitespace text within parenthesis leading with a digit.
*/
while (search_forward ("(", &s, &position) == search_success)
{
- register size_t name, name_end;
- size_t section, section_end;
+ register int name, name_end;
+ int section, section_end;
name = position;
if (name == 0)
diff --git a/info/util.c b/info/util.c
index 35e48b885d..8e6d025cb2 100644
--- a/info/util.c
+++ b/info/util.c
@@ -128,7 +128,7 @@ get_internal_info_window (char *name)
Otherwise, return 0.
*/
int
-ansi_escape (mbi_iterator_t iter, size_t *plen)
+ansi_escape (mbi_iterator_t iter, int *plen)
{
if (raw_escapes_p && *mbi_cur_ptr (iter) == '\033' && mbi_avail (iter))
{
@@ -176,12 +176,12 @@ static struct text_buffer printed_rep = { 0 };
freed by caller. */
char *
printed_representation (mbi_iterator_t *iter, int *delim, size_t pl_chars,
- size_t *pchars, size_t *pbytes)
+ int *pchars, int *pbytes)
{
struct text_buffer *rep = &printed_rep;
char *cur_ptr = (char *) mbi_cur_ptr (*iter);
- size_t cur_len = mb_len (mbi_cur (*iter));
+ int cur_len = mb_len (mbi_cur (*iter));
text_buffer_reset (&printed_rep);
diff --git a/info/util.h b/info/util.h
index 461d0979bd..77f7a5fcf4 100644
--- a/info/util.h
+++ b/info/util.h
@@ -30,13 +30,13 @@ WINDOW *get_internal_info_window (char *name);
#define ITER_SETBYTES(iter,n) ((iter).cur.bytes = n)
#define ITER_LIMIT(iter) ((iter).limit - (iter).cur.ptr)
-int ansi_escape (mbi_iterator_t iter, size_t *plen);
+int ansi_escape (mbi_iterator_t iter, int *plen);
/* Return a pointer to a string which is the printed representation
of CHARACTER if it were printed at HPOS. */
char *printed_representation (mbi_iterator_t *iter,
int *delim, size_t pl_chars,
- size_t *pchars, size_t *pbytes);
+ int *pchars, int *pbytes);
struct text_buffer
diff --git a/info/window.c b/info/window.c
index 4ba4b7b60d..6bbee18434 100644
--- a/info/window.c
+++ b/info/window.c
@@ -1179,8 +1179,8 @@ calculate_line_starts (WINDOW *win)
mbi_avail (iter);
mbi_advance (iter))
{
- size_t pchars = 0; /* Screen columns for this character. */
- size_t pbytes = 0; /* Not used. */
+ int pchars = 0; /* Screen columns for this character. */
+ int pbytes = 0; /* Not used. */
int delim = 0;
/* Set pchars. */
@@ -1304,7 +1304,7 @@ window_compute_line_map (WINDOW *win)
!delim && mbi_avail (iter);
mbi_advance (iter))
{
- size_t pchars, pbytes;
+ int pchars, pbytes;
cur_ptr = mbi_cur_ptr (iter);
if (cur_ptr >= endp)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: * info/man.c (xrefs_of_manpage): use int for consistency.,
Patrice Dumas <=