[Commits] [SCM] claws branch, master, updated. 4.2.0-37-g3edfeed71
wwp at claws-mail.org
wwp at claws-mail.org
Thu Jan 25 09:56:29 UTC 2024
The branch, master has been updated
via 3edfeed71c533714dd28f9af6d0198da879ebc19 (commit)
from e67ebcf6e95406d72b604fd5b764d58a76a1a708 (commit)
Summary of changes:
src/common/string_match.c | 13 -------------
src/common/string_match.h | 6 ------
src/prefs_folder_item.c | 3 +--
src/summaryview.c | 3 +--
4 files changed, 2 insertions(+), 23 deletions(-)
- Log -----------------------------------------------------------------
commit 3edfeed71c533714dd28f9af6d0198da879ebc19
Author: wwp <subscript at free.fr>
Date: Thu Jan 25 10:56:27 2024 +0100
fix bug 4750, 'remove regcomp wrapper and call regcomp directly'
diff --git a/src/common/string_match.c b/src/common/string_match.c
index 93f2d37e8..c99b4a651 100644
--- a/src/common/string_match.c
+++ b/src/common/string_match.c
@@ -35,19 +35,6 @@
#include "string_match.h"
#include "utils.h"
-int string_match_precompile (gchar *rexp, regex_t *preg, int cflags)
-{
- int problem = 0;
-
- cm_return_val_if_fail(rexp, -1);
- cm_return_val_if_fail(*rexp, -1);
-
- problem = regcomp(preg, rexp, cflags);
-
- return problem;
-}
-
-
gchar *string_remove_match(gchar *buf, gint buflen, gchar * txt, regex_t *preg)
{
regmatch_t match;
diff --git a/src/common/string_match.h b/src/common/string_match.h
index 0f1b8d830..9d98f2517 100644
--- a/src/common/string_match.h
+++ b/src/common/string_match.h
@@ -26,12 +26,6 @@
#include <regex.h>
#include <glib.h>
-/* Precompile the preg buffer for the rexp regexp string. See regex man for the
- * meaning of cflags.
- */
-
-int string_match_precompile (gchar *rexp, regex_t *preg, int cflags);
-
/* remove from txt the substrings matching the regexp in the precompiled preg buffer.
* The result is stored in the preallocated buf buffer which maximal length
* is buflen.
diff --git a/src/prefs_folder_item.c b/src/prefs_folder_item.c
index 251ea7ce3..6c9fed835 100644
--- a/src/prefs_folder_item.c
+++ b/src/prefs_folder_item.c
@@ -1849,8 +1849,7 @@ static regex_t *summary_compile_simplify_regexp(gchar *simplify_subject_regexp)
preg = g_new0(regex_t, 1);
- err = string_match_precompile(simplify_subject_regexp,
- preg, REG_EXTENDED);
+ err = regcomp(preg, simplify_subject_regexp, REG_EXTENDED);
if (err) {
regerror(err, preg, buf, BUFFSIZE);
g_free(preg);
diff --git a/src/summaryview.c b/src/summaryview.c
index 1bf41f682..0eab5dfd4 100644
--- a/src/summaryview.c
+++ b/src/summaryview.c
@@ -8301,8 +8301,7 @@ static regex_t *summary_compile_simplify_regexp(gchar *simplify_subject_regexp)
preg = g_new0(regex_t, 1);
- err = string_match_precompile(simplify_subject_regexp,
- preg, REG_EXTENDED);
+ err = regcomp(preg, simplify_subject_regexp, REG_EXTENDED);
if (err) {
regerror(err, preg, buf, BUFFSIZE);
alertpanel_error(_("Regular expression (regexp) error:\n%s"), buf);
-----------------------------------------------------------------------
hooks/post-receive
--
Claws Mail
More information about the Commits
mailing list