X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=regex.c;h=b2755caecf1639072bc15821049527e374a4b9f1;hp=f15550c3ee76c19ad4505460c28dd637c62faeb0;hb=f5b0a93af0b948eaeabe061f5e75f686c7eaef79;hpb=36d6553c2d1a80b38e961b95ebbfe0290dd5b002 diff --git a/regex.c b/regex.c index f15550c..b2755ca 100644 --- a/regex.c +++ b/regex.c @@ -98,6 +98,7 @@ #include "lisp.h" #include "buffer.h" #include "syntax.h" +#include "lib/str.h" #else /* not emacs */ @@ -5389,7 +5390,7 @@ re_comp (s) /* Match anchors at newlines. */ re_comp_buf.newline_anchor = 1; - ret = regex_compile (s, mutt_strlen (s), re_syntax_options, &re_comp_buf); + ret = regex_compile (s, strlen (s), re_syntax_options, &re_comp_buf); if (!ret) return NULL; @@ -5406,7 +5407,7 @@ int re_exec (s) const char *s; { - const int len = mutt_strlen (s); + const int len = strlen (s); return 0 <= re_search (&re_comp_buf, s, len, 0, len, (struct re_registers *) 0); @@ -5503,8 +5504,8 @@ int regcomp (preg, pattern, cflags) preg->no_sub = !!(cflags & REG_NOSUB); /* POSIX says a null character in the pattern terminates it, so we - can use mutt_strlen here in compiling the pattern. */ - ret = regex_compile (pattern, mutt_strlen (pattern), syntax, preg); + can use strlen here in compiling the pattern. */ + ret = regex_compile (pattern, strlen (pattern), syntax, preg); /* POSIX doesn't distinguish between an unmatched open-group and an unmatched close-group: both are REG_EPAREN. */ @@ -5539,7 +5540,7 @@ int regexec (preg, string, nmatch, pmatch, eflags) int ret; struct re_registers regs; regex_t private_preg; - int len = mutt_strlen (string); + int len = strlen (string); boolean want_reg_info = !preg->no_sub && nmatch > 0; private_preg = *preg; @@ -5608,7 +5609,7 @@ size_t regerror (errcode, preg, errbuf, errbuf_size) msg = gettext (re_error_msgid[errcode]); - msg_size = mutt_strlen (msg) + 1; /* Includes the null. */ + msg_size = strlen (msg) + 1; /* Includes the null. */ if (errbuf_size != 0) { if (msg_size > errbuf_size) {