X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=lib.c;h=d07878ae3bb7c303fda5284816b65793fce7836a;hp=33d377ffa3dbfac1a7369c96fc7112e7129c04a9;hb=7b8296cfa5c33fbc73c34c4fe1ff6d7bfbaaba01;hpb=ae0ce4dfcafa0c3820f107c5bfa8bd06e5272b57 diff --git a/lib.c b/lib.c index 33d377f..d07878a 100644 --- a/lib.c +++ b/lib.c @@ -37,10 +37,10 @@ #include #include #include +#include #include "lib.h" -#include "lib/debug.h" static struct sysexits { @@ -109,28 +109,6 @@ void mutt_nocurses_error (const char *fmt, ...) } -/* these characters must be escaped in regular expressions */ - -static char rx_special_chars[] = "^.[$()|*+?{\\"; - -int mutt_rx_sanitize_string (char *dest, size_t destlen, const char *src) -{ - while (*src && --destlen > 2) { - if (strchr (rx_special_chars, *src)) { - *dest++ = '\\'; - destlen--; - } - *dest++ = *src++; - } - - *dest = '\0'; - - if (*src) - return -1; - else - return 0; -} - const char * mutt_strsysexit(int e) {