[Commits] [SCM] claws branch, gtk2, updated. 3.20.0-36-gebe78c089
wwp at claws-mail.org
wwp at claws-mail.org
Thu Jan 25 09:56:41 UTC 2024
The branch, gtk2 has been updated
via ebe78c08946b88c139c7178f0eee54b4607ea05d (commit)
from 76c8c420efd4ee0657e3c532e0bf8a03d06b784c (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 ebe78c08946b88c139c7178f0eee54b4607ea05d
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 b9b7a1531..f2d57f728 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 f3cad8568..0668d4f78 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 3375f306e..784035ac8 100644
--- a/src/prefs_folder_item.c
+++ b/src/prefs_folder_item.c
@@ -1879,8 +1879,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 d06c6e9b3..4072df935 100644
--- a/src/summaryview.c
+++ b/src/summaryview.c
@@ -8319,8 +8319,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