[evolution-data-server] Camel: Prefer GList over GSList.
- From: Matthew Barnes <mbarnes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] Camel: Prefer GList over GSList.
- Date: Sun, 25 Sep 2011 18:11:51 +0000 (UTC)
commit da3d47fc37258f296bc91e3b337f37c72b2d7723
Author: Matthew Barnes <mbarnes redhat com>
Date: Sat Sep 24 12:22:16 2011 -0400
Camel: Prefer GList over GSList.
GSList should really be deprecated.
camel/camel-db.c | 12 +++---
camel/camel-db.h | 6 +-
camel/camel-folder-summary.c | 16 ++++----
camel/camel-object-bag.c | 8 ++--
camel/camel-vee-folder.c | 48 +++++++++++-----------
camel/providers/imap/camel-imap-folder.c | 48 +++++++++++-----------
camel/providers/imapx/camel-imapx-conn-manager.c | 40 +++++++++---------
camel/providers/imapx/camel-imapx-conn-manager.h | 2 +-
camel/providers/imapx/camel-imapx-server.c | 28 ++++++------
camel/providers/imapx/camel-imapx-server.h | 2 +-
camel/providers/imapx/camel-imapx-store.c | 22 +++++-----
camel/providers/local/camel-mbox-summary.c | 16 ++++----
camel/providers/nntp/camel-nntp-summary.c | 8 ++--
13 files changed, 128 insertions(+), 128 deletions(-)
---
diff --git a/camel/camel-db.c b/camel/camel-db.c
index 9dee660..bef5e24 100644
--- a/camel/camel-db.c
+++ b/camel/camel-db.c
@@ -692,7 +692,7 @@ camel_db_add_to_transaction (CamelDB *cdb,
**/
gint
camel_db_transaction_command (CamelDB *cdb,
- GSList *qry_list,
+ GList *qry_list,
GError **error)
{
gint ret;
@@ -713,7 +713,7 @@ camel_db_transaction_command (CamelDB *cdb,
ret = cdb_sql_exec (cdb->db, query, NULL, NULL, error);
if (ret)
goto end;
- qry_list = g_slist_next (qry_list);
+ qry_list = g_list_next (qry_list);
}
ret = cdb_sql_exec (cdb->db, "COMMIT", NULL, NULL, error);
@@ -1958,7 +1958,7 @@ camel_db_delete_uid (CamelDB *cdb,
static gint
cdb_delete_ids (CamelDB *cdb,
const gchar *folder_name,
- GSList *uids,
+ GList *uids,
const gchar *uid_prefix,
const gchar *field,
GError **error)
@@ -1968,7 +1968,7 @@ cdb_delete_ids (CamelDB *cdb,
gchar *tab;
gboolean first = TRUE;
GString *str = g_string_new ("DELETE FROM ");
- GSList *iterator;
+ GList *iterator;
GString *ins_str = NULL;
if (strcmp (field, "vuid") != 0)
@@ -2039,7 +2039,7 @@ cdb_delete_ids (CamelDB *cdb,
gint
camel_db_delete_uids (CamelDB *cdb,
const gchar *folder_name,
- GSList *uids,
+ GList *uids,
GError **error)
{
if (!uids || !uids->data)
@@ -2057,7 +2057,7 @@ gint
camel_db_delete_vuids (CamelDB *cdb,
const gchar *folder_name,
const gchar *hash,
- GSList *uids,
+ GList *uids,
GError **error)
{
return cdb_delete_ids (cdb, folder_name, uids, hash, "vuid", error);
diff --git a/camel/camel-db.h b/camel/camel-db.h
index 761d413..ad89225 100644
--- a/camel/camel-db.h
+++ b/camel/camel-db.h
@@ -212,7 +212,7 @@ CamelDB * camel_db_clone (CamelDB *cdb, GError **error);
void camel_db_close (CamelDB *cdb);
gint camel_db_command (CamelDB *cdb, const gchar *stmt, GError **error);
-gint camel_db_transaction_command (CamelDB *cdb, GSList *qry_list, GError **error);
+gint camel_db_transaction_command (CamelDB *cdb, GList *qry_list, GError **error);
gint camel_db_begin_transaction (CamelDB *cdb, GError **error);
gint camel_db_add_to_transaction (CamelDB *cdb, const gchar *query, GError **error);
@@ -224,8 +224,8 @@ gint camel_db_rename_folder (CamelDB *cdb, const gchar *old_folder, const gchar
gint camel_db_delete_folder (CamelDB *cdb, const gchar *folder, GError **error);
gint camel_db_delete_uid (CamelDB *cdb, const gchar *folder, const gchar *uid, GError **error);
/*int camel_db_delete_uids (CamelDB *cdb, GError **error, gint nargs, ... );*/
-gint camel_db_delete_uids (CamelDB *cdb, const gchar * folder_name, GSList *uids, GError **error);
-gint camel_db_delete_vuids (CamelDB *cdb, const gchar * folder_name, const gchar *shash, GSList *uids, GError **error);
+gint camel_db_delete_uids (CamelDB *cdb, const gchar * folder_name, GList *uids, GError **error);
+gint camel_db_delete_vuids (CamelDB *cdb, const gchar * folder_name, const gchar *shash, GList *uids, GError **error);
gint camel_db_create_folders_table (CamelDB *cdb, GError **error);
gint camel_db_select (CamelDB *cdb, const gchar * stmt, CamelDBSelectCB callback, gpointer data, GError **error);
diff --git a/camel/camel-folder-summary.c b/camel/camel-folder-summary.c
index d303ff7..d0cf62f 100644
--- a/camel/camel-folder-summary.c
+++ b/camel/camel-folder-summary.c
@@ -1523,11 +1523,11 @@ cfs_count_dirty (CamelFolderSummary *s)
static gboolean
remove_item (gchar *key,
CamelMessageInfoBase *info,
- GSList **to_free_list)
+ GList **to_free_list)
{
d(printf("%d(%d)\t", info->refcount, info->dirty)); /* camel_message_info_dump (info); */
if (info->refcount == 1 && !info->dirty && !(info->flags & CAMEL_MESSAGE_FOLDER_FLAGGED)) {
- *to_free_list = g_slist_prepend (*to_free_list, info);
+ *to_free_list = g_list_prepend (*to_free_list, info);
return TRUE;
}
return FALSE;
@@ -1539,7 +1539,7 @@ remove_cache (CamelSession *session,
CamelFolderSummary *summary,
GError **error)
{
- GSList *to_free_list = NULL, *l;
+ GList *to_free_list = NULL, *l;
CAMEL_DB_RELEASE_SQLITE_MEMORY;
@@ -1559,7 +1559,7 @@ remove_cache (CamelSession *session,
* entries from the hash_table in foreach_remove otherwise */
for (l = to_free_list; l; l = l->next)
camel_message_info_free (l->data);
- g_slist_free (to_free_list);
+ g_list_free (to_free_list);
camel_folder_summary_unlock (
summary, CAMEL_FOLDER_SUMMARY_SUMMARY_LOCK);
@@ -3133,7 +3133,7 @@ camel_folder_summary_remove_range (CamelFolderSummary *s,
CamelDB *cdb;
CamelStore *parent_store;
const gchar *folder_name;
- GSList *uids = NULL;
+ GList *uids = NULL;
end = MIN (end + 1, s->uids->len);
@@ -3142,7 +3142,7 @@ camel_folder_summary_remove_range (CamelFolderSummary *s,
gpointer olduid, oldinfo;
/* the uid will be freed below and will not be used because of changing size of the s->uids array */
- uids = g_slist_prepend (uids, (gpointer) uid);
+ uids = g_list_prepend (uids, (gpointer) uid);
if (g_hash_table_lookup_extended (s->loaded_infos, uid, &olduid, &oldinfo)) {
camel_message_info_free (oldinfo);
@@ -3160,8 +3160,8 @@ camel_folder_summary_remove_range (CamelFolderSummary *s,
* folder switch */
camel_db_delete_uids (cdb, folder_name, uids, NULL);
- g_slist_foreach (uids, (GFunc) camel_pstring_free, NULL);
- g_slist_free (uids);
+ g_list_foreach (uids, (GFunc) camel_pstring_free, NULL);
+ g_list_free (uids);
memmove (s->uids->pdata + start, s->uids->pdata + end, (s->uids->len - end) * sizeof (s->uids->pdata[0]));
g_ptr_array_set_size (s->uids, s->uids->len - (end - start));
diff --git a/camel/camel-object-bag.c b/camel/camel-object-bag.c
index 79ca4a2..03029f6 100644
--- a/camel/camel-object-bag.c
+++ b/camel/camel-object-bag.c
@@ -36,7 +36,7 @@ struct _CamelObjectBag {
GEqualFunc key_equal_func;
CamelCopyFunc key_copy_func;
GFreeFunc key_free_func;
- GSList *reserved; /* list of KeyReservations */
+ GList *reserved; /* list of KeyReservations */
GMutex *mutex;
};
@@ -51,7 +51,7 @@ key_reservation_new (CamelObjectBag *bag,
reservation->owner = g_thread_self ();
reservation->cond = g_cond_new ();
- bag->reserved = g_slist_prepend (bag->reserved, reservation);
+ bag->reserved = g_list_prepend (bag->reserved, reservation);
return reservation;
}
@@ -60,7 +60,7 @@ static KeyReservation *
key_reservation_lookup (CamelObjectBag *bag,
gconstpointer key)
{
- GSList *iter;
+ GList *iter;
/* XXX Might be easier to use a GHashTable for reservations. */
for (iter = bag->reserved; iter != NULL; iter = iter->next) {
@@ -79,7 +79,7 @@ key_reservation_free (CamelObjectBag *bag,
/* Make sure the reservation is actually in the object bag. */
g_return_if_fail (key_reservation_lookup (bag, reservation->key) != NULL);
- bag->reserved = g_slist_remove (bag->reserved, reservation);
+ bag->reserved = g_list_remove (bag->reserved, reservation);
bag->key_free_func (reservation->key);
g_cond_free (reservation->cond);
diff --git a/camel/camel-vee-folder.c b/camel/camel-vee-folder.c
index 3da3f19..5a3d275 100644
--- a/camel/camel-vee-folder.c
+++ b/camel/camel-vee-folder.c
@@ -141,8 +141,8 @@ folder_changed_add_uid (CamelFolder *sub,
const gchar hash[8],
CamelVeeFolder *vf,
gboolean use_db,
- GSList **m_added_l,
- GSList **unm_added_l)
+ GList **m_added_l,
+ GList **unm_added_l)
{
CamelVeeMessageInfo *vinfo;
const gchar *vuid;
@@ -160,7 +160,7 @@ folder_changed_add_uid (CamelFolder *sub,
camel_message_info_free ((CamelMessageInfo *) vinfo);
if (use_db)
- *m_added_l = g_slist_prepend (*m_added_l, (gpointer) camel_pstring_strdup (vuid));
+ *m_added_l = g_list_prepend (*m_added_l, (gpointer) camel_pstring_strdup (vuid));
camel_folder_change_info_add_uid (vf->changes, vuid);
if ((vf->flags & CAMEL_STORE_FOLDER_PRIVATE) == 0 && !CAMEL_IS_VEE_FOLDER (sub) && folder_unmatched != NULL) {
@@ -176,7 +176,7 @@ folder_changed_add_uid (CamelFolder *sub,
camel_folder_change_info_remove_uid (
folder_unmatched->changes, vuid);
- *unm_added_l = g_slist_prepend (*unm_added_l, (gpointer) camel_pstring_strdup (vuid));
+ *unm_added_l = g_list_prepend (*unm_added_l, (gpointer) camel_pstring_strdup (vuid));
camel_folder_summary_remove_uid_fast (
CAMEL_FOLDER (folder_unmatched)->summary, vuid);
@@ -196,8 +196,8 @@ folder_changed_remove_uid (CamelFolder *sub,
gint keep,
CamelVeeFolder *vf,
gboolean use_db,
- GSList **m_removed_l,
- GSList **unm_removed_l)
+ GList **m_removed_l,
+ GList **unm_removed_l)
{
CamelFolder *folder = (CamelFolder *) vf;
gchar *vuid, *oldkey;
@@ -219,7 +219,7 @@ folder_changed_remove_uid (CamelFolder *sub,
camel_folder_change_info_remove_uid (vf->changes, vuid);
if (use_db)
- *m_removed_l = g_slist_prepend (*m_removed_l, (gpointer) camel_pstring_strdup (vuid));
+ *m_removed_l = g_list_prepend (*m_removed_l, (gpointer) camel_pstring_strdup (vuid));
camel_folder_summary_remove_uid_fast (folder->summary, vuid);
@@ -251,7 +251,7 @@ folder_changed_remove_uid (CamelFolder *sub,
camel_folder_change_info_remove_uid (
folder_unmatched->changes, vuid);
- *unm_removed_l = g_slist_prepend (*unm_removed_l, (gpointer) camel_pstring_strdup (vuid));
+ *unm_removed_l = g_list_prepend (*unm_removed_l, (gpointer) camel_pstring_strdup (vuid));
camel_folder_summary_remove_uid_fast (
CAMEL_FOLDER (folder_unmatched)->summary, vuid);
@@ -281,8 +281,8 @@ folder_changed_change_uid (CamelFolder *sub,
const gchar hash[8],
CamelVeeFolder *vf,
gboolean use_db,
- GSList **m_removed_l,
- GSList **unm_removed_l)
+ GList **m_removed_l,
+ GList **unm_removed_l)
{
gchar *vuid;
CamelVeeMessageInfo *vinfo, *uinfo = NULL;
@@ -327,13 +327,13 @@ folder_changed_change_uid (CamelFolder *sub,
static void
vfolder_add_remove_transaction (CamelStore *parent_store,
const gchar *full_name,
- GSList **uids,
+ GList **uids,
gboolean add,
GError **error)
{
- GSList *l;
+ GList *l;
- for (l = *uids; l != NULL; l = g_slist_next (l)) {
+ for (l = *uids; l != NULL; l = g_list_next (l)) {
if (add)
camel_db_add_to_vfolder_transaction (parent_store->cdb_w, full_name,
(const gchar *) l->data, error);
@@ -343,8 +343,8 @@ vfolder_add_remove_transaction (CamelStore *parent_store,
(const gchar *) l->data, error);
}
- g_slist_foreach (*uids, (GFunc) camel_pstring_free, NULL);
- g_slist_free (*uids);
+ g_list_foreach (*uids, (GFunc) camel_pstring_free, NULL);
+ g_list_free (*uids);
*uids = NULL;
}
@@ -372,7 +372,7 @@ folder_changed_change (CamelSession *session,
CamelVeeFolder *folder_unmatched = vf->parent_vee_store ? vf->parent_vee_store->folder_unmatched : NULL;
GHashTable *unmatched_uids = vf->parent_vee_store ? vf->parent_vee_store->unmatched_uids : NULL;
GPtrArray *present = NULL;
- GSList *m_added_l = NULL, *m_removed_l = NULL, *unm_added_l = NULL, *unm_removed_l = NULL;
+ GList *m_added_l = NULL, *m_removed_l = NULL, *unm_added_l = NULL, *unm_removed_l = NULL;
/* See vee_folder_rebuild_folder. */
gboolean correlating = expression_is_correlating (vf->expression);
@@ -1425,7 +1425,7 @@ vee_folder_synchronize_sync (CamelFolder *folder,
/* Cleanup Junk/Trash uids */
CamelStore *parent_store;
const gchar *full_name;
- GSList *del = NULL;
+ GList *del = NULL;
gint i, count;
camel_folder_summary_prepare_fetch_all (folder->summary, NULL);
@@ -1433,7 +1433,7 @@ vee_folder_synchronize_sync (CamelFolder *folder,
for (i = 0; i < count; i++) {
CamelVeeMessageInfo *mi = (CamelVeeMessageInfo *) camel_folder_summary_index (folder->summary, i);
if (mi->old_flags & CAMEL_MESSAGE_DELETED) {
- del = g_slist_prepend (del, (gpointer) camel_pstring_strdup (((CamelMessageInfo *) mi)->uid));
+ del = g_list_prepend (del, (gpointer) camel_pstring_strdup (((CamelMessageInfo *) mi)->uid));
camel_folder_summary_update_counts_by_flags (folder->summary, mi->old_flags, TRUE);
camel_folder_summary_remove_index_fast (folder->summary, i);
count--;
@@ -1446,8 +1446,8 @@ vee_folder_synchronize_sync (CamelFolder *folder,
full_name = camel_folder_get_full_name (folder);
parent_store = camel_folder_get_parent_store (folder);
camel_db_delete_vuids (parent_store->cdb_w, full_name, "", del, NULL);
- g_slist_foreach (del, (GFunc) camel_pstring_free, NULL);
- g_slist_free (del);
+ g_list_foreach (del, (GFunc) camel_pstring_free, NULL);
+ g_list_free (del);
}
camel_vee_folder_unlock (vf, CAMEL_VEE_FOLDER_SUBFOLDER_LOCK);
@@ -1709,7 +1709,7 @@ vee_folder_rebuild_folder (CamelVeeFolder *vee_folder,
{
GPtrArray *match = NULL, *all;
GHashTable *allhash, *matchhash, *fullhash;
- GSList *del_list = NULL;
+ GList *del_list = NULL;
CamelFolder *folder = (CamelFolder *) vee_folder;
gint i, n, count, start, last;
struct _update_data u;
@@ -1786,7 +1786,7 @@ vee_folder_rebuild_folder (CamelVeeFolder *vee_folder,
for (i = 0; i < count; i++) {
if (!g_hash_table_lookup (fullhash, match->pdata[i])) {
g_hash_table_remove (matchhash, match->pdata[i]);
- del_list = g_slist_prepend (del_list, match->pdata[i]); /* Free the original */
+ del_list = g_list_prepend (del_list, match->pdata[i]); /* Free the original */
g_ptr_array_remove_index_fast (match, i);
i--;
count--;
@@ -1961,8 +1961,8 @@ vee_folder_rebuild_folder (CamelVeeFolder *vee_folder,
full_name, shash, del_list, NULL);
}
- g_slist_foreach (del_list, (GFunc) camel_pstring_free, NULL);
- g_slist_free (del_list);
+ g_list_foreach (del_list, (GFunc) camel_pstring_free, NULL);
+ g_list_free (del_list);
};
g_hash_table_destroy (matchhash);
diff --git a/camel/providers/imap/camel-imap-folder.c b/camel/providers/imap/camel-imap-folder.c
index cc3d0c6..6ac168e 100644
--- a/camel/providers/imap/camel-imap-folder.c
+++ b/camel/providers/imap/camel-imap-folder.c
@@ -950,7 +950,7 @@ static gboolean
merge_custom_flags (CamelMessageInfo *mi,
const gchar *custom_flags)
{
- GSList *list, *p;
+ GList *list, *p;
GHashTable *server;
gchar **cflags;
gint i;
@@ -971,7 +971,7 @@ merge_custom_flags (CamelMessageInfo *mi,
if (name && *name) {
g_hash_table_insert (server, name, name);
- list = g_slist_prepend (list, name);
+ list = g_list_prepend (list, name);
}
}
@@ -979,10 +979,10 @@ merge_custom_flags (CamelMessageInfo *mi,
gchar *name = (gchar *) flag->name;
if (name && *name)
- list = g_slist_prepend (list, name);
+ list = g_list_prepend (list, name);
}
- list = g_slist_sort (list, (GCompareFunc) strcmp);
+ list = g_list_sort (list, (GCompareFunc) strcmp);
for (p = list; p; p = p->next) {
if (p->next && strcmp (p->data, p->next->data) == 0) {
/* This flag is there twice, which means it was on the server and
@@ -1000,7 +1000,7 @@ merge_custom_flags (CamelMessageInfo *mi,
}
}
- g_slist_free (list);
+ g_list_free (list);
g_hash_table_destroy (server);
g_strfreev (cflags);
@@ -1384,7 +1384,7 @@ get_matching (CamelFolder *folder,
CamelImapMessageInfo *info;
gint i, max, range, last_range_uid;
GString *gset;
- GSList *list1 = NULL;
+ GList *list1 = NULL;
gint count1 = 0;
gchar *uid;
@@ -1437,40 +1437,40 @@ get_matching (CamelFolder *folder,
/* only check user flags when we see other message than our 'master' */
if (strcmp (master_info->uid, ((CamelMessageInfo *) info)->uid)) {
const CamelFlag *flag;
- GSList *list2 = NULL, *l1, *l2;
+ GList *list2 = NULL, *l1, *l2;
gint count2 = 0, cmp = 0;
if (!list1) {
for (flag = camel_message_info_user_flags (master_info); flag; flag = flag->next) {
if (flag->name && *flag->name) {
count1++;
- list1 = g_slist_prepend (list1, (gchar *) flag->name);
+ list1 = g_list_prepend (list1, (gchar *) flag->name);
}
}
- list1 = g_slist_sort (list1, (GCompareFunc) strcmp);
+ list1 = g_list_sort (list1, (GCompareFunc) strcmp);
}
for (flag = camel_message_info_user_flags (info); flag; flag = flag->next) {
if (flag->name && *flag->name) {
count2++;
- list2 = g_slist_prepend (list2, (gchar *) flag->name);
+ list2 = g_list_prepend (list2, (gchar *) flag->name);
}
}
if (count1 != count2) {
- g_slist_free (list2);
+ g_list_free (list2);
close_range ();
continue;
}
- list2 = g_slist_sort (list2, (GCompareFunc) strcmp);
+ list2 = g_list_sort (list2, (GCompareFunc) strcmp);
for (l1 = list1, l2 = list2; l1 && l2 && !cmp; l1 = l1->next, l2 = l2->next) {
cmp = strcmp (l1->data, l2->data);
}
if (cmp) {
- g_slist_free (list2);
+ g_list_free (list2);
close_range ();
continue;
}
@@ -1506,7 +1506,7 @@ get_matching (CamelFolder *folder,
}
if (list1)
- g_slist_free (list1);
+ g_list_free (list1);
if (matches->len) {
*set = gset->str;
@@ -1907,7 +1907,7 @@ imap_expunge_uids_offline (CamelFolder *folder,
{
CamelFolderChangeInfo *changes;
CamelStore *parent_store;
- GSList *list = NULL;
+ GList *list = NULL;
const gchar *full_name;
gint i;
@@ -1921,14 +1921,14 @@ imap_expunge_uids_offline (CamelFolder *folder,
for (i = 0; i < uids->len; i++) {
camel_folder_summary_remove_uid_fast (folder->summary, uids->pdata[i]);
camel_folder_change_info_remove_uid (changes, uids->pdata[i]);
- list = g_slist_prepend (list, (gpointer) uids->pdata[i]);
+ list = g_list_prepend (list, (gpointer) uids->pdata[i]);
/* We intentionally don't remove it from the cache because
* the cached data may be useful in replaying a COPY later.
*/
}
camel_db_delete_uids (parent_store->cdb_w, full_name, list, NULL);
- g_slist_free (list);
+ g_list_free (list);
camel_folder_summary_save_to_db (folder->summary, NULL);
camel_imap_journal_log (CAMEL_IMAP_FOLDER (folder)->journal,
@@ -1955,7 +1955,7 @@ imap_expunge_uids_online (CamelFolder *folder,
CamelStore *parent_store;
const gchar *full_name;
gint i;
- GSList *list = NULL;
+ GList *list = NULL;
full_name = camel_folder_get_full_name (folder);
parent_store = camel_folder_get_parent_store (folder);
@@ -2024,14 +2024,14 @@ imap_expunge_uids_online (CamelFolder *folder,
for (i = 0; i < uids->len; i++) {
camel_folder_summary_remove_uid_fast (folder->summary, uids->pdata[i]);
camel_folder_change_info_remove_uid (changes, uids->pdata[i]);
- list = g_slist_prepend (list, (gpointer) uids->pdata[i]);
+ list = g_list_prepend (list, (gpointer) uids->pdata[i]);
/* We intentionally don't remove it from the cache because
* the cached data may be useful in replaying a COPY later.
*/
}
camel_db_delete_uids (parent_store->cdb_w, full_name, list, NULL);
- g_slist_free (list);
+ g_list_free (list);
camel_folder_summary_save_to_db (folder->summary, NULL);
camel_folder_changed (folder, changes);
camel_folder_change_info_free (changes);
@@ -4393,7 +4393,7 @@ camel_imap_folder_changed (CamelFolder *folder,
if (expunged) {
CamelStore *parent_store;
gint i, id;
- GSList *deleted = NULL;
+ GList *deleted = NULL;
const gchar *full_name;
for (i = 0; i < expunged->len; i++) {
@@ -4405,7 +4405,7 @@ camel_imap_folder_changed (CamelFolder *folder,
continue;
}
- deleted = g_slist_prepend (deleted, uid);
+ deleted = g_list_prepend (deleted, uid);
camel_folder_change_info_remove_uid (changes, uid);
CAMEL_IMAP_FOLDER_REC_LOCK (imap_folder, cache_lock);
camel_imap_message_cache_remove (imap_folder->cache, uid);
@@ -4417,8 +4417,8 @@ camel_imap_folder_changed (CamelFolder *folder,
full_name = camel_folder_get_full_name (folder);
parent_store = camel_folder_get_parent_store (folder);
camel_db_delete_uids (parent_store->cdb_w, full_name, deleted, NULL);
- g_slist_foreach (deleted, (GFunc) g_free, NULL);
- g_slist_free (deleted);
+ g_list_foreach (deleted, (GFunc) g_free, NULL);
+ g_list_free (deleted);
}
len = camel_folder_summary_count (folder->summary);
diff --git a/camel/providers/imapx/camel-imapx-conn-manager.c b/camel/providers/imapx/camel-imapx-conn-manager.c
index 0d24e8b..715912c 100644
--- a/camel/providers/imapx/camel-imapx-conn-manager.c
+++ b/camel/providers/imapx/camel-imapx-conn-manager.c
@@ -38,7 +38,7 @@ G_DEFINE_TYPE (
CAMEL_TYPE_OBJECT)
struct _CamelIMAPXConnManagerPrivate {
- GSList *connections;
+ GList *connections;
gpointer store; /* weak pointer */
GStaticRecMutex con_man_lock;
gboolean clearing_connections;
@@ -77,7 +77,7 @@ imapx_prune_connections (CamelIMAPXConnManager *con_man)
CON_LOCK (con_man);
con_man->priv->clearing_connections = TRUE;
- g_slist_foreach (con_man->priv->connections, (GFunc) free_connection, NULL);
+ g_list_foreach (con_man->priv->connections, (GFunc) free_connection, NULL);
con_man->priv->connections = NULL;
con_man->priv->clearing_connections = FALSE;
@@ -207,7 +207,7 @@ static void
imapx_conn_shutdown (CamelIMAPXServer *conn,
CamelIMAPXConnManager *con_man)
{
- GSList *l;
+ GList *l;
ConnectionInfo *cinfo;
gboolean found = FALSE;
@@ -222,7 +222,7 @@ imapx_conn_shutdown (CamelIMAPXServer *conn,
CON_LOCK (con_man);
- for (l = con_man->priv->connections; l != NULL; l = g_slist_next (l)) {
+ for (l = con_man->priv->connections; l != NULL; l = g_list_next (l)) {
cinfo = (ConnectionInfo *) l->data;
if (cinfo->conn == conn) {
found = TRUE;
@@ -231,7 +231,7 @@ imapx_conn_shutdown (CamelIMAPXServer *conn,
}
if (found) {
- con_man->priv->connections = g_slist_remove (con_man->priv->connections, cinfo);
+ con_man->priv->connections = g_list_remove (con_man->priv->connections, cinfo);
free_connection (cinfo, GINT_TO_POINTER (1));
}
@@ -243,13 +243,13 @@ imapx_conn_update_select (CamelIMAPXServer *conn,
const gchar *selected_folder,
CamelIMAPXConnManager *con_man)
{
- GSList *l;
+ GList *l;
ConnectionInfo *cinfo;
gboolean found = FALSE;
CON_LOCK (con_man);
- for (l = con_man->priv->connections; l != NULL; l = g_slist_next (l)) {
+ for (l = con_man->priv->connections; l != NULL; l = g_list_next (l)) {
cinfo = (ConnectionInfo *) l->data;
if (cinfo->conn == conn) {
found = TRUE;
@@ -282,7 +282,7 @@ imapx_find_connection (CamelIMAPXConnManager *con_man,
const gchar *folder_name)
{
guint i = 0, prev_len = -1, n = -1;
- GSList *l;
+ GList *l;
CamelIMAPXServer *conn = NULL;
CamelService *service;
CamelSettings *settings;
@@ -299,7 +299,7 @@ imapx_find_connection (CamelIMAPXConnManager *con_man,
CAMEL_IMAPX_SETTINGS (settings));
/* Have a dedicated connection for INBOX ? */
- for (l = con_man->priv->connections, i = 0; l != NULL; l = g_slist_next (l), i++) {
+ for (l = con_man->priv->connections, i = 0; l != NULL; l = g_list_next (l), i++) {
IMAPXJobQueueInfo *jinfo = NULL;
cinfo = (ConnectionInfo *) l->data;
@@ -325,8 +325,8 @@ imapx_find_connection (CamelIMAPXConnManager *con_man,
}
}
- if (!conn && n != -1 && (!folder_name || concurrent_connections == g_slist_length (con_man->priv->connections))) {
- cinfo = g_slist_nth_data (con_man->priv->connections, n);
+ if (!conn && n != -1 && (!folder_name || concurrent_connections == g_list_length (con_man->priv->connections))) {
+ cinfo = g_list_nth_data (con_man->priv->connections, n);
conn = g_object_ref (cinfo->conn);
if (folder_name) {
@@ -336,7 +336,7 @@ imapx_find_connection (CamelIMAPXConnManager *con_man,
}
if (camel_debug_flag (conman))
- g_assert (!(concurrent_connections == g_slist_length (con_man->priv->connections) && !conn));
+ g_assert (!(concurrent_connections == g_list_length (con_man->priv->connections) && !conn));
CON_UNLOCK (con_man);
@@ -386,9 +386,9 @@ imapx_create_new_connection (CamelIMAPXConnManager *con_man,
if (folder_name)
g_hash_table_insert (cinfo->folders, g_strdup (folder_name), GINT_TO_POINTER (1));
- con_man->priv->connections = g_slist_prepend (con_man->priv->connections, cinfo);
+ con_man->priv->connections = g_list_prepend (con_man->priv->connections, cinfo);
- c(conn->tagprefix, "Created new connection for %s and total connections %d \n", folder_name, g_slist_length (con_man->priv->connections));
+ c(conn->tagprefix, "Created new connection for %s and total connections %d \n", folder_name, g_list_length (con_man->priv->connections));
CON_UNLOCK (con_man);
@@ -435,17 +435,17 @@ camel_imapx_conn_manager_get_connection (CamelIMAPXConnManager *con_man,
return conn;
}
-GSList *
+GList *
camel_imapx_conn_manager_get_connections (CamelIMAPXConnManager *con_man)
{
- GSList *l, *conns = NULL;
+ GList *l, *conns = NULL;
CON_LOCK (con_man);
- for (l = con_man->priv->connections; l != NULL; l = g_slist_next (l)) {
+ for (l = con_man->priv->connections; l != NULL; l = g_list_next (l)) {
ConnectionInfo *cinfo = (ConnectionInfo *) l->data;
- conns = g_slist_prepend (conns, g_object_ref (cinfo->conn));
+ conns = g_list_prepend (conns, g_object_ref (cinfo->conn));
}
CON_UNLOCK (con_man);
@@ -459,7 +459,7 @@ camel_imapx_conn_manager_update_con_info (CamelIMAPXConnManager *con_man,
CamelIMAPXServer *conn,
const gchar *folder_name)
{
- GSList *l;
+ GList *l;
ConnectionInfo *cinfo;
gboolean found = FALSE;
@@ -467,7 +467,7 @@ camel_imapx_conn_manager_update_con_info (CamelIMAPXConnManager *con_man,
CON_LOCK (con_man);
- for (l = con_man->priv->connections; l != NULL; l = g_slist_next (l)) {
+ for (l = con_man->priv->connections; l != NULL; l = g_list_next (l)) {
cinfo = (ConnectionInfo *) l->data;
if (cinfo->conn == conn) {
found = TRUE;
diff --git a/camel/providers/imapx/camel-imapx-conn-manager.h b/camel/providers/imapx/camel-imapx-conn-manager.h
index 6d753fb..5ac1385 100644
--- a/camel/providers/imapx/camel-imapx-conn-manager.h
+++ b/camel/providers/imapx/camel-imapx-conn-manager.h
@@ -68,7 +68,7 @@ CamelIMAPXServer *
GError **error);
void camel_imapx_conn_manager_close_connections
(CamelIMAPXConnManager *con_man);
-GSList * camel_imapx_conn_manager_get_connections
+GList * camel_imapx_conn_manager_get_connections
(CamelIMAPXConnManager *con_man);
void camel_imapx_conn_manager_update_con_info
(CamelIMAPXConnManager *con_man,
diff --git a/camel/providers/imapx/camel-imapx-server.c b/camel/providers/imapx/camel-imapx-server.c
index 8871f80..7165d11 100644
--- a/camel/providers/imapx/camel-imapx-server.c
+++ b/camel/providers/imapx/camel-imapx-server.c
@@ -1270,7 +1270,7 @@ imapx_expunge_uid_from_summary (CamelIMAPXServer *imap,
}
camel_folder_summary_remove_uid_fast (imap->select_folder->summary, uid);
- imap->expunged = g_slist_prepend (imap->expunged, uid);
+ imap->expunged = g_list_prepend (imap->expunged, uid);
camel_folder_change_info_remove_uid (imap->changes, uid);
@@ -1282,8 +1282,8 @@ imapx_expunge_uid_from_summary (CamelIMAPXServer *imap,
imapx_update_store_summary (imap->select_folder);
camel_folder_changed (imap->select_folder, imap->changes);
- g_slist_foreach (imap->expunged, (GFunc) g_free, NULL);
- g_slist_free (imap->expunged);
+ g_list_foreach (imap->expunged, (GFunc) g_free, NULL);
+ g_list_free (imap->expunged);
imap->expunged = NULL;
camel_folder_change_info_clear (imap->changes);
}
@@ -2025,8 +2025,8 @@ imapx_completion (CamelIMAPXServer *imap,
}
if (imap->expunged) {
- g_slist_foreach (imap->expunged, (GFunc) g_free, NULL);
- g_slist_free (imap->expunged);
+ g_list_foreach (imap->expunged, (GFunc) g_free, NULL);
+ g_list_free (imap->expunged);
imap->expunged = NULL;
}
@@ -3897,7 +3897,7 @@ imapx_job_scan_changes_done (CamelIMAPXServer *is,
CamelIMAPXMessageInfo *info;
CamelFolderSummary *s = job->folder->summary;
CamelIMAPXFolder *ifolder = (CamelIMAPXFolder *) job->folder;
- GSList *removed = NULL, *l;
+ GList *removed = NULL, *l;
gboolean fetch_new = FALSE;
gint i;
guint j = 0;
@@ -3933,7 +3933,7 @@ imapx_job_scan_changes_done (CamelIMAPXServer *is,
const gchar *uid = camel_message_info_uid (s_minfo);
camel_folder_change_info_remove_uid (job->u.refresh_info.changes, uid);
- removed = g_slist_prepend (removed, (gpointer ) g_strdup (uid));
+ removed = g_list_prepend (removed, (gpointer ) g_strdup (uid));
camel_message_info_free (s_minfo);
s_minfo = NULL;
@@ -3977,12 +3977,12 @@ imapx_job_scan_changes_done (CamelIMAPXServer *is,
}
e(is->tagprefix, "Message %s vanished\n", s_minfo->uid);
- removed = g_slist_prepend (removed, (gpointer) g_strdup (s_minfo->uid));
+ removed = g_list_prepend (removed, (gpointer) g_strdup (s_minfo->uid));
camel_message_info_free (s_minfo);
j++;
}
- for (l = removed; l != NULL; l = g_slist_next (l)) {
+ for (l = removed; l != NULL; l = g_list_next (l)) {
gchar *uid = (gchar *) l->data;
CamelMessageInfo *mi;
@@ -4001,8 +4001,8 @@ imapx_job_scan_changes_done (CamelIMAPXServer *is,
full_name = camel_folder_get_full_name (s->folder);
camel_db_delete_uids (is->store->cdb_w, full_name, removed, NULL);
- g_slist_foreach (removed, (GFunc) g_free, NULL);
- g_slist_free (removed);
+ g_list_foreach (removed, (GFunc) g_free, NULL);
+ g_list_free (removed);
}
imapx_update_store_summary (job->folder);
@@ -4384,7 +4384,7 @@ imapx_command_expunge_done (CamelIMAPXServer *is,
if (uids && uids->len) {
CamelFolderChangeInfo *changes;
- GSList *removed = NULL;
+ GList *removed = NULL;
gint i;
changes = camel_folder_change_info_new ();
@@ -4399,7 +4399,7 @@ imapx_command_expunge_done (CamelIMAPXServer *is,
camel_folder_summary_remove_uid_fast (folder->summary, uid);
camel_folder_change_info_remove_uid (changes, uids->pdata[i]);
- removed = g_slist_prepend (removed, (gpointer) uids->pdata[i]);
+ removed = g_list_prepend (removed, (gpointer) uids->pdata[i]);
}
camel_db_delete_uids (parent_store->cdb_w, full_name, removed, NULL);
@@ -4407,7 +4407,7 @@ imapx_command_expunge_done (CamelIMAPXServer *is,
camel_folder_changed (folder, changes);
camel_folder_change_info_free (changes);
- g_slist_free (removed);
+ g_list_free (removed);
g_ptr_array_foreach (uids, (GFunc) camel_pstring_free, NULL);
g_ptr_array_free (uids, TRUE);
}
diff --git a/camel/providers/imapx/camel-imapx-server.h b/camel/providers/imapx/camel-imapx-server.h
index dbec35a..94deb60 100644
--- a/camel/providers/imapx/camel-imapx-server.h
+++ b/camel/providers/imapx/camel-imapx-server.h
@@ -103,7 +103,7 @@ struct _CamelIMAPXServer {
/* any expunges that happened from the last command, they are
* processed after the command completes. */
- GSList *expunged;
+ GList *expunged;
GThread *parser_thread;
/* Protects the output stream between parser thread (which can disconnect from server) and other threads that issue
diff --git a/camel/providers/imapx/camel-imapx-store.c b/camel/providers/imapx/camel-imapx-store.c
index 28824c6..4bcd552 100644
--- a/camel/providers/imapx/camel-imapx-store.c
+++ b/camel/providers/imapx/camel-imapx-store.c
@@ -852,20 +852,20 @@ fetch_folders_for_pattern (CamelIMAPXStore *istore,
return TRUE;
}
-static GSList *
+static GList *
get_namespaces (CamelIMAPXStore *istore)
{
- GSList *namespaces = NULL;
+ GList *namespaces = NULL;
CamelIMAPXNamespaceList *nsl = NULL;
/* Add code to return the namespaces from preference else all of them */
nsl = istore->summary->namespaces;
if (nsl->personal)
- namespaces = g_slist_append (namespaces, nsl->personal);
+ namespaces = g_list_append (namespaces, nsl->personal);
if (nsl->other)
- namespaces = g_slist_append (namespaces, nsl->other);
+ namespaces = g_list_append (namespaces, nsl->other);
if (nsl->shared)
- namespaces = g_slist_append (namespaces, nsl->shared);
+ namespaces = g_list_append (namespaces, nsl->shared);
return namespaces;
}
@@ -879,7 +879,7 @@ fetch_folders_for_namespaces (CamelIMAPXStore *istore,
{
CamelIMAPXServer *server;
GHashTable *folders = NULL;
- GSList *namespaces = NULL, *l;
+ GList *namespaces = NULL, *l;
server = camel_imapx_store_get_server (istore, NULL, cancellable, error);
if (!server)
@@ -888,7 +888,7 @@ fetch_folders_for_namespaces (CamelIMAPXStore *istore,
folders = g_hash_table_new (folder_hash, folder_eq);
namespaces = get_namespaces (istore);
- for (l = namespaces; l != NULL; l = g_slist_next (l))
+ for (l = namespaces; l != NULL; l = g_list_next (l))
{
CamelIMAPXStoreNamespace *ns = l->data;
@@ -937,7 +937,7 @@ fetch_folders_for_namespaces (CamelIMAPXStore *istore,
ns = ns->next;
}
}
- g_slist_free (namespaces);
+ g_list_free (namespaces);
out:
g_object_unref (server);
return folders;
@@ -1488,7 +1488,7 @@ imapx_store_noop_sync (CamelStore *store,
GError **error)
{
CamelIMAPXStore *istore = (CamelIMAPXStore *) store;
- GSList *servers = NULL, *l;
+ GList *servers = NULL, *l;
gboolean success = FALSE;
if (!camel_offline_store_get_online (CAMEL_OFFLINE_STORE (store)))
@@ -1496,7 +1496,7 @@ imapx_store_noop_sync (CamelStore *store,
servers = camel_imapx_conn_manager_get_connections (istore->con_man);
- for (l = servers; l != NULL; l = g_slist_next (l)) {
+ for (l = servers; l != NULL; l = g_list_next (l)) {
CamelIMAPXServer *server = CAMEL_IMAPX_SERVER (l->data);
/* we just return last noops value, technically not correct though */
@@ -1504,7 +1504,7 @@ imapx_store_noop_sync (CamelStore *store,
g_object_unref (server);
}
- g_slist_free (servers);
+ g_list_free (servers);
return success;
}
diff --git a/camel/providers/local/camel-mbox-summary.c b/camel/providers/local/camel-mbox-summary.c
index ae6f08e..4be93e7 100644
--- a/camel/providers/local/camel-mbox-summary.c
+++ b/camel/providers/local/camel-mbox-summary.c
@@ -476,7 +476,7 @@ summary_update (CamelLocalSummary *cls,
gint ok = 0;
struct stat st;
goffset size = 0;
- GSList *del = NULL;
+ GList *del = NULL;
d(printf("Calling summary update, from pos %d\n", (gint)offset));
@@ -585,7 +585,7 @@ summary_update (CamelLocalSummary *cls,
d(printf("uid '%s' vanished, removing", uid));
if (changeinfo)
camel_folder_change_info_remove_uid (changeinfo, uid);
- del = g_slist_prepend (del, (gpointer) camel_pstring_strdup (uid));
+ del = g_list_prepend (del, (gpointer) camel_pstring_strdup (uid));
camel_folder_summary_remove_index_fast (s, i);
count--;
i--;
@@ -599,8 +599,8 @@ summary_update (CamelLocalSummary *cls,
full_name = camel_folder_get_full_name (s->folder);
parent_store = camel_folder_get_parent_store (s->folder);
camel_db_delete_uids (parent_store->cdb_w, full_name, del, NULL);
- g_slist_foreach (del, (GFunc) camel_pstring_free, NULL);
- g_slist_free (del);
+ g_list_foreach (del, (GFunc) camel_pstring_free, NULL);
+ g_list_free (del);
mbs->changes = NULL;
@@ -1134,7 +1134,7 @@ camel_mbox_summary_sync_mbox (CamelMboxSummary *cls,
const gchar *fromline;
gint lastdel = FALSE;
gboolean touched = FALSE;
- GSList *del = NULL;
+ GList *del = NULL;
#ifdef STATUS_PINE
gchar statnew[8], xstatnew[8];
#endif
@@ -1215,7 +1215,7 @@ camel_mbox_summary_sync_mbox (CamelMboxSummary *cls,
s->deleted_count--;
camel_folder_change_info_remove_uid (changeinfo, uid);
camel_folder_summary_remove_index_fast (s, i);
- del = g_slist_prepend (del, (gpointer) camel_pstring_strdup (uid));
+ del = g_list_prepend (del, (gpointer) camel_pstring_strdup (uid));
camel_message_info_free ((CamelMessageInfo *) info);
count--;
i--;
@@ -1306,8 +1306,8 @@ camel_mbox_summary_sync_mbox (CamelMboxSummary *cls,
full_name = camel_folder_get_full_name (s->folder);
parent_store = camel_folder_get_parent_store (s->folder);
camel_db_delete_uids (parent_store->cdb_w, full_name, del, NULL);
- g_slist_foreach (del, (GFunc) camel_pstring_free, NULL);
- g_slist_free (del);
+ g_list_foreach (del, (GFunc) camel_pstring_free, NULL);
+ g_list_free (del);
#if 0
/* if last was deleted, append the \n we removed */
diff --git a/camel/providers/nntp/camel-nntp-summary.c b/camel/providers/nntp/camel-nntp-summary.c
index 0440d4b..105d47e 100644
--- a/camel/providers/nntp/camel-nntp-summary.c
+++ b/camel/providers/nntp/camel-nntp-summary.c
@@ -451,7 +451,7 @@ camel_nntp_summary_check (CamelNNTPSummary *cns,
gchar *folder = NULL;
CamelNNTPStoreInfo *si;
CamelStore *parent_store;
- GSList *del = NULL;
+ GList *del = NULL;
const gchar *full_name;
s = (CamelFolderSummary *) cns;
@@ -501,7 +501,7 @@ camel_nntp_summary_check (CamelNNTPSummary *cns,
if (msgid)
camel_data_cache_remove (store->cache, "cache", msgid+1, NULL);
camel_folder_change_info_remove_uid (changes, uid);
- del = g_slist_prepend (del, uid);
+ del = g_list_prepend (del, uid);
camel_folder_summary_remove_uid_fast (s, uid);
uid = NULL; /*Lets not free it */
count--;
@@ -513,8 +513,8 @@ camel_nntp_summary_check (CamelNNTPSummary *cns,
}
camel_db_delete_uids (parent_store->cdb_w, full_name, del, NULL);
- g_slist_foreach (del, (GFunc) g_free, NULL);
- g_slist_free (del);
+ g_list_foreach (del, (GFunc) g_free, NULL);
+ g_list_free (del);
if (cns->high < l) {
if (cns->high < f)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]