move a function into rx.[hc]
[apps/madmutt.git] / lib.c
diff --git a/lib.c b/lib.c
index 33d377f..d07878a 100644 (file)
--- a/lib.c
+++ b/lib.c
 #include <lib-lib/macros.h>
 #include <lib-lib/mem.h>
 #include <lib-lib/str.h>
 #include <lib-lib/macros.h>
 #include <lib-lib/mem.h>
 #include <lib-lib/str.h>
+#include <lib-lib/debug.h>
 
 #include "lib.h"
 
 
 #include "lib.h"
 
-#include "lib/debug.h"
 
 static struct sysexits
 {
 
 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)
 {
 const char *
 mutt_strsysexit(int e)
 {