aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorTor Lillqvist <tml@novell.com>2005-12-18 01:49:12 +0800
committerTor Lillqvist <tml@src.gnome.org>2005-12-18 01:49:12 +0800
commite8b060a9d4c63cee772403c04a4285e309bc5fd7 (patch)
tree7d0f026c955a156fc11fe454d7570afc821ac6af /mail
parent92b09e3c84de02c693bb38fba4bb18ddab52ad61 (diff)
downloadgsoc2013-evolution-e8b060a9d4c63cee772403c04a4285e309bc5fd7.tar
gsoc2013-evolution-e8b060a9d4c63cee772403c04a4285e309bc5fd7.tar.gz
gsoc2013-evolution-e8b060a9d4c63cee772403c04a4285e309bc5fd7.tar.bz2
gsoc2013-evolution-e8b060a9d4c63cee772403c04a4285e309bc5fd7.tar.lz
gsoc2013-evolution-e8b060a9d4c63cee772403c04a4285e309bc5fd7.tar.xz
gsoc2013-evolution-e8b060a9d4c63cee772403c04a4285e309bc5fd7.tar.zst
gsoc2013-evolution-e8b060a9d4c63cee772403c04a4285e309bc5fd7.zip
Use gstdio wrappers. Beautify #include order and syntax.
2005-12-13 Tor Lillqvist <tml@novell.com> * 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
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog4
-rw-r--r--mail/mail-tools.c39
2 files changed, 27 insertions, 16 deletions
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 <guenther@rudersport.de>
* 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 <config.h>
-#endif
#include <sys/types.h>
#include <sys/stat.h>
@@ -33,28 +31,32 @@
#include <errno.h>
#include <string.h>
+#include <glib.h>
+#include <glib/gstdio.h>
+
#include <gconf/gconf.h>
#include <gconf/gconf-client.h>
+
#include <libgnome/gnome-i18n.h>
-#include <camel/camel-vee-folder.h>
#include <camel/camel-file-utils.h>
-#include <camel/camel-movemail.h>
#include <camel/camel-mime-message.h>
+#include <camel/camel-movemail.h>
+#include <camel/camel-vee-folder.h>
-#include "em-vfolder-rule.h"
-#include "em-vfolder-context.h"
-#include <filter/filter-option.h>
-#include <filter/filter-input.h>
+#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;
}