[evolution-patches] 47765, fix for (match-all (match-all)) bug
- From: Not Zed <notzed ximian com>
- To: evolution-patches ximian com
- Subject: [evolution-patches] 47765, fix for (match-all (match-all)) bug
- Date: Wed, 20 Aug 2003 17:19:32 -0400
Didnt get around to testing this because of my head build tree. i guess
i should, but in the meantime, someone else can check it too.
main problem is (match-all (match-all)) the second match-all wasn't
recognising it was inside a match-all already, so it returned a vector
when it should've returned a scalar on the current message.
Index: camel/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/camel/ChangeLog,v
retrieving revision 1.1836.2.10
diff -u -3 -r1.1836.2.10 ChangeLog
--- camel/ChangeLog 19 Aug 2003 17:53:28 -0000 1.1836.2.10
+++ camel/ChangeLog 20 Aug 2003 19:55:21 -0000
@@ -1,3 +1,14 @@
+2003-08-20 Not Zed <NotZed Ximian com>
+
+ ** See bug #47765.
+
+ * camel-folder-search.h: Removed match1 member.
+
+ * camel-folder-search.c (camel_folder_search_match_expression):
+ use current directly rather than match1. This method isn't used
+ anywhere anyway.
+ (search_not): remove match1 stuff.
+
2003-08-19 Suresh Chandrasekharan <suresh chandrasekharan sun com>
* camel-iconv.c: Fix for #46168 'some additional locale aliases
Index: camel/camel-folder-search.c
===================================================================
RCS file: /cvs/gnome/evolution/camel/camel-folder-search.c,v
retrieving revision 1.54.4.2
diff -u -3 -r1.54.4.2 camel-folder-search.c
--- camel/camel-folder-search.c 11 Aug 2003 19:09:13 -0000 1.54.4.2
+++ camel/camel-folder-search.c 20 Aug 2003 19:55:21 -0000
@@ -427,7 +427,7 @@
GPtrArray *uids;
int ret = FALSE;
- search->match1 = (CamelMessageInfo *)info;
+ search->current = (CamelMessageInfo *)info;
uids = camel_folder_search_execute_expression(search, expr, ex);
if (uids) {
@@ -435,7 +435,7 @@
ret = TRUE;
camel_folder_search_free_result(search, uids);
}
- search->match1 = NULL;
+ search->current = NULL;
return ret;
}
@@ -493,14 +493,10 @@
r->value.ptrarray = g_ptr_array_new();
/* not against a single message?*/
- if (search->match1 || search->current) {
+ if (search->current) {
int found = FALSE;
- if (search->match1)
- uid = camel_message_info_uid(search->match1);
- else
- uid = camel_message_info_uid(search->current);
-
+ uid = camel_message_info_uid(search->current);
for (i=0;!found && i<v->len;i++) {
if (strcmp(uid, v->pdata[i]) == 0)
found = TRUE;
@@ -559,10 +555,8 @@
r = e_sexp_result_new(f, ESEXP_RES_ARRAY_PTR);
r->value.ptrarray = g_ptr_array_new();
- /* we are only matching a single message? */
- if (search->match1) {
- search->current = search->match1;
-
+ /* we are only matching a single message? or already inside a match-all? */
+ if (search->current) {
d(printf("matching against 1 message: %s\n", camel_message_info_subject(search->current)));
if (argc>0) {
@@ -578,8 +572,6 @@
} else {
g_ptr_array_add(r->value.ptrarray, (char *)camel_message_info_uid(search->current));
}
- search->current = NULL;
-
return r;
}
Index: camel/camel-folder-search.h
===================================================================
RCS file: /cvs/gnome/evolution/camel/camel-folder-search.h,v
retrieving revision 1.26
diff -u -3 -r1.26 camel-folder-search.h
--- camel/camel-folder-search.h 14 Feb 2003 21:44:28 -0000 1.26
+++ camel/camel-folder-search.h 20 Aug 2003 19:55:21 -0000
@@ -52,7 +52,6 @@
GPtrArray *summary; /* summary array for current search */
GHashTable *summary_hash; /* hashtable of summary items */
CamelMessageInfo *current; /* current message info, when searching one by one */
- CamelMessageInfo *match1; /* message info, when searching a single message only */
CamelMimeMessage *current_message; /* cache of current message, if required */
CamelIndex *body_index;
};
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]