[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: * info/search.c (extend_matches, regexp_search),
From: |
Patrice Dumas |
Subject: |
branch master updated: * info/search.c (extend_matches, regexp_search), info/window.h (MATCH_STATE): make MATCH_STATE buflen long to be consistent with nodes length types and also with regoff_t. |
Date: |
Wed, 09 Oct 2024 07:56:04 -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 1cb2a9c59d * info/search.c (extend_matches, regexp_search),
info/window.h (MATCH_STATE): make MATCH_STATE buflen long to be consistent with
nodes length types and also with regoff_t.
1cb2a9c59d is described below
commit 1cb2a9c59dfd8a852b20493eda94f1922fddbdf0
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Wed Oct 9 13:55:55 2024 +0200
* info/search.c (extend_matches, regexp_search), info/window.h
(MATCH_STATE): make MATCH_STATE buflen long to be consistent with
nodes length types and also with regoff_t.
---
ChangeLog | 6 ++++++
info/search.c | 4 ++--
info/search.h | 2 +-
info/window.h | 2 +-
4 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index fd1a9d0ffa..6fc809ba28 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2024-10-09 Patrice Dumas <pertusus@free.fr>
+
+ * info/search.c (extend_matches, regexp_search), info/window.h
+ (MATCH_STATE): make MATCH_STATE buflen long to be consistent with
+ nodes length types and also with regoff_t.
+
2024-10-09 Patrice Dumas <pertusus@free.fr>
* info/nodes.c (info_reload_file_buffer_contents): add an intermediate
diff --git a/info/search.c b/info/search.c
index abe296cf4b..8b614ae660 100644
--- a/info/search.c
+++ b/info/search.c
@@ -113,7 +113,7 @@ extend_matches (MATCH_STATE *state)
size_t match_alloc = state->match_alloc;
size_t match_count = state->match_count;
char *buffer = state->buffer;
- size_t buflen = state->buflen;
+ long buflen = state->buflen; /* Should not be negative */
regoff_t offset = 0;
char saved_char;
@@ -176,7 +176,7 @@ extend_matches (MATCH_STATE *state)
matches in MATCH_STATE. */
enum search_result
regexp_search (char *regexp, int is_literal, int is_insensitive,
- char *buffer, size_t buflen,
+ char *buffer, long buflen,
MATCH_STATE *match_state)
{
regex_t preg; /* Compiled pattern buffer for regexp. */
diff --git a/info/search.h b/info/search.h
index 5b7f76e5a9..1563a24b5f 100644
--- a/info/search.h
+++ b/info/search.h
@@ -62,7 +62,7 @@ enum search_result search (char *string, SEARCH_BINDING
*binding,
long *poff);
enum search_result regexp_search (char *regexp,
int is_literal, int is_insensitive,
- char *buffer, size_t buflen,
+ char *buffer, long buflen,
MATCH_STATE *match_state);
int looking_at (char *string, SEARCH_BINDING *binding);
int looking_at_line (char *string, char *pointer);
diff --git a/info/window.h b/info/window.h
index 1ed7a69a02..f4573692d7 100644
--- a/info/window.h
+++ b/info/window.h
@@ -60,7 +60,7 @@ typedef struct match_struct
int finished; /* Non-zero if all possible matches are stored. */
regex_t regex;
char *buffer;
- size_t buflen;
+ long buflen; /* Should not be negative */
} MATCH_STATE;
/* Structure which defines a window. Windows are doubly linked, next
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: * info/search.c (extend_matches, regexp_search), info/window.h (MATCH_STATE): make MATCH_STATE buflen long to be consistent with nodes length types and also with regoff_t.,
Patrice Dumas <=