aboutsummaryrefslogtreecommitdiffstats
path: root/camel/providers/imap/camel-imap-store.c
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@helixcode.com>2000-07-09 08:22:54 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2000-07-09 08:22:54 +0800
commitd1bc4936d699830da46e384d32d9f60f3f8dc3fa (patch)
tree440f8f09bcfbbbee7e2df93d4f5618c86020eb9d /camel/providers/imap/camel-imap-store.c
parentce3c2273262985f373126cc7fe4041c5da94d362 (diff)
downloadgsoc2013-evolution-d1bc4936d699830da46e384d32d9f60f3f8dc3fa.tar.gz
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/imap/camel-imap-store.c')
-rw-r--r--camel/providers/imap/camel-imap-store.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/camel/providers/imap/camel-imap-store.c b/camel/providers/imap/camel-imap-store.c
index 75da7529b3..e7c9d98673 100644
--- a/camel/providers/imap/camel-imap-store.c
+++ b/camel/providers/imap/camel-imap-store.c
@@ -47,6 +47,8 @@
#include "camel-url.h"
#include "string-utils.h"
+#define d(x) x
+
/* Specified in RFC 2060 */
#define IMAP_PORT 143
@@ -336,7 +338,7 @@ imap_connect (CamelService *service, CamelException *ex)
g_free (result);
- fprintf (stderr, "IMAP provider does%shave SEARCH support\n", store->has_search_capability ? " " : "n't ");
+ d(fprintf (stderr, "IMAP provider does%shave SEARCH support\n", store->has_search_capability ? " " : "n't "));
service_class->connect (service, ex);
@@ -384,7 +386,7 @@ imap_folder_exists (CamelFolder *folder)
else
folder_path = g_strdup (folder->full_name);
- printf ("doing an EXAMINE...\n");
+ d(fprintf (stderr, "doing an EXAMINE...\n"));
status = camel_imap_command_extended (CAMEL_IMAP_STORE (folder->parent_store), NULL,
&result, "EXAMINE %s", folder_path);
@@ -570,7 +572,7 @@ camel_imap_command (CamelImapStore *store, CamelFolder *folder, char **ret, char
cmdbuf = g_strdup_vprintf (fmt, ap);
va_end (ap);
- fprintf (stderr, "sending : %s %s\r\n", cmdid, cmdbuf);
+ d(fprintf (stderr, "sending : %s %s\r\n", cmdid, cmdbuf));
fflush (stderr);
if (camel_stream_printf (store->ostream, "%s %s\r\n", cmdid, cmdbuf) == -1) {
@@ -590,8 +592,7 @@ camel_imap_command (CamelImapStore *store, CamelFolder *folder, char **ret, char
return CAMEL_IMAP_FAIL;
}
- fprintf (stderr, "received: %s\n", respbuf ? respbuf : "(null)");
- fflush (stderr);
+ d(fprintf (stderr, "received: %s\n", respbuf ? respbuf : "(null)"));
status = camel_imap_status (cmdid, respbuf);
g_free (cmdid);
@@ -672,7 +673,7 @@ camel_imap_command_extended (CamelImapStore *store, CamelFolder *folder, char **
cmdbuf = g_strdup_vprintf (fmt, app);
va_end (app);
- fprintf (stderr, "sending : %s %s\r\n", cmdid, cmdbuf);
+ d(fprintf (stderr, "sending : %s %s\r\n", cmdid, cmdbuf));
if (camel_stream_printf (store->ostream, "%s %s\r\n", cmdid, cmdbuf) == -1) {
g_free (cmdbuf);
@@ -690,11 +691,11 @@ camel_imap_command_extended (CamelImapStore *store, CamelFolder *folder, char **
respbuf = camel_stream_buffer_read_line (stream);
if (!respbuf || !strncmp(respbuf, cmdid, strlen(cmdid)) ) {
/* IMAP's last response starts with our command id */
- fprintf (stderr, "received: %s\n", respbuf ? respbuf : "(null)");
+ d(fprintf (stderr, "received: %s\n", respbuf ? respbuf : "(null)"));
break;
}
- fprintf (stderr, "received: %s\n", respbuf);
+ d(fprintf (stderr, "received: %s\n", respbuf));
g_ptr_array_add (data, respbuf);
len += strlen (respbuf) + 1;