summaryrefslogtreecommitdiffstats
path: root/lib.c
diff options
context:
space:
mode:
authorThomas Roessler <roessler@does-not-exist.org>1999-01-22 15:24:58 +0000
committerThomas Roessler <roessler@does-not-exist.org>1999-01-22 15:24:58 +0000
commit1b3511a6a1bd35dbaa29b5aba2bac8e4089b3f67 (patch)
tree25faff13721c7017901130514378ae96b19c77fe /lib.c
parent4a933a52f58b27f86dfc4e587d65424d524f60d5 (diff)
Heavy hacking on mutt's pgp support. We no longer read the complete
key ring into memory. For gpg, performance is heavily improved due to the fact that we are passing a couple of key hints to the key ring parsing back-end.
Diffstat (limited to 'lib.c')
-rw-r--r--lib.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/lib.c b/lib.c
index 4653e977..5466d79d 100644
--- a/lib.c
+++ b/lib.c
@@ -1314,3 +1314,23 @@ size_t mutt_strlen(const char *a)
{
return a ? strlen (a) : 0;
}
+
+const char *mutt_stristr (const char *haystack, const char *needle)
+{
+ const char *p, *q;
+
+ if (!haystack)
+ return NULL;
+ if (!needle)
+ return (haystack);
+
+ while (*(p = haystack))
+ {
+ for (q = needle; *p && *q && tolower (*p) == tolower (*q); p++, q++)
+ ;
+ if (!*q)
+ return (haystack);
+ haystack++;
+ }
+ return NULL;
+}