From e8b060a9d4c63cee772403c04a4285e309bc5fd7 Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Sat, 17 Dec 2005 17:49:12 +0000 Subject: Use gstdio wrappers. Beautify #include order and syntax. 2005-12-13 Tor Lillqvist * mail-tools.c: Use gstdio wrappers. Beautify #include order and syntax. (mail_tool_get_local_movemail_path): Not used, put in #if 0. svn path=/trunk/; revision=30839 --- mail/ChangeLog | 4 ++++ mail/mail-tools.c | 39 +++++++++++++++++++++++---------------- 2 files changed, 27 insertions(+), 16 deletions(-) (limited to 'mail') diff --git a/mail/ChangeLog b/mail/ChangeLog index 4159a4a835..d9489a11c7 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -20,6 +20,10 @@ * mail-signature-editor.c: Use gstdio wrappers. Construct UI XML file pathname at run-time. + * mail-tools.c: Use gstdio wrappers. Beautify #include order and + syntax. + (mail_tool_get_local_movemail_path): Not used, put in #if 0. + 2005-12-12 Karsten Bräckelmann * em-folder-view.c: Mail Context Menu re-ordered correctly, diff --git a/mail/mail-tools.c b/mail/mail-tools.c index 245bc173cf..13053cd90d 100644 --- a/mail/mail-tools.c +++ b/mail/mail-tools.c @@ -22,9 +22,7 @@ * USA */ -#ifdef HAVE_CONFIG_H #include -#endif #include #include @@ -33,28 +31,32 @@ #include #include +#include +#include + #include #include + #include -#include #include -#include #include +#include +#include -#include "em-vfolder-rule.h" -#include "em-vfolder-context.h" -#include -#include +#include "filter/filter-option.h" +#include "filter/filter-input.h" +#include "em-utils.h" +#include "em-vfolder-context.h" +#include "em-vfolder-rule.h" #include "mail-component.h" -#include "mail-session.h" #include "mail-config.h" -#include "mail-vfolder.h" -#include "mail-tools.h" -#include "mail-mt.h" #include "mail-folder-cache.h" -#include "em-utils.h" +#include "mail-mt.h" +#include "mail-session.h" +#include "mail-tools.h" +#include "mail-vfolder.h" /* **************************************** */ @@ -98,6 +100,9 @@ mail_tool_get_trash (const gchar *url, int connect, CamelException *ex) return trash; } +#if 0 +/* Not used */ + static char * mail_tool_get_local_movemail_path (const unsigned char *uri, CamelException *ex) { @@ -111,7 +116,7 @@ mail_tool_get_local_movemail_path (const unsigned char *uri, CamelException *ex) *c = '_'; path = g_strdup_printf("%s/mail/spool", mail_component_peek_base_directory(NULL)); - if (stat(path, &st) == -1 && camel_mkdir(path, 0777) == -1) { + if (g_stat(path, &st) == -1 && camel_mkdir(path, 0777) == -1) { camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM, _("Could not create spool directory `%s': %s"), path, g_strerror(errno)); g_free(path); @@ -125,6 +130,8 @@ mail_tool_get_local_movemail_path (const unsigned char *uri, CamelException *ex) return full; } +#endif + char * mail_tool_do_movemail (const char *source_url, CamelException *ex) { @@ -155,8 +162,8 @@ mail_tool_do_movemail (const char *source_url, CamelException *ex) camel_movemail (uri->path, dest_path, ex); camel_url_free(uri); - if (stat (dest_path, &sb) < 0 || sb.st_size == 0) { - unlink (dest_path); /* Clean up the movemail.foo file. */ + if (g_stat (dest_path, &sb) < 0 || sb.st_size == 0) { + g_unlink (dest_path); /* Clean up the movemail.foo file. */ g_free (dest_path); return NULL; } -- cgit v1.2.3