g_strdown(ce1->string);
ce1->ref = ae;
- g_completion_list = g_list_append(g_completion_list, ce1);
+ g_completion_list = g_list_prepend(g_completion_list, ce1);
}
/* add_address() - adds address to the completion list. this function looks
ae->name = g_strdup(name);
ae->address = g_strdup(address);
- g_address_list = g_list_append(g_address_list, ae);
+ g_address_list = g_list_prepend(g_address_list, ae);
add_address1(name, ae);
add_address1(address, ae);
*/
static void read_address_book(void) {
addressbook_load_completion( add_address );
+ g_address_list = g_list_reverse(g_address_list);
+ g_completion_list = g_list_reverse(g_completion_list);
}
/* start_address_completion() - returns the number of addresses
#define WRITE_CACHE_DATA(data, fp) \
{ \
gint len; \
- \
- if (data == NULL || (len = strlen(data)) == 0) { \
+ if (data == NULL) \
len = 0; \
- WRITE_CACHE_DATA_INT(len, fp); \
- } else { \
+ else \
len = strlen(data); \
- WRITE_CACHE_DATA_INT(len, fp); \
+ WRITE_CACHE_DATA_INT(len, fp); \
+ if (len > 0) { \
fwrite(data, len, 1, fp); \
} \
}
|| MSG_IS_LOCKED(msginfo->flags)
|| CURRENTLY_DISPLAYED(msginfo))
&& !MSG_IS_IGNORE_THREAD(msginfo->flags))
- not_killed = g_slist_append(not_killed, msginfo);
+ not_killed = g_slist_prepend(not_killed, msginfo);
else
procmsg_msginfo_free(msginfo);
}
}
if (search_type != S_SEARCH_EXTENDED) {
if (searched_header && strcasestr(searched_header, search_string) != NULL)
- not_killed = g_slist_append(not_killed, msginfo);
+ not_killed = g_slist_prepend(not_killed, msginfo);
else
procmsg_msginfo_free(msginfo);
} else {
if ((tmp_list != NULL) && matcherlist_match(tmp_list, msginfo))
- not_killed = g_slist_append(not_killed, msginfo);
+ not_killed = g_slist_prepend(not_killed, msginfo);
else
procmsg_msginfo_free(msginfo);
}
MsgInfo * msginfo = (MsgInfo *) cur->data;
if (msginfo->score > kill_score)
- not_killed = g_slist_append(not_killed, msginfo);
+ not_killed = g_slist_prepend(not_killed, msginfo);
else
procmsg_msginfo_free(msginfo);
}
} else {
gchar *text[N_SUMMARY_COLS];
- mlist = g_slist_reverse(mlist);
for (; mlist != NULL; mlist = mlist->next) {
msginfo = (MsgInfo *)mlist->data;
msginfo->subject,
node);
}
- mlist = g_slist_reverse(mlist);
}
if (prefs_common.enable_hscrollbar &&