+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.
+ (search_match_all): properly handle the match-all against 1
+ message as a scalar result, not an array result.
+
+2003-09-03 Not Zed <NotZed@Ximian.com>
+
+ * camel-http-stream.c (camel_http_stream_set_proxy): handle NULL
+ proxy_url - unset the proxy.
+
2003-08-29 Not Zed <NotZed@Ximian.com>
* camel-object.c (camel_object_state_write):
GPtrArray *uids;
int ret = FALSE;
- search->match1 = (CamelMessageInfo *)info;
+ search->current = (CamelMessageInfo *)info;
uids = camel_folder_search_execute_expression(search, expr, ex);
if (uids) {
ret = TRUE;
camel_folder_search_free_result(search, uids);
}
- search->match1 = NULL;
+ search->current = NULL;
return ret;
}
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;
if (argc>1) {
g_warning("match-all only takes a single argument, other arguments ignored");
}
- 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)));
+ r = e_sexp_result_new(f, ESEXP_RES_BOOL);
+ r->value.bool = FALSE;
+
if (argc>0) {
r1 = e_sexp_term_eval(f, argv[0]);
if (r1->type == ESEXP_RES_BOOL) {
- if (r1->value.bool)
- g_ptr_array_add(r->value.ptrarray, (char *)camel_message_info_uid(search->current));
+ r->value.bool = r1->value.bool;
} else {
g_warning("invalid syntax, matches require a single bool result");
e_sexp_fatal_error(f, _("(match-all) requires a single bool result"));
}
e_sexp_result_free(f, r1);
} else {
- g_ptr_array_add(r->value.ptrarray, (char *)camel_message_info_uid(search->current));
+ r->value.bool = TRUE;
}
- search->current = NULL;
-
return r;
}
+ r = e_sexp_result_new(f, ESEXP_RES_ARRAY_PTR);
+ r->value.ptrarray = g_ptr_array_new();
+
if (search->summary == NULL) {
/* TODO: make it work - e.g. use the folder and so forth for a slower search */
g_warning("No summary supplied, match-all doesn't work with no summary");