diff options
author | Jeffrey Stedfast <fejj@helixcode.com> | 2000-07-09 08:22:54 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2000-07-09 08:22:54 +0800 |
commit | d1bc4936d699830da46e384d32d9f60f3f8dc3fa (patch) | |
tree | 440f8f09bcfbbbee7e2df93d4f5618c86020eb9d /camel/providers/nntp | |
parent | ce3c2273262985f373126cc7fe4041c5da94d362 (diff) | |
download | gsoc2013-evolution-d1bc4936d699830da46e384d32d9f60f3f8dc3fa.tar gsoc2013-evolution-d1bc4936d699830da46e384d32d9f60f3f8dc3fa.tar.gz gsoc2013-evolution-d1bc4936d699830da46e384d32d9f60f3f8dc3fa.tar.bz2 gsoc2013-evolution-d1bc4936d699830da46e384d32d9f60f3f8dc3fa.tar.lz gsoc2013-evolution-d1bc4936d699830da46e384d32d9f60f3f8dc3fa.tar.xz gsoc2013-evolution-d1bc4936d699830da46e384d32d9f60f3f8dc3fa.tar.zst gsoc2013-evolution-d1bc4936d699830da46e384d32d9f60f3f8dc3fa.zip |
Update to reflect past changes in the Camel API. Use gtk macro casts
2000-07-08 Jeffrey Stedfast <fejj@helixcode.com>
* providers/nntp/camel-nntp-folder.c:
* providers/nntp/camel-nntp-utils.c:
* providers/nntp/camel-nntp-store.c: Update to reflect past changes
in the Camel API. Use gtk macro casts wherever possible and use glib's
memory functions instead of standard c's (since they are not
compatable)
* providers/smtp/camel-smtp-transport.c:
* providers/imap/camel-imap-store.c: Wrap debug print statements
in a macro
* providers/imap/camel-imap-stream.c (stream_read): Make sure
that we get up to and including the last \n of the mime part.
* providers/imap/camel-imap-folder.c (imap_get_message): Make sure
that we get up to and including the last \n of the mime part.
Wrap debug print statements in a macro.
svn path=/trunk/; revision=3984
Diffstat (limited to 'camel/providers/nntp')
-rw-r--r-- | camel/providers/nntp/camel-nntp-folder.c | 26 | ||||
-rw-r--r-- | camel/providers/nntp/camel-nntp-store.c | 4 | ||||
-rw-r--r-- | camel/providers/nntp/camel-nntp-utils.c | 4 |
3 files changed, 17 insertions, 17 deletions
diff --git a/camel/providers/nntp/camel-nntp-folder.c b/camel/providers/nntp/camel-nntp-folder.c index 033259a1cd..ae5e371fb1 100644 --- a/camel/providers/nntp/camel-nntp-folder.c +++ b/camel/providers/nntp/camel-nntp-folder.c @@ -188,7 +188,7 @@ nntp_folder_get_message_uid (CamelFolder *folder, } static CamelMimeMessage * -nntp_folder_get_message_by_uid (CamelFolder *folder, const gchar *uid, CamelException *ex) +nntp_folder_get_message (CamelFolder *folder, const gchar *uid, CamelException *ex) { CamelStream *nntp_istream; CamelStream *message_stream; @@ -223,7 +223,7 @@ nntp_folder_get_message_by_uid (CamelFolder *folder, const gchar *uid, CamelExce then create a stream_mem for it. */ buf_alloc = 2048; buf_len = 0; - buf = malloc(buf_alloc); + buf = g_malloc(buf_alloc); done = FALSE; buf[0] = 0; @@ -243,7 +243,7 @@ nntp_folder_get_message_by_uid (CamelFolder *folder, const gchar *uid, CamelExce else { if (buf_len + line_length > buf_alloc) { buf_alloc *= 2; - buf = realloc (buf, buf_alloc); + buf = g_realloc (buf, buf_alloc); } strcat(buf, line); strcat(buf, "\n"); @@ -257,28 +257,28 @@ nntp_folder_get_message_by_uid (CamelFolder *folder, const gchar *uid, CamelExce message = camel_mime_message_new (); if (camel_data_wrapper_construct_from_stream ((CamelDataWrapper *)message, message_stream) == -1) { - gtk_object_unref ((GtkObject *)message); - gtk_object_unref ((GtkObject *)message_stream); + gtk_object_unref (GTK_OBJECT (message)); + gtk_object_unref (GTK_OBJECT (message_stream)); camel_exception_setv (ex, CAMEL_EXCEPTION_FOLDER_INVALID_UID, /* XXX */ "Could not create message for uid %s.", uid); return NULL; } - gtk_object_unref ((GtkObject *)message_stream); + gtk_object_unref (GTK_OBJECT (message_stream)); /* init other fields? */ - gtk_object_ref((GtkObject *)folder); + gtk_object_ref (GTK_OBJECT (folder)); #if 0 - gtk_signal_connect((GtkObject *)message, "message_changed", message_changed, folder); + gtk_signal_connect (GTK_OBJECT (message), "message_changed", message_changed, folder); #endif return message; } static void -nntp_folder_delete_message_by_uid (CamelFolder *folder, +nntp_folder_delete_message (CamelFolder *folder, const gchar *uid, CamelException *ex) { @@ -367,7 +367,7 @@ nntp_folder_search_by_expression (CamelFolder *folder, const char *expression, C } static const CamelMessageInfo* -nntp_folder_summary_get_by_uid (CamelFolder *folder, const char *uid) +nntp_folder_get_message_info (CamelFolder *folder, const char *uid) { g_assert(0); return NULL; @@ -403,8 +403,8 @@ camel_nntp_folder_class_init (CamelNNTPFolderClass *camel_nntp_folder_class) camel_folder_class->set_message_flags = nntp_folder_set_message_flags; camel_folder_class->get_message_flags = nntp_folder_get_message_flags; camel_folder_class->get_message_uid = nntp_folder_get_message_uid; - camel_folder_class->get_message_by_uid = nntp_folder_get_message_by_uid; - camel_folder_class->delete_message_by_uid = nntp_folder_delete_message_by_uid; + camel_folder_class->get_message = nntp_folder_get_message; + camel_folder_class->delete_message = nntp_folder_delete_message; camel_folder_class->get_uids = nntp_folder_get_uids; camel_folder_class->free_uids = nntp_folder_free_uids; camel_folder_class->get_summary = nntp_folder_get_summary; @@ -412,7 +412,7 @@ camel_nntp_folder_class_init (CamelNNTPFolderClass *camel_nntp_folder_class) camel_folder_class->get_subfolder_names = nntp_folder_get_subfolder_names; camel_folder_class->free_subfolder_names = nntp_folder_free_subfolder_names; camel_folder_class->search_by_expression = nntp_folder_search_by_expression; - camel_folder_class->summary_get_by_uid = nntp_folder_summary_get_by_uid; + camel_folder_class->get_message_info = nntp_folder_get_message_info; gtk_object_class->finalize = nntp_folder_finalize; diff --git a/camel/providers/nntp/camel-nntp-store.c b/camel/providers/nntp/camel-nntp-store.c index 03ab14ccdb..96d11b4915 100644 --- a/camel/providers/nntp/camel-nntp-store.c +++ b/camel/providers/nntp/camel-nntp-store.c @@ -99,7 +99,7 @@ static char * nntp_store_get_name (CamelService *service, gboolean brief) { /* Same info for long and brief... */ - return g_strdup_sprintf ("USENET news via %s", service->url->host); + return g_strdup_printf ("USENET news via %s", service->url->host); } @@ -107,7 +107,7 @@ static void camel_nntp_store_class_init (CamelNNTPStoreClass *camel_nntp_store_class) { CamelStoreClass *camel_store_class = CAMEL_STORE_CLASS (camel_nntp_store_class); - CamelServiceClass *camel_store_class = CAMEL_SERVICE_CLASS (camel_nntp_store_class); + CamelServiceClass *camel_service_class = CAMEL_SERVICE_CLASS (camel_nntp_store_class); service_class = gtk_type_class (camel_service_get_type ()); diff --git a/camel/providers/nntp/camel-nntp-utils.c b/camel/providers/nntp/camel-nntp-utils.c index ae1f676cc3..d4c2cda771 100644 --- a/camel/providers/nntp/camel-nntp-utils.c +++ b/camel/providers/nntp/camel-nntp-utils.c @@ -104,7 +104,7 @@ get_HEAD_headers(CamelNNTPStore *nntp_store, CamelFolder *folder, buf_alloc = 2048; buf_len = 0; - buf = malloc(buf_alloc); + buf = g_malloc(buf_alloc); done = FALSE; buf[0] = 0; @@ -125,7 +125,7 @@ get_HEAD_headers(CamelNNTPStore *nntp_store, CamelFolder *folder, else { if (buf_len + line_length > buf_alloc) { buf_alloc *= 2; - buf = realloc (buf, buf_alloc); + buf = g_realloc (buf, buf_alloc); } strcat(buf, line); strcat(buf, "\n"); |