aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKjartan Maraas <kmaraas@src.gnome.org>2001-03-30 04:31:40 +0800
committerKjartan Maraas <kmaraas@src.gnome.org>2001-03-30 04:31:40 +0800
commitfe962a2055234adf407999f0557ae25441ca5c35 (patch)
treece9254cb08e91cf6528cde689139bd5e4e535ba7
parent8a0c0a680252b389ad3b3a58090690925b9f99b1 (diff)
downloadgsoc2013-evolution-fe962a2055234adf407999f0557ae25441ca5c35.tar
gsoc2013-evolution-fe962a2055234adf407999f0557ae25441ca5c35.tar.gz
gsoc2013-evolution-fe962a2055234adf407999f0557ae25441ca5c35.tar.bz2
gsoc2013-evolution-fe962a2055234adf407999f0557ae25441ca5c35.tar.lz
gsoc2013-evolution-fe962a2055234adf407999f0557ae25441ca5c35.tar.xz
gsoc2013-evolution-fe962a2055234adf407999f0557ae25441ca5c35.tar.zst
gsoc2013-evolution-fe962a2055234adf407999f0557ae25441ca5c35.zip
Big header cleanups and nntp compile fix
svn path=/trunk/; revision=9024
-rw-r--r--camel/ChangeLog126
-rw-r--r--camel/broken-date-parser.c3
-rw-r--r--camel/broken-date-parser.h9
-rw-r--r--camel/camel-address.h1
-rw-r--r--camel/camel-data-wrapper.c8
-rw-r--r--camel/camel-data-wrapper.h1
-rw-r--r--camel/camel-exception.c4
-rw-r--r--camel/camel-exception.h1
-rw-r--r--camel/camel-filter-driver.c29
-rw-r--r--camel/camel-filter-driver.h1
-rw-r--r--camel/camel-filter-search.c5
-rw-r--r--camel/camel-folder-search.c4
-rw-r--r--camel/camel-folder-search.h4
-rw-r--r--camel/camel-folder-summary.h2
-rw-r--r--camel/camel-folder-thread.c5
-rw-r--r--camel/camel-folder.c7
-rw-r--r--camel/camel-folder.h1
-rw-r--r--camel/camel-internet-address.c6
-rw-r--r--camel/camel-lock.c2
-rw-r--r--camel/camel-medium.c4
-rw-r--r--camel/camel-mime-filter-bestenc.c4
-rw-r--r--camel/camel-mime-filter-from.c2
-rw-r--r--camel/camel-mime-filter-linewrap.c2
-rw-r--r--camel/camel-mime-filter.c1
-rw-r--r--camel/camel-mime-filter.h2
-rw-r--r--camel/camel-mime-message.c8
-rw-r--r--camel/camel-mime-part-utils.c4
-rw-r--r--camel/camel-mime-part.c11
-rw-r--r--camel/camel-mime-utils.c11
-rw-r--r--camel/camel-mime-utils.h2
-rw-r--r--camel/camel-movemail.c6
-rw-r--r--camel/camel-multipart.c10
-rw-r--r--camel/camel-object.c4
-rw-r--r--camel/camel-object.h2
-rw-r--r--camel/camel-operation.c5
-rw-r--r--camel/camel-provider.c15
-rw-r--r--camel/camel-remote-store.c2
-rw-r--r--camel/camel-sasl-anonymous.c4
-rw-r--r--camel/camel-sasl-cram-md5.c7
-rw-r--r--camel/camel-sasl-digest-md5.c11
-rw-r--r--camel/camel-sasl-digest-md5.h2
-rw-r--r--camel/camel-sasl-kerberos4.c4
-rw-r--r--camel/camel-sasl-kerberos4.h2
-rw-r--r--camel/camel-sasl-plain.c5
-rw-r--r--camel/camel-sasl.c4
-rw-r--r--camel/camel-search-private.c5
-rw-r--r--camel/camel-seekable-stream.c4
-rw-r--r--camel/camel-seekable-stream.h2
-rw-r--r--camel/camel-seekable-substream.c4
-rw-r--r--camel/camel-service.c9
-rw-r--r--camel/camel-service.h2
-rw-r--r--camel/camel-session.c3
-rw-r--r--camel/camel-store.c5
-rw-r--r--camel/camel-stream-buffer.c7
-rw-r--r--camel/camel-stream-buffer.h2
-rw-r--r--camel/camel-stream-filter.c1
-rw-r--r--camel/camel-stream-fs.c7
-rw-r--r--camel/camel-stream-fs.h4
-rw-r--r--camel/camel-stream-mem.c7
-rw-r--r--camel/camel-stream-mem.h2
-rw-r--r--camel/camel-stream-null.c3
-rw-r--r--camel/camel-stream.c4
-rw-r--r--camel/camel-stream.h2
-rw-r--r--camel/camel-tcp-stream-openssl.c7
-rw-r--r--camel/camel-tcp-stream-raw.c8
-rw-r--r--camel/camel-tcp-stream-ssl.c8
-rw-r--r--camel/camel-tcp-stream.c3
-rw-r--r--camel/camel-tcp-stream.h3
-rw-r--r--camel/camel-transport.c4
-rw-r--r--camel/camel-transport.h1
-rw-r--r--camel/camel-uid-cache.c7
-rw-r--r--camel/camel-uid-cache.h2
-rw-r--r--camel/camel-url.c3
-rw-r--r--camel/camel-vee-folder.c6
-rw-r--r--camel/camel-vee-folder.h1
-rw-r--r--camel/camel-vee-store.h1
-rw-r--r--camel/camel.c6
-rw-r--r--camel/gstring-util.c7
-rw-r--r--camel/hash-table-utils.c1
-rw-r--r--camel/hash-table-utils.h2
-rw-r--r--camel/providers/cache/camel-cache-map.c16
-rw-r--r--camel/providers/cache/camel-cache-provider.c5
-rw-r--r--camel/providers/cache/camel-cache-store.c6
-rw-r--r--camel/providers/imap/camel-imap-command.c3
-rw-r--r--camel/providers/imap/camel-imap-command.h2
-rw-r--r--camel/providers/imap/camel-imap-folder.c3
-rw-r--r--camel/providers/imap/camel-imap-message-cache.c2
-rw-r--r--camel/providers/imap/camel-imap-provider.c5
-rw-r--r--camel/providers/imap/camel-imap-search.c3
-rw-r--r--camel/providers/imap/camel-imap-store.c5
-rw-r--r--camel/providers/imap/camel-imap-summary.c6
-rw-r--r--camel/providers/imap/camel-imap-wrapper.c8
-rw-r--r--camel/providers/local/camel-local-folder.c2
-rw-r--r--camel/providers/local/camel-local-provider.c5
-rw-r--r--camel/providers/local/camel-local-store.c3
-rw-r--r--camel/providers/local/camel-local-summary.c11
-rw-r--r--camel/providers/local/camel-maildir-folder.c2
-rw-r--r--camel/providers/local/camel-maildir-store.c2
-rw-r--r--camel/providers/local/camel-maildir-summary.c12
-rw-r--r--camel/providers/local/camel-mbox-folder.c4
-rw-r--r--camel/providers/local/camel-mbox-store.c2
-rw-r--r--camel/providers/local/camel-mbox-summary.c4
-rw-r--r--camel/providers/local/camel-mh-folder.c2
-rw-r--r--camel/providers/local/camel-mh-store.c2
-rw-r--r--camel/providers/local/camel-mh-summary.c10
-rw-r--r--camel/providers/nntp/camel-nntp-auth.c4
-rw-r--r--camel/providers/nntp/camel-nntp-grouplist.c4
-rw-r--r--camel/providers/nntp/camel-nntp-provider.c10
-rw-r--r--camel/providers/nntp/camel-nntp-store.c2
-rw-r--r--camel/providers/pop3/camel-pop3-provider.c5
-rw-r--r--camel/providers/pop3/camel-pop3-store.c4
-rw-r--r--camel/providers/sendmail/camel-sendmail-provider.c5
-rw-r--r--camel/providers/sendmail/camel-sendmail-transport.c2
-rw-r--r--camel/providers/smtp/camel-smtp-provider.c5
-rw-r--r--camel/providers/smtp/camel-smtp-transport.c10
-rw-r--r--camel/string-utils.c3
116 files changed, 510 insertions, 165 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index bfcfe693a1..f250eba4eb 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -1,3 +1,129 @@
+2001-03-29 Kjartan Maraas <kmaraas@gnome.org>
+
+ * broken-date-parser.c: #include <stdio.h>, <stdlib.h> and <string.h>
+ * broken-date-parser.h: Remove all includes but <glib.h>
+ * camel-address.h: Added #include <glib.h>
+ * camel-data-wrapper.c: Move system includes to the top.
+ * camel-data-wrapper.h: #include <glib.h>
+ * camel-exception.c: #ifdef HAVE_CONFIG_H
+ * camel-exception.h: Remove #include <glib.h>
+ * camel-filter-driver.c: #ifdef HAVE_CONFIG_H and move system
+ headers to top. Mark strings in camel_exception_set*() for i18n.
+ * camel-filter-driver.h: #include <glib.h>
+ * camel-filter-search.c: #ifdef HAVE_CONFIG_H
+ * camel-folder-search.c: #include <config.h>
+ * camel-folder-search.h: Header shuffling
+ * camel-folder-summary.h: Same here
+ * camel-folder-thread.c: #ifdef HAVE_CONFIG_H
+ * camel-folder.c: Here too.
+ * camel-folder.h: #include <glib.h>
+ * camel-internet-address.c: Move system headers up
+ * camel-lock.c: #ifdef HAVE_CONFIG_H
+ * camel-medium.c: Same here
+ * camel-mime-filter-bestenc.c: Move system headers up
+ * camel-mime-filter-from.c: Same here
+ * camel-mime-filter-linewrap.c: And here
+ * camel-mime-filter.c: #include <string.h> to fix warnings from new gcc
+ * camel-mime-filter.h: System headers moved up
+ * camel-mime-message.c: Here too. #ifdef HAVE_CONFIG_H added
+ * camel-mime-part-utils.c: #ifdef HAVE_CONFIG_H added
+ * camel-mime-part.c: Here too, and shuffle headers
+ * camel-mime-utils.c: #ifdef HAVE_CONFIG_H. Remove const from two
+ variables to remove warning.
+ * camel-mime-utils.h: Shuffle headers
+ * camel-movemail.c: #ifdef HAVE_CONFIG_H. Mark string in camel_exception_set
+ * camel-multipart.c: #ifdef HAVE_CONFIG_H. Added includes to remove
+ warnings from new gcc
+ * camel-object.c: #ifdef HAVE_CONFIG_H
+ * camel-object.h: Shuffle headers
+ * camel-operation.c: #ifdef HAVE_CONFIG_H
+ * camel-provider.c: #ifdef HAVE_CONFIG_H. Shuffle headers. Mark a string
+ * camel-remote-store.c: #ifdef HAVE_CONFIG_H
+ * camel-sasl-anonymous.c: #ifdef HAVE_CONFIG_H. #include <string.h>
+ * camel-sasl-cram-md5.c: #ifdef HAVE_CONFIG_H. #include <string.h> and
+ <stdio.h> to remove warnings.
+ * camel-sasl-digest-md5.c: #ifdef HAVE_CONFIG_H. shuffle headers
+ * camel-sasl-digest-md5.h: Shuffle headers.
+ * camel-sasl-kerberos4.c: #ifdef HAVE_CONFIG_H. Shuffle headers.
+ * camel-sasl-kerberos4.h: Shuffle headers.
+ * camel-sasl-plain.c: #ifdef HAVE_CONFIG_H. Shuffle
+ * camel-sasl.c: #ifdef HAVE_CONFIG_H. #include <string.h>
+ * camel-search-private.c: #include <config.h>
+ * camel-seekable-stream.c: #ifdef HAVE_CONFIG_H
+ * camel-seekable-stream.h: Shuffle
+ * camel-seekable-substream.c: #ifdef HAVE_CONFIG_H
+ * camel-service.c: Same
+ * camel-service.h: Shuffle
+ * camel-session.c: #ifdef HAVE_CONFIG_H
+ * camel-store.c: Same
+ * camel-stream-buffer.c: Here too
+ * camel-stream-buffer.h: Shuffle
+ * camel-stream-filter.c: #include <string.h>
+ * camel-stream-fs.c: #ifdef HAVE_CONFIG_H
+ * camel-stream-fs.h: Shuffle headers
+ * camel-stream-mem.c: Same as above
+ * camel-stream-mem.h: Here too
+ * camel-stream-null.c: #ifdef HAVE_CONFIG_H
+ * camel-stream.c: Here too
+ * camel-stream.h: Shuffle
+ * camel-tcp-stream-openssl.c: #ifdef HAVE_CONFIG_H
+ * camel-tcp-stream-raw.c: Same here. and move local includes down
+ * camel-tcp-stream-ssl.c: Same as above
+ * camel-tcp-stream.c: #ifdef HAVE_CONFIG_H
+ * camel-tcp-stream.h: move local include down
+ * camel-transport.c: #ifdef HAVE_CONFIG_H
+ * camel-transport.h: #include <glib.h>
+ * camel-uid-cache.c: #ifdef HAVE_CONFIG_H. Shuffle headers
+ * camel-uid-cache.h: Shuffle
+ * camel-url.c: #ifdef HAVE_CONFIG_H
+ * camel-vee-folder.c: #ifdef HAVE_CONFIG_H. Shuffle headers
+ * camel-vee-folder.h: #include <glib.h>
+ * camel-vee-store.h: Same here
+ * camel.c: #ifdef HAVE_CONFIG_H
+ * gstring-util.c: Here too
+ * hash-table-utils.c: Remove #include <glib.h>
+ * hash-table-utils.h: #include it here instead.
+ * string-utils.c: #ifdef HAVE_CONFIG_H
+ * providers/cache/camel-cache-map.c: #ifdef HAVE_CONFIG_H, shuffle
+ headers and mark strings in camel_exception_set*()
+ * providers/cache/camel-cache-provider.c: #ifdef HAVE_CONFIG_H
+ * providers/cache/camel-cache-store.c: Same here, and mark a string.
+ * providers/imap/camel-imap-command.c: #ifdef HAVE_CONFIG_H
+ * providers/imap/camel-imap-command.h: Shuffle header
+ * providers/imap/camel-imap-folder.c: #ifdef HAVE_CONFIG_H
+ * providers/imap/camel-imap-message-cache.c: #ifdef HAVE_CONFIG_H
+ * providers/imap/camel-imap-provider.c: #ifdef HAVE_CONFIG_H and
+ #include <string.h>
+ * providers/imap/camel-imap-search.c: #ifdef HAVE_CONFIG_H
+ * providers/imap/camel-imap-store.c: #ifdef HAVE_CONFIG_H and mark
+ a string.
+ * providers/imap/camel-imap-summary.c: Shuffle headers
+ * providers/imap/camel-imap-wrapper.c: #ifdef HAVE_CONFIG_H. Shuffle
+ * providers/local/camel-local-folder.c: #ifdef HAVE_CONFIG_H
+ * providers/local/camel-local-provider.c: #ifdef HAVE_CONFIG_H
+ * providers/local/camel-local-store.c: Same here
+ * providers/local/camel-local-summary.c: Here too, shuffle, mark a string
+ * providers/local/camel-maildir-folder.c: #ifdef HAVE_CONFIG_H
+ * providers/local/camel-maildir-store.c: Same
+ * providers/local/camel-maildir-summary.c: Here too
+ * providers/local/camel-mbox-summary.c: And here
+ * providers/local/camel-mbox-store.c: And here
+ * providers/local/camel-mbox-summary.c: #include <config.h>
+ * providers/local/camel-mh-folder.c: #ifdef HAVE_CONFIG_H
+ * providers/local/camel-mh-store.c: same
+ * providers/local/camel-mh-summary.c: #ifdef HAVE_CONFIG_H, shuffle headers
+ and mark a string for translation.
+ * providers/nntp/camel-nntp-auth.c: #include <config.h>
+ * providers/nntp/camel-nntp-store.c: Remove superfluous arg to
+ CAMEL_SERVICE_CLASS to make it compile
+ * providers/pop3/camel-pop3-provider.c: #ifdef HAVE_CONFIG_H
+ * providers/pop3/camel-pop3-store.c: Same here
+ * providers/sendmail/camel-sendmail-provider.c: Here too
+ * providers/sendmail/camel-sendmail-transport.c: Here too
+ * providers/smtp/camel-smtp-provider.c: Same
+ * providers/smtp/camel-smtp-transport.c: #ifdef HAVE_CONFIG_H, mark
+ strings for translations.
+
2001-03-29 Dan Winship <danw@ximian.com>
* camel-url.c (camel_url_to_string): change "gboolean show_passwd"
diff --git a/camel/broken-date-parser.c b/camel/broken-date-parser.c
index 544dc04e28..4e168efb64 100644
--- a/camel/broken-date-parser.c
+++ b/camel/broken-date-parser.c
@@ -20,6 +20,9 @@
*
*/
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
#include "broken-date-parser.h"
/* prototypes for functions dealing with broken date formats */
diff --git a/camel/broken-date-parser.h b/camel/broken-date-parser.h
index 17000b3299..57607a7bdf 100644
--- a/camel/broken-date-parser.h
+++ b/camel/broken-date-parser.h
@@ -20,16 +20,7 @@
*
*/
-#include <config.h>
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
#include <glib.h>
-#include <time.h>
-
-#include <ctype.h>
/* prototypes for functions dealing with broken date formats */
diff --git a/camel/camel-address.h b/camel/camel-address.h
index 3af3bd3572..5115ee652b 100644
--- a/camel/camel-address.h
+++ b/camel/camel-address.h
@@ -21,6 +21,7 @@
#ifndef _CAMEL_ADDRESS_H
#define _CAMEL_ADDRESS_H
+#include <glib.h>
#include <camel/camel-object.h>
#define CAMEL_ADDRESS(obj) CAMEL_CHECK_CAST (obj, camel_address_get_type (), CamelAddress)
diff --git a/camel/camel-data-wrapper.c b/camel/camel-data-wrapper.c
index 277c4025bb..e2d7f10281 100644
--- a/camel/camel-data-wrapper.c
+++ b/camel/camel-data-wrapper.c
@@ -22,14 +22,18 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
*/
+
+#ifdef HAVE_CONFIG_H
#include <config.h>
+#endif
+
+#include <errno.h>
+
#include "camel-data-wrapper.h"
#include "camel-mime-utils.h"
#include "camel-stream.h"
#include "camel-exception.h"
-#include <errno.h>
-
#define d(x)
static CamelObjectClass *parent_class = NULL;
diff --git a/camel/camel-data-wrapper.h b/camel/camel-data-wrapper.h
index 67cce7ed50..1b3361f26d 100644
--- a/camel/camel-data-wrapper.h
+++ b/camel/camel-data-wrapper.h
@@ -34,6 +34,7 @@ extern "C" {
#pragma }
#endif /* __cplusplus }*/
+#include <glib.h>
#include <camel/camel-object.h>
#define CAMEL_DATA_WRAPPER_TYPE (camel_data_wrapper_get_type ())
diff --git a/camel/camel-exception.c b/camel/camel-exception.c
index 6f07183f2b..42ef0df339 100644
--- a/camel/camel-exception.c
+++ b/camel/camel-exception.c
@@ -24,7 +24,11 @@
* USA
*/
+#ifdef HAVE_CONFIG_H
#include <config.h>
+#endif
+
+#include <glib.h>
#include "camel-exception.h"
/* i dont know why gthread_mutex stuff even exists, this is easier */
diff --git a/camel/camel-exception.h b/camel/camel-exception.h
index bb8df1a6fc..2bd1bec90c 100644
--- a/camel/camel-exception.h
+++ b/camel/camel-exception.h
@@ -35,7 +35,6 @@ extern "C" {
#pragma }
#endif /* __cplusplus }*/
-#include <glib.h>
#include <camel/camel-types.h>
typedef enum {
diff --git a/camel/camel-filter-driver.c b/camel/camel-filter-driver.c
index 3fa703848b..db1f86314e 100644
--- a/camel/camel-filter-driver.c
+++ b/camel/camel-filter-driver.c
@@ -22,6 +22,15 @@
* USA
*/
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <string.h>
+#include <time.h>
+
+#include <glib.h>
+
#include "camel-filter-driver.h"
#include "camel-filter-search.h"
@@ -29,10 +38,6 @@
#include "camel-service.h"
#include "camel-mime-message.h"
-#include <glib.h>
-
-#include <time.h>
-
#include "e-util/e-sexp.h"
#include "e-util/e-memory.h"
#include "e-util/e-msgport.h" /* for edlist */
@@ -635,7 +640,7 @@ camel_filter_driver_filter_mbox (CamelFilterDriver *driver, const char *mbox, Ca
fd = open (mbox, O_RDONLY);
if (fd == -1) {
- camel_exception_set (ex, CAMEL_EXCEPTION_SYSTEM, "Unable to open spool folder");
+ camel_exception_set (ex, CAMEL_EXCEPTION_SYSTEM, _("Unable to open spool folder"));
goto fail;
}
/* to get the filesize */
@@ -644,7 +649,7 @@ camel_filter_driver_filter_mbox (CamelFilterDriver *driver, const char *mbox, Ca
mp = camel_mime_parser_new ();
camel_mime_parser_scan_from (mp, TRUE);
if (camel_mime_parser_init_with_fd (mp, fd) == -1) {
- camel_exception_set (ex, CAMEL_EXCEPTION_SYSTEM, "Unable to process spool folder");
+ camel_exception_set (ex, CAMEL_EXCEPTION_SYSTEM, _("Unable to process spool folder"));
goto fail;
}
fd = -1;
@@ -658,12 +663,12 @@ camel_filter_driver_filter_mbox (CamelFilterDriver *driver, const char *mbox, Ca
if (st.st_size > 0)
pc = (int)(100.0 * ((double)camel_mime_parser_tell (mp) / (double)st.st_size));
- report_status (driver, CAMEL_FILTER_STATUS_START, pc, "Getting message %d (%d%%)", i, pc);
+ report_status (driver, CAMEL_FILTER_STATUS_START, pc, _("Getting message %d (%d%%)"), i, pc);
msg = camel_mime_message_new ();
if (camel_mime_part_construct_from_parser (CAMEL_MIME_PART (msg), mp) == -1) {
- report_status (driver, CAMEL_FILTER_STATUS_END, 100, "Failed message %d", i);
- camel_exception_set (ex, CAMEL_EXCEPTION_SYSTEM, "Cannot open message");
+ report_status (driver, CAMEL_FILTER_STATUS_END, 100, _("Failed message %d"), i);
+ camel_exception_set (ex, CAMEL_EXCEPTION_SYSTEM, _("Cannot open message"));
camel_object_unref (CAMEL_OBJECT (msg));
goto fail;
}
@@ -671,7 +676,7 @@ camel_filter_driver_filter_mbox (CamelFilterDriver *driver, const char *mbox, Ca
status = camel_filter_driver_filter_message (driver, msg, NULL, NULL, NULL, source_url, ex);
camel_object_unref (CAMEL_OBJECT (msg));
if (camel_exception_is_set (ex) || status == -1) {
- report_status (driver, CAMEL_FILTER_STATUS_END, 100, "Failed message %d", i);
+ report_status (driver, CAMEL_FILTER_STATUS_END, 100, _("Failed message %d"), i);
goto fail;
}
@@ -682,11 +687,11 @@ camel_filter_driver_filter_mbox (CamelFilterDriver *driver, const char *mbox, Ca
}
if (p->defaultfolder) {
- report_status(driver, CAMEL_FILTER_STATUS_PROGRESS, 100, "Syncing folder");
+ report_status(driver, CAMEL_FILTER_STATUS_PROGRESS, 100, _("Syncing folder"));
camel_folder_sync(p->defaultfolder, FALSE, ex);
}
- report_status (driver, CAMEL_FILTER_STATUS_END, 100, "Complete");
+ report_status (driver, CAMEL_FILTER_STATUS_END, 100, _("Complete"));
return 0;
diff --git a/camel/camel-filter-driver.h b/camel/camel-filter-driver.h
index fdebb4228e..94cc54820b 100644
--- a/camel/camel-filter-driver.h
+++ b/camel/camel-filter-driver.h
@@ -23,6 +23,7 @@
#ifndef _CAMEL_FILTER_DRIVER_H
#define _CAMEL_FILTER_DRIVER_H
+#include <glib.h>
#include <camel/camel-object.h>
#include <camel/camel-session.h>
#include <camel/camel-folder.h>
diff --git a/camel/camel-filter-search.c b/camel/camel-filter-search.c
index a680c26146..15e8eb77f2 100644
--- a/camel/camel-filter-search.c
+++ b/camel/camel-filter-search.c
@@ -22,8 +22,13 @@
*
*/
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
/* (from glibc headers:
POSIX says that <sys/types.h> must be included (by the caller) before <regex.h>. */
+
#include <sys/types.h>
#include <regex.h>
#include <string.h>
diff --git a/camel/camel-folder-search.c b/camel/camel-folder-search.c
index 7893ee13e0..7110d7c8ed 100644
--- a/camel/camel-folder-search.c
+++ b/camel/camel-folder-search.c
@@ -23,6 +23,10 @@
It implements enough to do basic searches on folders that can provide
an in-memory summary and a body index. */
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#include <stdio.h>
#include <string.h>
#include <ctype.h>
diff --git a/camel/camel-folder-search.h b/camel/camel-folder-search.h
index 2dd195569e..640f2f9327 100644
--- a/camel/camel-folder-search.h
+++ b/camel/camel-folder-search.h
@@ -22,11 +22,11 @@
#ifndef _CAMEL_FOLDER_SEARCH_H
#define _CAMEL_FOLDER_SEARCH_H
-#include <camel/camel-object.h>
-#include <e-util/e-sexp.h>
#include <gal/util/e-util.h>
+#include <e-util/e-sexp.h>
#include <libibex/ibex.h>
#include <camel/camel-folder.h>
+#include <camel/camel-object.h>
#define CAMEL_FOLDER_SEARCH_TYPE (camel_folder_search_get_type ())
#define CAMEL_FOLDER_SEARCH(obj) CAMEL_CHECK_CAST (obj, camel_folder_search_get_type (), CamelFolderSearch)
diff --git a/camel/camel-folder-summary.h b/camel/camel-folder-summary.h
index 48a9ea4688..99642c9a84 100644
--- a/camel/camel-folder-summary.h
+++ b/camel/camel-folder-summary.h
@@ -22,10 +22,10 @@
#ifndef _CAMEL_FOLDER_SUMMARY_H
#define _CAMEL_FOLDER_SUMMARY_H
-#include <camel/camel-object.h>
#include <stdio.h>
#include <time.h>
#include <camel/camel-mime-parser.h>
+#include <camel/camel-object.h>
#include <libibex/ibex.h>
#define CAMEL_FOLDER_SUMMARY(obj) CAMEL_CHECK_CAST (obj, camel_folder_summary_get_type (), CamelFolderSummary)
diff --git a/camel/camel-folder-thread.c b/camel/camel-folder-thread.c
index 53d381bead..5187901016 100644
--- a/camel/camel-folder-thread.c
+++ b/camel/camel-folder-thread.c
@@ -22,15 +22,18 @@
/* TODO: This could probably be made a camel object, but it isn't really required */
+#ifdef HAVE_CONFIG_H
#include <config.h>
+#endif
+
#include <sys/types.h>
#include <unistd.h>
#include <errno.h>
#include <string.h>
#include <sys/stat.h>
#include <fcntl.h>
-#include <glib.h>
#include <ctype.h>
+#include <glib.h>
#include "camel-folder-thread.h"
#include "e-util/e-memory.h"
diff --git a/camel/camel-folder.c b/camel/camel-folder.c
index 2183edeedc..310bd084aa 100644
--- a/camel/camel-folder.c
+++ b/camel/camel-folder.c
@@ -23,10 +23,13 @@
* USA
*/
+#ifdef HAVE_CONFIG_H
#include <config.h>
+#endif
+
#include <string.h>
-#include "camel-folder.h"
-#include "camel-exception.h"
+#include <camel/camel-folder.h>
+#include <camel/camel-exception.h>
#include "camel-store.h"
#include "camel-mime-message.h"
#include "string-utils.h"
diff --git a/camel/camel-folder.h b/camel/camel-folder.h
index a4b50c2b2e..1baf0206e1 100644
--- a/camel/camel-folder.h
+++ b/camel/camel-folder.h
@@ -32,6 +32,7 @@ extern "C" {
#pragma }
#endif /* __cplusplus }*/
+#include <glib.h>
#include <camel/camel-object.h>
#include <camel/camel-folder-summary.h>
diff --git a/camel/camel-internet-address.c b/camel/camel-internet-address.c
index 33900bb8f0..416451b27d 100644
--- a/camel/camel-internet-address.c
+++ b/camel/camel-internet-address.c
@@ -18,12 +18,12 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-#include "camel-mime-utils.h"
-#include "camel-internet-address.h"
-
#include <stdio.h>
#include <string.h>
+#include "camel-mime-utils.h"
+#include "camel-internet-address.h"
+
#define d(x)
static int internet_decode (CamelAddress *, const char *raw);
diff --git a/camel/camel-lock.c b/camel/camel-lock.c
index f1a43a3543..c14accdd0e 100644
--- a/camel/camel-lock.c
+++ b/camel/camel-lock.c
@@ -20,7 +20,9 @@
* USA
*/
+#ifdef HAVE_CONFIG_H
#include <config.h>
+#endif
#include <stdio.h>
#include <stdlib.h>
diff --git a/camel/camel-medium.c b/camel/camel-medium.c
index 1854cf1891..a54e5ab721 100644
--- a/camel/camel-medium.c
+++ b/camel/camel-medium.c
@@ -22,7 +22,11 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
*/
+
+#ifdef HAVE_CONFIG_H
#include <config.h>
+#endif
+
#include <stdio.h>
#include <ctype.h>
#include "camel-medium.h"
diff --git a/camel/camel-mime-filter-bestenc.c b/camel/camel-mime-filter-bestenc.c
index 18ee7039f0..0c42c5c399 100644
--- a/camel/camel-mime-filter-bestenc.c
+++ b/camel/camel-mime-filter-bestenc.c
@@ -18,10 +18,10 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-#include "camel-mime-filter-bestenc.h"
-
#include <string.h>
+#include "camel-mime-filter-bestenc.h"
+
static void camel_mime_filter_bestenc_class_init (CamelMimeFilterBestencClass *klass);
static void camel_mime_filter_bestenc_init (CamelMimeFilter *obj);
diff --git a/camel/camel-mime-filter-from.c b/camel/camel-mime-filter-from.c
index 017a256471..2678294f03 100644
--- a/camel/camel-mime-filter-from.c
+++ b/camel/camel-mime-filter-from.c
@@ -20,8 +20,8 @@
* USA
*/
-#include "camel-mime-filter-from.h"
#include <string.h>
+#include "camel-mime-filter-from.h"
#define d(x)
diff --git a/camel/camel-mime-filter-linewrap.c b/camel/camel-mime-filter-linewrap.c
index dee6c19abb..ea06566688 100644
--- a/camel/camel-mime-filter-linewrap.c
+++ b/camel/camel-mime-filter-linewrap.c
@@ -19,8 +19,8 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-#include "camel-mime-filter-linewrap.h"
#include <ctype.h>
+#include "camel-mime-filter-linewrap.h"
static void filter (CamelMimeFilter *f, char *in, size_t len, size_t prespace,
char **out, size_t *outlen, size_t *outprespace);
diff --git a/camel/camel-mime-filter.c b/camel/camel-mime-filter.c
index 9a81dfb452..aac01bb79c 100644
--- a/camel/camel-mime-filter.c
+++ b/camel/camel-mime-filter.c
@@ -18,6 +18,7 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
+#include <string.h>
#include "camel-mime-filter.h"
/*#define MALLOC_CHECK */ /* for some malloc checking, requires mcheck enabled */
diff --git a/camel/camel-mime-filter.h b/camel/camel-mime-filter.h
index 1a05b36794..dd30b0449c 100644
--- a/camel/camel-mime-filter.h
+++ b/camel/camel-mime-filter.h
@@ -23,8 +23,8 @@
#ifndef _CAMEL_MIME_FILTER_H
#define _CAMEL_MIME_FILTER_H
-#include <camel/camel-object.h>
#include <sys/types.h>
+#include <camel/camel-object.h>
#define CAMEL_MIME_FILTER_TYPE (camel_mime_filter_get_type ())
#define CAMEL_MIME_FILTER(obj) CAMEL_CHECK_CAST (obj, camel_mime_filter_get_type (), CamelMimeFilter)
diff --git a/camel/camel-mime-message.c b/camel/camel-mime-message.c
index e33f793dab..3728921612 100644
--- a/camel/camel-mime-message.c
+++ b/camel/camel-mime-message.c
@@ -24,7 +24,12 @@
* USA
*/
+#ifdef HAVE_CONFIG_H
#include <config.h>
+#endif
+
+#include <stdio.h>
+#include <string.h>
#include "camel-mime-message.h"
#include "camel-multipart.h"
@@ -37,9 +42,6 @@
#include "camel-mime-filter-charset.h"
#include "camel-mime-filter-bestenc.h"
-#include <stdio.h>
-#include <string.h>
-
#define d(x)
/* these 2 below should be kept in sync */
diff --git a/camel/camel-mime-part-utils.c b/camel/camel-mime-part-utils.c
index 6d9f7e1804..ad9c54f663 100644
--- a/camel/camel-mime-part-utils.c
+++ b/camel/camel-mime-part-utils.c
@@ -21,7 +21,11 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
*/
+
+#ifdef HAVE_CONFIG_H
#include <config.h>
+#endif
+
#include <string.h>
#include "string-utils.h"
#include "camel-mime-part-utils.h"
diff --git a/camel/camel-mime-part.c b/camel/camel-mime-part.c
index 4409ee5f72..c8720b2fea 100644
--- a/camel/camel-mime-part.c
+++ b/camel/camel-mime-part.c
@@ -23,21 +23,24 @@
* USA
*/
+#ifdef HAVE_CONFIG_H
#include <config.h>
+#endif
+
#include <string.h>
-#include "camel-mime-part.h"
#include <stdio.h>
-#include "string-utils.h"
-#include "hash-table-utils.h"
-#include "camel-mime-part-utils.h"
#include <ctype.h>
+#include "hash-table-utils.h"
#include "camel-mime-parser.h"
#include "camel-stream-mem.h"
#include "camel-stream-filter.h"
#include "camel-mime-filter-basic.h"
#include "camel-mime-filter-crlf.h"
#include "camel-mime-filter-charset.h"
+#include "camel-mime-part.h"
+#include "camel-mime-part-utils.h"
#include "camel-exception.h"
+#include "string-utils.h"
#define d(x) /*(printf("%s(%d): ", __FILE__, __LINE__),(x))*/
diff --git a/camel/camel-mime-utils.c b/camel/camel-mime-utils.c
index 2f92d5fb86..71600e44bf 100644
--- a/camel/camel-mime-utils.c
+++ b/camel/camel-mime-utils.c
@@ -21,10 +21,11 @@
/* dont touch this file without my permission - Michael */
+#ifdef HAVE_CONFIG_H
#include <config.h>
+#endif
#include <stdio.h>
-
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/param.h> /* for MAXHOSTNAMELEN */
@@ -40,14 +41,14 @@
#include <unicode.h>
#include <iconv.h>
-#include <glib.h>
#include <time.h>
#include <ctype.h>
#include <errno.h>
-
#include <regex.h>
+#include <glib.h>
+
#include "camel-mime-utils.h"
#include "camel-charset-map.h"
@@ -902,7 +903,7 @@ rfc2047_decode_word(const char *in, int len)
{
const char *inptr = in+2;
const char *inend = in+len-2;
- const char *inbuf;
+ char *inbuf;
char *encname;
int tmplen;
int ret;
@@ -1145,7 +1146,7 @@ rfc2047_encode_word(GString *outstring, const char *in, int len, const char *typ
iconv_t ic = (iconv_t *)-1;
char *buffer, *out, *ascii;
size_t inlen, outlen, enclen, bufflen;
- const char *inptr, *p;
+ char *inptr, *p;
int first = 1;
d(printf("Converting [%d] '%.*s' to %s\n", len, len, in, type));
diff --git a/camel/camel-mime-utils.h b/camel/camel-mime-utils.h
index 691653d43b..7805c27456 100644
--- a/camel/camel-mime-utils.h
+++ b/camel/camel-mime-utils.h
@@ -22,8 +22,8 @@
#ifndef _CAMEL_MIME_UTILS_H
#define _CAMEL_MIME_UTILS_H
-#include <glib.h>
#include <time.h>
+#include <glib.h>
/* maximum size of a line from header_fold() */
#define CAMEL_FOLD_SIZE (77)
diff --git a/camel/camel-movemail.c b/camel/camel-movemail.c
index a0873b25ad..4e1d67563d 100644
--- a/camel/camel-movemail.c
+++ b/camel/camel-movemail.c
@@ -23,7 +23,9 @@
* USA
*/
+#ifdef HAVE_CONFIG_H
#include <config.h>
+#endif
#include <sys/stat.h>
#include <sys/uio.h>
@@ -582,8 +584,8 @@ camel_movemail_solaris (int sfd, int dfd, CamelException *ex)
fail:
camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- "Error copying "
- "mail temp file: %s",
+ _("Error copying "
+ "mail temp file: %s"),
g_strerror (errno));
diff --git a/camel/camel-multipart.c b/camel/camel-multipart.c
index 898bd7ace6..79a0c24208 100644
--- a/camel/camel-multipart.c
+++ b/camel/camel-multipart.c
@@ -28,16 +28,20 @@
* USA
*/
+#ifdef HAVE_CONFIG_H
#include <config.h>
+#endif
+
+#include <string.h> /* strlen() */
+#include <unistd.h> /* for getpid */
+#include <time.h> /* for time */
+
#include "camel-stream-mem.h"
#include "camel-multipart.h"
#include "camel-mime-part.h"
#include "camel-exception.h"
#include "md5-utils.h"
-#include <unistd.h> /* for getpid */
-#include <time.h> /* for time */
-
#define d(x)
static void add_part (CamelMultipart *multipart,
diff --git a/camel/camel-object.c b/camel/camel-object.c
index 75c14b8978..53e7069653 100644
--- a/camel/camel-object.c
+++ b/camel/camel-object.c
@@ -23,7 +23,11 @@
* USA
*/
+#ifdef HAVE_CONFIG_H
#include <config.h>
+#endif
+
+#include <string.h>
#include "camel-object.h"
/* I just mashed the keyboard for these... */
diff --git a/camel/camel-object.h b/camel/camel-object.h
index 1d27807d24..ad76b0add9 100644
--- a/camel/camel-object.h
+++ b/camel/camel-object.h
@@ -32,10 +32,10 @@ extern "C" {
#endif /* __cplusplus } */
#include <stdlib.h> /* size_t */
-#include <camel/camel-types.h>
#include <glib.h>
#include <libgnome/gnome-defs.h>
#include <libgnome/gnome-i18n.h>
+#include <camel/camel-types.h>
#ifdef G_DISABLE_CHECKS
#define CAMEL_CHECK_CAST( obj, ctype, ptype ) ((ptype *) obj)
diff --git a/camel/camel-operation.c b/camel/camel-operation.c
index 9d631fca7b..c17d24e7a4 100644
--- a/camel/camel-operation.c
+++ b/camel/camel-operation.c
@@ -1,5 +1,6 @@
-
-#include "config.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
#include <stdio.h>
#ifdef ENABLE_THREADS
diff --git a/camel/camel-provider.c b/camel/camel-provider.c
index 4549445842..ba1dfd5b48 100644
--- a/camel/camel-provider.c
+++ b/camel/camel-provider.c
@@ -29,10 +29,9 @@
/* FIXME: Shouldn't we add a version number to providers ? */
-#include "config.h"
-#include "camel-provider.h"
-#include "camel-exception.h"
-#include "hash-table-utils.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
#include <dirent.h>
#include <errno.h>
@@ -41,6 +40,10 @@
#include <gmodule.h>
+#include "camel-provider.h"
+#include "camel-exception.h"
+#include "hash-table-utils.h"
+
/**
* camel_provider_init:
*
@@ -125,8 +128,8 @@ camel_provider_load (CamelSession *session, const char *path, CamelException *ex
if (!g_module_supported ()) {
camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- "Could not load %s: Module loading "
- "not supported on this system.",
+ _("Could not load %s: Module loading "
+ "not supported on this system."),
path);
return;
}
diff --git a/camel/camel-remote-store.c b/camel/camel-remote-store.c
index 396f216574..286cd6298f 100644
--- a/camel/camel-remote-store.c
+++ b/camel/camel-remote-store.c
@@ -23,7 +23,9 @@
*
*/
+#ifdef HAVE_CONFIG_H
#include <config.h>
+#endif
#include <sys/time.h>
#include <sys/types.h>
diff --git a/camel/camel-sasl-anonymous.c b/camel/camel-sasl-anonymous.c
index f6d7d4ec24..5626d4647f 100644
--- a/camel/camel-sasl-anonymous.c
+++ b/camel/camel-sasl-anonymous.c
@@ -20,7 +20,11 @@
*
*/
+#ifdef HAVE_CONFIG_H
#include <config.h>
+#endif
+
+#include <string.h>
#include "camel-sasl-anonymous.h"
#include "camel-internet-address.h"
#include <string.h>
diff --git a/camel/camel-sasl-cram-md5.c b/camel/camel-sasl-cram-md5.c
index d456615f2d..3d3bae36e1 100644
--- a/camel/camel-sasl-cram-md5.c
+++ b/camel/camel-sasl-cram-md5.c
@@ -20,13 +20,16 @@
*
*/
+#ifdef HAVE_CONFIG_H
#include <config.h>
+#endif
+
+#include <stdio.h>
+#include <string.h>
#include "camel-sasl-cram-md5.h"
#include "camel-mime-utils.h"
#include "camel-service.h"
#include <e-util/md5-utils.h>
-#include <stdio.h>
-#include <string.h>
CamelServiceAuthType camel_sasl_cram_md5_authtype = {
N_("CRAM-MD5"),
diff --git a/camel/camel-sasl-digest-md5.c b/camel/camel-sasl-digest-md5.c
index 3e89e7d868..2200c4945c 100644
--- a/camel/camel-sasl-digest-md5.c
+++ b/camel/camel-sasl-digest-md5.c
@@ -20,16 +20,19 @@
*
*/
+#ifdef HAVE_CONFIG_H
#include <config.h>
-#include "camel-sasl-digest-md5.h"
-#include "camel-mime-utils.h"
-#include <e-util/md5-utils.h>
+#endif
+
#include <stdio.h>
#include <string.h>
#include <ctype.h>
#include <unistd.h>
-
#include <iconv.h>
+#include "camel-sasl-digest-md5.h"
+#include "camel-mime-utils.h"
+#include <e-util/md5-utils.h>
+
#define d(x)
diff --git a/camel/camel-sasl-digest-md5.h b/camel/camel-sasl-digest-md5.h
index b825f2a012..b4ce831936 100644
--- a/camel/camel-sasl-digest-md5.h
+++ b/camel/camel-sasl-digest-md5.h
@@ -28,9 +28,9 @@ extern "C" {
#pragma }
#endif /* __cplusplus }*/
-#include <camel/camel-sasl.h>
#include <sys/types.h>
#include <netdb.h>
+#include <camel/camel-sasl.h>
#define CAMEL_SASL_DIGEST_MD5_TYPE (camel_sasl_digest_md5_get_type ())
#define CAMEL_SASL_DIGEST_MD5(obj) (CAMEL_CHECK_CAST((obj), CAMEL_SASL_DIGEST_MD5_TYPE, CamelSaslDigestMd5))
diff --git a/camel/camel-sasl-kerberos4.c b/camel/camel-sasl-kerberos4.c
index 0079a88b25..2f92f1d2a4 100644
--- a/camel/camel-sasl-kerberos4.c
+++ b/camel/camel-sasl-kerberos4.c
@@ -20,7 +20,9 @@
*
*/
+#ifdef HAVE_CONFIG_H
#include <config.h>
+#endif
#ifdef HAVE_KRB4
@@ -30,9 +32,9 @@
*/
#undef _
+#include <string.h>
#include "camel-sasl-kerberos4.h"
#include "camel-service.h"
-#include <string.h>
CamelServiceAuthType camel_sasl_kerberos4_authtype = {
N_("Kerberos 4"),
diff --git a/camel/camel-sasl-kerberos4.h b/camel/camel-sasl-kerberos4.h
index 38ac9d7e4a..d4bef9a876 100644
--- a/camel/camel-sasl-kerberos4.h
+++ b/camel/camel-sasl-kerberos4.h
@@ -28,9 +28,9 @@ extern "C" {
#pragma }
#endif /* __cplusplus }*/
-#include <camel/camel-sasl.h>
#include <sys/types.h>
#include <netdb.h>
+#include <camel/camel-sasl.h>
#define CAMEL_SASL_KERBEROS4_TYPE (camel_sasl_kerberos4_get_type ())
#define CAMEL_SASL_KERBEROS4(obj) (CAMEL_CHECK_CAST((obj), CAMEL_SASL_KERBEROS4_TYPE, CamelSaslKerberos4))
diff --git a/camel/camel-sasl-plain.c b/camel/camel-sasl-plain.c
index 427f7bf6be..aea5199b68 100644
--- a/camel/camel-sasl-plain.c
+++ b/camel/camel-sasl-plain.c
@@ -20,10 +20,13 @@
*
*/
+#ifdef HAVE_CONFIG_H
#include <config.h>
+#endif
+
+#include <string.h>
#include "camel-sasl-plain.h"
#include "camel-service.h"
-#include <string.h>
CamelServiceAuthType camel_sasl_plain_authtype = {
N_("Password"),
diff --git a/camel/camel-sasl.c b/camel/camel-sasl.c
index f97e42480b..7ab6b41a76 100644
--- a/camel/camel-sasl.c
+++ b/camel/camel-sasl.c
@@ -20,7 +20,11 @@
*
*/
+#ifdef HAVE_CONFIG_H
#include <config.h>
+#endif
+
+#include <string.h>
#include "camel-sasl.h"
#include "camel-mime-utils.h"
#include "camel-service.h"
diff --git a/camel/camel-search-private.c b/camel/camel-search-private.c
index a6a87c0728..de374c6127 100644
--- a/camel/camel-search-private.c
+++ b/camel/camel-search-private.c
@@ -24,6 +24,11 @@
/* (from glibc headers:
POSIX says that <sys/types.h> must be included (by the caller) before <regex.h>. */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#include <sys/types.h>
#include <regex.h>
#include <string.h>
diff --git a/camel/camel-seekable-stream.c b/camel/camel-seekable-stream.c
index c4ca950baa..45a6a6edf4 100644
--- a/camel/camel-seekable-stream.c
+++ b/camel/camel-seekable-stream.c
@@ -22,8 +22,10 @@
* USA
*/
-
+#ifdef HAVE_CONFIG_H
#include <config.h>
+#endif
+
#include "camel-seekable-stream.h"
static CamelStreamClass *parent_class = NULL;
diff --git a/camel/camel-seekable-stream.h b/camel/camel-seekable-stream.h
index 0fc67d59f8..3c0eb24a5c 100644
--- a/camel/camel-seekable-stream.h
+++ b/camel/camel-seekable-stream.h
@@ -33,9 +33,9 @@ extern "C" {
#pragma }
#endif /* __cplusplus }*/
-#include <camel/camel-stream.h>
#include <sys/types.h>
#include <unistd.h>
+#include <camel/camel-stream.h>
#define CAMEL_SEEKABLE_STREAM_TYPE (camel_seekable_stream_get_type ())
#define CAMEL_SEEKABLE_STREAM(obj) (CAMEL_CHECK_CAST((obj), CAMEL_SEEKABLE_STREAM_TYPE, CamelSeekableStream))
diff --git a/camel/camel-seekable-substream.c b/camel/camel-seekable-substream.c
index 294526ada3..d2990b6b80 100644
--- a/camel/camel-seekable-substream.c
+++ b/camel/camel-seekable-substream.c
@@ -21,7 +21,11 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
*/
+
+#ifdef HAVE_CONFIG_H
#include <config.h>
+#endif
+
#include "camel-seekable-substream.h"
static CamelSeekableStreamClass *parent_class = NULL;
diff --git a/camel/camel-service.c b/camel/camel-service.c
index b0e8c1ec59..20bb00e808 100644
--- a/camel/camel-service.c
+++ b/camel/camel-service.c
@@ -23,14 +23,17 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
*/
+
+#ifdef HAVE_CONFIG_H
#include <config.h>
-#include "camel-service.h"
-#include "camel-session.h"
-#include "camel-exception.h"
+#endif
#include <ctype.h>
#include <stdlib.h>
+#include "camel-service.h"
+#include "camel-session.h"
+#include "camel-exception.h"
#include "camel-private.h"
static CamelObjectClass *parent_class = NULL;
diff --git a/camel/camel-service.h b/camel/camel-service.h
index 77b8a542d8..ed02f989f4 100644
--- a/camel/camel-service.h
+++ b/camel/camel-service.h
@@ -34,10 +34,10 @@ extern "C" {
#pragma }
#endif /* __cplusplus }*/
+#include <netdb.h>
#include <camel/camel-object.h>
#include <camel/camel-url.h>
#include <camel/camel-provider.h>
-#include <netdb.h>
#define CAMEL_SERVICE_TYPE (camel_service_get_type ())
#define CAMEL_SERVICE(obj) (CAMEL_CHECK_CAST((obj), CAMEL_SERVICE_TYPE, CamelService))
diff --git a/camel/camel-session.c b/camel/camel-session.c
index dd8f57b74d..6550dd9ee1 100644
--- a/camel/camel-session.c
+++ b/camel/camel-session.c
@@ -26,7 +26,10 @@
* USA
*/
+#ifdef HAVE_CONFIG_H
#include <config.h>
+#endif
+
#include <errno.h>
#include <stdio.h>
#include <string.h>
diff --git a/camel/camel-store.c b/camel/camel-store.c
index 5cae2b9d9e..e01509e029 100644
--- a/camel/camel-store.c
+++ b/camel/camel-store.c
@@ -24,16 +24,17 @@
* USA
*/
+#ifdef HAVE_CONFIG_H
#include <config.h>
+#endif
+
#include <string.h>
#include "camel-session.h"
-
#include "camel-store.h"
#include "camel-folder.h"
#include "camel-vtrash-folder.h"
#include "camel-exception.h"
-
#include "camel-private.h"
static CamelServiceClass *parent_class = NULL;
diff --git a/camel/camel-stream-buffer.c b/camel/camel-stream-buffer.c
index 7df9fa30ee..f0857d49e4 100644
--- a/camel/camel-stream-buffer.c
+++ b/camel/camel-stream-buffer.c
@@ -22,13 +22,16 @@
* USA
*/
-
+#ifdef HAVE_CONFIG_H
#include <config.h>
-#include "camel-stream-buffer.h"
+#endif
+
+#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <errno.h>
+#include "camel-stream-buffer.h"
static CamelStreamClass *parent_class = NULL;
diff --git a/camel/camel-stream-buffer.h b/camel/camel-stream-buffer.h
index 5c9037595a..81ab1a072e 100644
--- a/camel/camel-stream-buffer.h
+++ b/camel/camel-stream-buffer.h
@@ -34,8 +34,8 @@ extern "C" {
#pragma }
#endif /* __cplusplus }*/
-#include <camel/camel-seekable-stream.h>
#include <stdio.h>
+#include <camel/camel-seekable-stream.h>
#define CAMEL_STREAM_BUFFER_TYPE (camel_stream_buffer_get_type ())
#define CAMEL_STREAM_BUFFER(obj) (CAMEL_CHECK_CAST((obj), CAMEL_STREAM_BUFFER_TYPE, CamelStreamBuffer))
diff --git a/camel/camel-stream-filter.c b/camel/camel-stream-filter.c
index 866c8d2416..3956f24346 100644
--- a/camel/camel-stream-filter.c
+++ b/camel/camel-stream-filter.c
@@ -19,6 +19,7 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
+#include <string.h>
#include "camel-stream-filter.h"
#define d(x)
diff --git a/camel/camel-stream-fs.c b/camel/camel-stream-fs.c
index d19000b37e..7ecafd88ff 100644
--- a/camel/camel-stream-fs.c
+++ b/camel/camel-stream-fs.c
@@ -23,9 +23,10 @@
* USA
*/
+#ifdef HAVE_CONFIG_H
#include <config.h>
-#include "camel-stream-fs.h"
-#include "camel-session.h"
+#endif
+
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
@@ -34,6 +35,8 @@
#include <string.h>
#include "camel-operation.h"
+#include "camel-stream-fs.h"
+#include "camel-session.h"
static CamelSeekableStreamClass *parent_class = NULL;
diff --git a/camel/camel-stream-fs.h b/camel/camel-stream-fs.h
index ea403f584f..4393b0e3eb 100644
--- a/camel/camel-stream-fs.h
+++ b/camel/camel-stream-fs.h
@@ -33,13 +33,13 @@ extern "C" {
#pragma }
#endif /* __cplusplus }*/
-#include <camel/camel-seekable-stream.h>
-
/* for open flags */
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
+#include <camel/camel-seekable-stream.h>
+
#define CAMEL_STREAM_FS_TYPE (camel_stream_fs_get_type ())
#define CAMEL_STREAM_FS(obj) (CAMEL_CHECK_CAST((obj), CAMEL_STREAM_FS_TYPE, CamelStreamFs))
#define CAMEL_STREAM_FS_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_STREAM_FS_TYPE, CamelStreamFsClass))
diff --git a/camel/camel-stream-mem.c b/camel/camel-stream-mem.c
index b9012bcccb..afaeca9b0e 100644
--- a/camel/camel-stream-mem.c
+++ b/camel/camel-stream-mem.c
@@ -23,13 +23,18 @@
* USA
*/
+#ifdef HAVE_CONFIG_H
#include <config.h>
-#include "camel-stream-mem.h"
+#endif
+
+#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <errno.h>
+#include "camel-stream-mem.h"
+
static CamelSeekableStreamClass *parent_class = NULL;
/* Returns the class for a CamelStreamMem */
diff --git a/camel/camel-stream-mem.h b/camel/camel-stream-mem.h
index 422d05426c..5ac13750f4 100644
--- a/camel/camel-stream-mem.h
+++ b/camel/camel-stream-mem.h
@@ -33,8 +33,8 @@ extern "C" {
#pragma }
#endif /* __cplusplus }*/
-#include <camel/camel-seekable-stream.h>
#include <sys/types.h>
+#include <camel/camel-seekable-stream.h>
#define CAMEL_STREAM_MEM_TYPE (camel_stream_mem_get_type ())
#define CAMEL_STREAM_MEM(obj) (CAMEL_CHECK_CAST((obj), CAMEL_STREAM_MEM_TYPE, CamelStreamMem))
diff --git a/camel/camel-stream-null.c b/camel/camel-stream-null.c
index 34cc67ec7c..1738c326cc 100644
--- a/camel/camel-stream-null.c
+++ b/camel/camel-stream-null.c
@@ -23,7 +23,10 @@
* USA
*/
+#ifdef HAVE_CONFIG_H
#include <config.h>
+#endif
+
#include "camel-stream-null.h"
static CamelObjectClass *parent_class = NULL;
diff --git a/camel/camel-stream.c b/camel/camel-stream.c
index 2c8924ee7c..a883905e8d 100644
--- a/camel/camel-stream.c
+++ b/camel/camel-stream.c
@@ -23,7 +23,11 @@
* USA
*/
+#ifdef HAVE_CONFIG_H
#include <config.h>
+#endif
+
+#include <string.h>
#include "camel-stream.h"
static CamelObjectClass *parent_class = NULL;
diff --git a/camel/camel-stream.h b/camel/camel-stream.h
index dec4e638e1..6a2517b0bb 100644
--- a/camel/camel-stream.h
+++ b/camel/camel-stream.h
@@ -33,9 +33,9 @@ extern "C" {
#pragma }
#endif /* __cplusplus }*/
-#include <camel/camel-object.h>
#include <stdarg.h>
#include <unistd.h>
+#include <camel/camel-object.h>
#define CAMEL_STREAM_TYPE (camel_stream_get_type ())
#define CAMEL_STREAM(obj) (CAMEL_CHECK_CAST((obj), CAMEL_STREAM_TYPE, CamelStream))
diff --git a/camel/camel-tcp-stream-openssl.c b/camel/camel-tcp-stream-openssl.c
index 39a42d615b..c59705ae8a 100644
--- a/camel/camel-tcp-stream-openssl.c
+++ b/camel/camel-tcp-stream-openssl.c
@@ -20,12 +20,11 @@
*
*/
-
+#ifdef HAVE_CONFIG_H
#include <config.h>
+#endif
#ifdef HAVE_OPENSSL
-#include "camel-tcp-stream-openssl.h"
-#include "camel-operation.h"
#include <openssl/openssl.h>
#include <sys/time.h>
#include <sys/types.h>
@@ -34,6 +33,8 @@
#include <fcntl.h>
#include <errno.h>
#include <string.h>
+#include "camel-tcp-stream-openssl.h"
+#include "camel-operation.h"
static CamelTcpStreamClass *parent_class = NULL;
diff --git a/camel/camel-tcp-stream-raw.c b/camel/camel-tcp-stream-raw.c
index 59e09080e9..8e74f7c433 100644
--- a/camel/camel-tcp-stream-raw.c
+++ b/camel/camel-tcp-stream-raw.c
@@ -20,10 +20,10 @@
*
*/
-
+#ifdef HAVE_CONFIG_H
#include <config.h>
-#include "camel-tcp-stream-raw.h"
-#include "camel-operation.h"
+#endif
+
#include <sys/time.h>
#include <sys/types.h>
#include <sys/stat.h>
@@ -31,6 +31,8 @@
#include <fcntl.h>
#include <errno.h>
#include <string.h>
+#include "camel-tcp-stream-raw.h"
+#include "camel-operation.h"
static CamelTcpStreamClass *parent_class = NULL;
diff --git a/camel/camel-tcp-stream-ssl.c b/camel/camel-tcp-stream-ssl.c
index e108dc5507..7e521b0a4d 100644
--- a/camel/camel-tcp-stream-ssl.c
+++ b/camel/camel-tcp-stream-ssl.c
@@ -20,12 +20,11 @@
*
*/
-
+#ifdef HAVE_CONFIG_H
#include <config.h>
+#endif
#ifdef HAVE_NSS
-#include "camel-tcp-stream-ssl.h"
-#include "camel-session.h"
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
@@ -40,6 +39,9 @@
#include "nss.h" /* Don't use <> here or it will include the system nss.h instead */
#include <ssl.h>
+#include "camel-tcp-stream-ssl.h"
+#include "camel-session.h"
+
static CamelTcpStreamClass *parent_class = NULL;
/* Returns the class for a CamelTcpStreamSSL */
diff --git a/camel/camel-tcp-stream.c b/camel/camel-tcp-stream.c
index acbd108212..c00ca7e39d 100644
--- a/camel/camel-tcp-stream.c
+++ b/camel/camel-tcp-stream.c
@@ -20,8 +20,9 @@
*
*/
-
+#ifdef HAVE_CONFIG_H
#include <config.h>
+#endif
#include "camel-tcp-stream.h"
diff --git a/camel/camel-tcp-stream.h b/camel/camel-tcp-stream.h
index 68153d3734..8d2d4130ed 100644
--- a/camel/camel-tcp-stream.h
+++ b/camel/camel-tcp-stream.h
@@ -30,7 +30,6 @@ extern "C" {
#pragma }
#endif /* __cplusplus }*/
-#include <camel/camel-stream.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
@@ -38,6 +37,8 @@ extern "C" {
#include <netdb.h>
#include <unistd.h>
+#include <camel/camel-stream.h>
+
#define CAMEL_TCP_STREAM_TYPE (camel_tcp_stream_get_type ())
#define CAMEL_TCP_STREAM(obj) (CAMEL_CHECK_CAST((obj), CAMEL_TCP_STREAM_TYPE, CamelTcpStream))
#define CAMEL_TCP_STREAM_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_TCP_STREAM_TYPE, CamelTcpStreamClass))
diff --git a/camel/camel-transport.c b/camel/camel-transport.c
index ff07728f5f..5219ac4288 100644
--- a/camel/camel-transport.c
+++ b/camel/camel-transport.c
@@ -23,7 +23,11 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
*/
+
+#ifdef HAVE_CONFIG_H
#include <config.h>
+#endif
+
#include "camel-transport.h"
#include "camel-exception.h"
diff --git a/camel/camel-transport.h b/camel/camel-transport.h
index 87d3628264..aeab3ba489 100644
--- a/camel/camel-transport.h
+++ b/camel/camel-transport.h
@@ -34,6 +34,7 @@ extern "C" {
#pragma }
#endif /* __cplusplus }*/
+#include <glib.h>
#include <camel/camel-service.h>
#define CAMEL_TRANSPORT_TYPE (camel_transport_get_type ())
diff --git a/camel/camel-uid-cache.c b/camel/camel-uid-cache.c
index 2b5faddb91..0997e9a6a7 100644
--- a/camel/camel-uid-cache.c
+++ b/camel/camel-uid-cache.c
@@ -23,8 +23,9 @@
* USA
*/
-#include "config.h"
-#include "camel-uid-cache.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
#include <errno.h>
#include <fcntl.h>
@@ -32,6 +33,8 @@
#include <sys/stat.h>
#include <unistd.h>
+#include "camel-uid-cache.h"
+
static void free_uid (gpointer key, gpointer value, gpointer data);
static void maybe_write_uid (gpointer key, gpointer value, gpointer data);
diff --git a/camel/camel-uid-cache.h b/camel/camel-uid-cache.h
index 92226a3afd..57a75ab16a 100644
--- a/camel/camel-uid-cache.h
+++ b/camel/camel-uid-cache.h
@@ -31,8 +31,8 @@ extern "C" {
#pragma }
#endif /* __cplusplus */
-#include <glib.h>
#include <stdio.h>
+#include <glib.h>
typedef struct {
int fd, level;
diff --git a/camel/camel-url.c b/camel/camel-url.c
index 535564f28e..d81871b809 100644
--- a/camel/camel-url.c
+++ b/camel/camel-url.c
@@ -25,12 +25,15 @@
* USA
*/
+#ifdef HAVE_CONFIG_H
#include <config.h>
+#endif
#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+
#include "camel-url.h"
#include "camel-exception.h"
#include "camel-mime-utils.h"
diff --git a/camel/camel-vee-folder.c b/camel/camel-vee-folder.c
index 5364caf9e3..ba1cdb5d31 100644
--- a/camel/camel-vee-folder.c
+++ b/camel/camel-vee-folder.c
@@ -20,7 +20,11 @@
* USA
*/
+#ifdef HAVE_CONFIG_H
#include <config.h>
+#endif
+
+#include <string.h>
#include "camel-exception.h"
#include "camel-vee-folder.h"
@@ -38,8 +42,6 @@
#include "e-util/e-memory.h"
#endif
-#include <string.h>
-
#define d(x)
#define _PRIVATE(o) (((CamelVeeFolder *)(o))->priv)
diff --git a/camel/camel-vee-folder.h b/camel/camel-vee-folder.h
index 6cd75aaf20..650a53ec14 100644
--- a/camel/camel-vee-folder.h
+++ b/camel/camel-vee-folder.h
@@ -22,6 +22,7 @@
#ifndef _CAMEL_VEE_FOLDER_H
#define _CAMEL_VEE_FOLDER_H
+#include <glib.h>
#include <camel/camel-folder.h>
#define CAMEL_VEE_FOLDER(obj) CAMEL_CHECK_CAST (obj, camel_vee_folder_get_type (), CamelVeeFolder)
diff --git a/camel/camel-vee-store.h b/camel/camel-vee-store.h
index ff3d548180..c6249a05dc 100644
--- a/camel/camel-vee-store.h
+++ b/camel/camel-vee-store.h
@@ -22,6 +22,7 @@
#ifndef _CAMEL_VEE_STORE_H
#define _CAMEL_VEE_STORE_H
+#include <glib.h>
#include <camel/camel-store.h>
#define CAMEL_VEE_STORE(obj) CAMEL_CHECK_CAST (obj, camel_vee_store_get_type (), CamelVeeStore)
diff --git a/camel/camel.c b/camel/camel.c
index 8233e98925..6228c7227c 100644
--- a/camel/camel.c
+++ b/camel/camel.c
@@ -23,8 +23,10 @@
* USA
*/
+#ifdef HAVE_CONFIG_H
#include <config.h>
-#include "camel.h"
+#endif
+
#include <unicode.h>
#ifdef HAVE_NSS
#include <nspr.h>
@@ -33,6 +35,8 @@
#include <ssl.h>
#endif /* HAVE_NSS */
+#include "camel.h"
+
gboolean camel_verbose_debug = FALSE;
gint
diff --git a/camel/gstring-util.c b/camel/gstring-util.c
index a0c1345b71..82dde51236 100644
--- a/camel/gstring-util.c
+++ b/camel/gstring-util.c
@@ -24,11 +24,12 @@
* USA
*/
-
-
+#ifdef HAVE_CONFIG_H
#include <config.h>
-#include "gstring-util.h"
+#endif
+
#include <string.h>
+#include "gstring-util.h"
/**
* g_string_equals : test if two string are equal
diff --git a/camel/hash-table-utils.c b/camel/hash-table-utils.c
index b04eaa3ce7..ca4323d638 100644
--- a/camel/hash-table-utils.c
+++ b/camel/hash-table-utils.c
@@ -25,7 +25,6 @@
*/
#include <ctype.h>
-#include "glib.h"
#include "hash-table-utils.h"
diff --git a/camel/hash-table-utils.h b/camel/hash-table-utils.h
index 2904991848..79c4cef72d 100644
--- a/camel/hash-table-utils.h
+++ b/camel/hash-table-utils.h
@@ -34,6 +34,8 @@ extern "C" {
#pragma }
#endif /* __cplusplus }*/
+#include <glib.h>
+
void g_hash_table_generic_free (gpointer key, gpointer value, gpointer user_data);
gint g_strcase_equal (gconstpointer a, gconstpointer b);
diff --git a/camel/providers/cache/camel-cache-map.c b/camel/providers/cache/camel-cache-map.c
index d3cece6f60..a826dfe157 100644
--- a/camel/providers/cache/camel-cache-map.c
+++ b/camel/providers/cache/camel-cache-map.c
@@ -23,8 +23,9 @@
* USA
*/
-#include "camel-cache-map.h"
-#include <camel/camel-exception.h>
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
#include <errno.h>
#include <fcntl.h>
@@ -33,6 +34,9 @@
#include <sys/stat.h>
#include <unistd.h>
+#include "camel-cache-map.h"
+#include <camel/camel-exception.h>
+
/**
* camel_cache_map_new:
*
@@ -192,7 +196,7 @@ camel_cache_map_write (CamelCacheMap *map, const char *file,
if (fd == -1) {
g_free (tmpfile);
camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- "Could not create cache map file: %s",
+ _("Could not create cache map file: %s"),
g_strerror (errno));
return;
}
@@ -202,7 +206,7 @@ camel_cache_map_write (CamelCacheMap *map, const char *file,
if (close (fd) == -1 ||
rename (tmpfile, file) == -1) {
camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- "Could not save cache map file: %s",
+ _("Could not save cache map file: %s"),
g_strerror (errno));
unlink (tmpfile);
}
@@ -231,7 +235,7 @@ camel_cache_map_read (CamelCacheMap *map, const char *file, CamelException *ex)
f = fopen (file, "r");
if (!f) {
camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- "Could not open cache map file: %s",
+ _("Could not open cache map file: %s"),
g_strerror (errno));
return;
}
@@ -242,7 +246,7 @@ camel_cache_map_read (CamelCacheMap *map, const char *file, CamelException *ex)
q = strchr (buf, '\n');
if (!p || !q) {
camel_exception_set (ex, CAMEL_EXCEPTION_SYSTEM,
- "Bad cache file.");
+ _("Bad cache file."));
return;
}
*p++ = *q = '\0';
diff --git a/camel/providers/cache/camel-cache-provider.c b/camel/providers/cache/camel-cache-provider.c
index 217f06816a..ac2f329d7c 100644
--- a/camel/providers/cache/camel-cache-provider.c
+++ b/camel/providers/cache/camel-cache-provider.c
@@ -23,7 +23,10 @@
* USA
*/
-#include "config.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#include "camel-cache-store.h"
#include "camel-provider.h"
#include "camel-session.h"
diff --git a/camel/providers/cache/camel-cache-store.c b/camel/providers/cache/camel-cache-store.c
index 544cca69a1..ae076e47d2 100644
--- a/camel/providers/cache/camel-cache-store.c
+++ b/camel/providers/cache/camel-cache-store.c
@@ -23,7 +23,9 @@
* USA
*/
-#include "config.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
#include <sys/types.h>
#include <sys/socket.h>
@@ -177,7 +179,7 @@ get_folder (CamelStore *store, const char *folder_name,
if (!lf) {
camel_object_unref (CAMEL_OBJECT (rf));
camel_exception_setv (ex, camel_exception_get_id (ex),
- "Could not create cache folder:\n%s",
+ _("Could not create cache folder:\n%s"),
camel_exception_get_description (ex));
return NULL;
}
diff --git a/camel/providers/imap/camel-imap-command.c b/camel/providers/imap/camel-imap-command.c
index b68216782c..36f88917a8 100644
--- a/camel/providers/imap/camel-imap-command.c
+++ b/camel/providers/imap/camel-imap-command.c
@@ -24,8 +24,9 @@
*
*/
-
+#ifdef HAVE_CONFIG_H
#include <config.h>
+#endif
#include <stdarg.h>
#include <stdio.h>
diff --git a/camel/providers/imap/camel-imap-command.h b/camel/providers/imap/camel-imap-command.h
index 9dd31b88d2..5b841525fa 100644
--- a/camel/providers/imap/camel-imap-command.h
+++ b/camel/providers/imap/camel-imap-command.h
@@ -33,8 +33,8 @@ extern "C" {
#pragma }
#endif /* __cplusplus }*/
-#include "camel-imap-types.h"
#include <glib.h>
+#include "camel-imap-types.h"
struct _CamelImapResponse {
CamelFolder *folder;
diff --git a/camel/providers/imap/camel-imap-folder.c b/camel/providers/imap/camel-imap-folder.c
index 84df6c0321..67739e7e46 100644
--- a/camel/providers/imap/camel-imap-folder.c
+++ b/camel/providers/imap/camel-imap-folder.c
@@ -22,8 +22,9 @@
* USA
*/
-
+#ifdef HAVE_CONFIG_H
#include <config.h>
+#endif
#include <stdlib.h>
#include <sys/types.h>
diff --git a/camel/providers/imap/camel-imap-message-cache.c b/camel/providers/imap/camel-imap-message-cache.c
index a45c039242..474a2f2f80 100644
--- a/camel/providers/imap/camel-imap-message-cache.c
+++ b/camel/providers/imap/camel-imap-message-cache.c
@@ -23,7 +23,9 @@
* USA
*/
+#ifdef HAVE_CONFIG_H
#include <config.h>
+#endif
#include <ctype.h>
#include <dirent.h>
diff --git a/camel/providers/imap/camel-imap-provider.c b/camel/providers/imap/camel-imap-provider.c
index ce4f30487e..19e72dba5a 100644
--- a/camel/providers/imap/camel-imap-provider.c
+++ b/camel/providers/imap/camel-imap-provider.c
@@ -22,8 +22,11 @@
*
*/
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
-#include "config.h"
+#include <string.h>
#include "camel-imap-store.h"
#include "camel-provider.h"
#include "camel-session.h"
diff --git a/camel/providers/imap/camel-imap-search.c b/camel/providers/imap/camel-imap-search.c
index 06cf4a8d30..4b913b10c2 100644
--- a/camel/providers/imap/camel-imap-search.c
+++ b/camel/providers/imap/camel-imap-search.c
@@ -23,8 +23,9 @@
*
*/
-
+#ifdef HAVE_CONFIG_H
#include <config.h>
+#endif
#include <string.h>
diff --git a/camel/providers/imap/camel-imap-store.c b/camel/providers/imap/camel-imap-store.c
index daa9871539..40b603acfc 100644
--- a/camel/providers/imap/camel-imap-store.c
+++ b/camel/providers/imap/camel-imap-store.c
@@ -22,8 +22,9 @@
*
*/
-
+#ifdef HAVE_CONFIG_H
#include <config.h>
+#endif
#include <stdio.h>
#include <stdlib.h>
@@ -854,7 +855,7 @@ get_folder (CamelStore *store, const char *folder_name, guint32 flags,
if (!selectable) {
camel_exception_setv (ex, CAMEL_EXCEPTION_STORE_NO_FOLDER,
- "%s is not a selectable folder",
+ _("%s is not a selectable folder"),
folder_name);
g_free (short_name);
return NULL;
diff --git a/camel/providers/imap/camel-imap-summary.c b/camel/providers/imap/camel-imap-summary.c
index 34597cfe31..ca7a2ab737 100644
--- a/camel/providers/imap/camel-imap-summary.c
+++ b/camel/providers/imap/camel-imap-summary.c
@@ -22,9 +22,6 @@
* USA
*/
-#include "camel-imap-summary.h"
-#include <camel/camel-mime-message.h>
-
#include <sys/stat.h>
#include <sys/uio.h>
#include <unistd.h>
@@ -32,6 +29,9 @@
#include <string.h>
#include <stdlib.h>
+#include "camel-imap-summary.h"
+#include <camel/camel-mime-message.h>
+
#define CAMEL_IMAP_SUMMARY_VERSION (0x300)
static int summary_header_load (CamelFolderSummary *, FILE *);
diff --git a/camel/providers/imap/camel-imap-wrapper.c b/camel/providers/imap/camel-imap-wrapper.c
index a0e8b963fc..20ad0c730a 100644
--- a/camel/providers/imap/camel-imap-wrapper.c
+++ b/camel/providers/imap/camel-imap-wrapper.c
@@ -22,7 +22,12 @@
* USA
*/
+#ifdef HAVE_CONFIG_H
#include <config.h>
+#endif
+
+#include <errno.h>
+#include <string.h>
#include "camel-imap-folder.h"
#include "camel-imap-wrapper.h"
@@ -34,9 +39,6 @@
#include "camel-mime-filter-charset.h"
#include "camel-mime-part.h"
-#include <errno.h>
-#include <string.h>
-
static CamelDataWrapperClass *parent_class = NULL;
/* Returns the class for a CamelDataWrapper */
diff --git a/camel/providers/local/camel-local-folder.c b/camel/providers/local/camel-local-folder.c
index ea2894aa2e..205606fc90 100644
--- a/camel/providers/local/camel-local-folder.c
+++ b/camel/providers/local/camel-local-folder.c
@@ -20,7 +20,9 @@
* USA
*/
+#ifdef HAVE_CONFIG_H
#include <config.h>
+#endif
#include <stdlib.h>
#include <sys/types.h>
diff --git a/camel/providers/local/camel-local-provider.c b/camel/providers/local/camel-local-provider.c
index 59c2982ace..a63ff84eb0 100644
--- a/camel/providers/local/camel-local-provider.c
+++ b/camel/providers/local/camel-local-provider.c
@@ -20,9 +20,12 @@
* USA
*/
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#include <stdio.h>
-#include "config.h"
#include "camel-provider.h"
#include "camel-session.h"
#include "camel-url.h"
diff --git a/camel/providers/local/camel-local-store.c b/camel/providers/local/camel-local-store.c
index 34da035301..d0ce48ce98 100644
--- a/camel/providers/local/camel-local-store.c
+++ b/camel/providers/local/camel-local-store.c
@@ -20,8 +20,9 @@
* USA
*/
-
+#ifdef HAVE_CONFIG_H
#include <config.h>
+#endif
#include <sys/stat.h>
#include <errno.h>
diff --git a/camel/providers/local/camel-local-summary.c b/camel/providers/local/camel-local-summary.c
index 869b7c712a..8f785afe15 100644
--- a/camel/providers/local/camel-local-summary.c
+++ b/camel/providers/local/camel-local-summary.c
@@ -20,11 +20,11 @@
* USA
*/
-#include "camel-local-summary.h"
-#include <camel/camel-mime-message.h>
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
#include <ctype.h>
-
#include <sys/stat.h>
#include <sys/uio.h>
#include <unistd.h>
@@ -32,6 +32,9 @@
#include <string.h>
#include <stdlib.h>
+#include "camel-local-summary.h"
+#include <camel/camel-mime-message.h>
+
#define io(x)
#define d(x) /*(printf("%s(%d): ", __FILE__, __LINE__),(x))*/
@@ -398,7 +401,7 @@ local_summary_add(CamelLocalSummary *cls, CamelMimeMessage *msg, const CamelMess
camel_folder_change_info_add_uid(ci, camel_message_info_uid(mi));
} else {
d(printf("Failed!\n"));
- camel_exception_set(ex, 1, "Unable to add message to summary: unknown reason");
+ camel_exception_set(ex, 1, _("Unable to add message to summary: unknown reason"));
}
return mi;
}
diff --git a/camel/providers/local/camel-maildir-folder.c b/camel/providers/local/camel-maildir-folder.c
index c4d347d083..198e4ebc00 100644
--- a/camel/providers/local/camel-maildir-folder.c
+++ b/camel/providers/local/camel-maildir-folder.c
@@ -20,7 +20,9 @@
* USA
*/
+#ifdef HAVE_CONFIG_H
#include <config.h>
+#endif
#include <stdlib.h>
#include <sys/types.h>
diff --git a/camel/providers/local/camel-maildir-store.c b/camel/providers/local/camel-maildir-store.c
index d419095ea0..8fa4454485 100644
--- a/camel/providers/local/camel-maildir-store.c
+++ b/camel/providers/local/camel-maildir-store.c
@@ -20,7 +20,9 @@
* USA
*/
+#ifdef HAVE_CONFIG_H
#include <config.h>
+#endif
#include <sys/stat.h>
#include <errno.h>
diff --git a/camel/providers/local/camel-maildir-summary.c b/camel/providers/local/camel-maildir-summary.c
index 29310e9115..e2ce0f4e97 100644
--- a/camel/providers/local/camel-maildir-summary.c
+++ b/camel/providers/local/camel-maildir-summary.c
@@ -18,8 +18,9 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-#include "camel-maildir-summary.h"
-#include <camel/camel-mime-message.h>
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
#include <sys/stat.h>
#include <sys/uio.h>
@@ -33,6 +34,9 @@
#include <ctype.h>
+#include "camel-maildir-summary.h"
+#include <camel/camel-mime-message.h>
+
#include "camel-private.h"
#include "e-util/e-memory.h"
@@ -398,7 +402,7 @@ static int maildir_summary_load(CamelLocalSummary *cls, int forceindex, CamelExc
dir = opendir(cur);
if (dir == NULL) {
- camel_exception_setv(ex, 1, "Cannot open maildir directory path: %s: %s", cls->folder_path, strerror(errno));
+ camel_exception_setv(ex, 1, _("Cannot open maildir directory path: %s: %s"), cls->folder_path, strerror(errno));
g_free(cur);
return -1;
}
@@ -519,7 +523,7 @@ maildir_summary_check(CamelLocalSummary *cls, CamelFolderChangeInfo *changes, Ca
no longer exist */
dir = opendir(cur);
if (dir == NULL) {
- camel_exception_setv(ex, 1, "Cannot open maildir directory path: %s: %s", cls->folder_path, strerror(errno));
+ camel_exception_setv(ex, 1, _("Cannot open maildir directory path: %s: %s"), cls->folder_path, strerror(errno));
g_free(cur);
g_free(new);
return -1;
diff --git a/camel/providers/local/camel-mbox-folder.c b/camel/providers/local/camel-mbox-folder.c
index 14dca0049e..9db90fb40c 100644
--- a/camel/providers/local/camel-mbox-folder.c
+++ b/camel/providers/local/camel-mbox-folder.c
@@ -20,7 +20,9 @@
* USA
*/
+#ifdef HAVE_CONFIG_H
#include <config.h>
+#endif
#include <stdlib.h>
#include <sys/types.h>
@@ -147,7 +149,7 @@ static int mbox_lock(CamelLocalFolder *lf, CamelLockType type, CamelException *e
mf->lockfd = open(lf->folder_path, O_RDWR, 0);
if (mf->lockfd == -1) {
- camel_exception_setv(ex, 1, "Cannot create folder lock on %s: %s", lf->folder_path, strerror(errno));
+ camel_exception_setv(ex, 1, _("Cannot create folder lock on %s: %s"), lf->folder_path, strerror(errno));
return -1;
}
diff --git a/camel/providers/local/camel-mbox-store.c b/camel/providers/local/camel-mbox-store.c
index c6ddc7ce0a..712c7fde37 100644
--- a/camel/providers/local/camel-mbox-store.c
+++ b/camel/providers/local/camel-mbox-store.c
@@ -20,7 +20,9 @@
* USA
*/
+#ifdef HAVE_CONFIG_H
#include <config.h>
+#endif
#include <sys/stat.h>
#include <errno.h>
diff --git a/camel/providers/local/camel-mbox-summary.c b/camel/providers/local/camel-mbox-summary.c
index b8219b4c78..a37d1633ff 100644
--- a/camel/providers/local/camel-mbox-summary.c
+++ b/camel/providers/local/camel-mbox-summary.c
@@ -20,6 +20,10 @@
* USA
*/
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#include "camel-mbox-summary.h"
#include "camel/camel-mime-message.h"
#include "camel/camel-operation.h"
diff --git a/camel/providers/local/camel-mh-folder.c b/camel/providers/local/camel-mh-folder.c
index fec620edea..cdf636b533 100644
--- a/camel/providers/local/camel-mh-folder.c
+++ b/camel/providers/local/camel-mh-folder.c
@@ -20,7 +20,9 @@
* USA
*/
+#ifdef HAVE_CONFIG_H
#include <config.h>
+#endif
#include <stdlib.h>
#include <sys/types.h>
diff --git a/camel/providers/local/camel-mh-store.c b/camel/providers/local/camel-mh-store.c
index a488a71c12..3edadb5ca1 100644
--- a/camel/providers/local/camel-mh-store.c
+++ b/camel/providers/local/camel-mh-store.c
@@ -20,7 +20,9 @@
* USA
*/
+#ifdef HAVE_CONFIG_H
#include <config.h>
+#endif
#include <sys/stat.h>
#include <errno.h>
diff --git a/camel/providers/local/camel-mh-summary.c b/camel/providers/local/camel-mh-summary.c
index c933626653..3e588be909 100644
--- a/camel/providers/local/camel-mh-summary.c
+++ b/camel/providers/local/camel-mh-summary.c
@@ -18,8 +18,9 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-#include "camel-mh-summary.h"
-#include <camel/camel-mime-message.h>
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
#include <sys/stat.h>
#include <sys/uio.h>
@@ -33,6 +34,9 @@
#include <ctype.h>
+#include "camel-mh-summary.h"
+#include <camel/camel-mime-message.h>
+
#define d(x) /*(printf("%s(%d): ", __FILE__, __LINE__),(x))*/
#define CAMEL_MH_SUMMARY_VERSION (0x2000)
@@ -211,7 +215,7 @@ mh_summary_check(CamelLocalSummary *cls, CamelFolderChangeInfo *changeinfo, Came
no longer exist */
dir = opendir(cls->folder_path);
if (dir == NULL) {
- camel_exception_setv(ex, 1, "Cannot open MH directory path: %s: %s", cls->folder_path, strerror(errno));
+ camel_exception_setv(ex, 1, _("Cannot open MH directory path: %s: %s"), cls->folder_path, strerror(errno));
return -1;
}
diff --git a/camel/providers/nntp/camel-nntp-auth.c b/camel/providers/nntp/camel-nntp-auth.c
index 1f1e6ab2d8..b211f52593 100644
--- a/camel/providers/nntp/camel-nntp-auth.c
+++ b/camel/providers/nntp/camel-nntp-auth.c
@@ -21,7 +21,11 @@
* USA
*/
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+#include <string.h>
#include <camel-nntp-auth.h>
#include <camel-nntp-store.h>
#include <camel-nntp-resp-codes.h>
diff --git a/camel/providers/nntp/camel-nntp-grouplist.c b/camel/providers/nntp/camel-nntp-grouplist.c
index d7ee85d182..578a6eba66 100644
--- a/camel/providers/nntp/camel-nntp-grouplist.c
+++ b/camel/providers/nntp/camel-nntp-grouplist.c
@@ -98,7 +98,7 @@ camel_nntp_get_grouplist_from_file (CamelNNTPStore *store, CamelException *ex)
}
/* read the time */
- if (!fgets (buf, 300, fp)) {
+ if (!fgets (buf, sizeof (buf), fp)) {
camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_UNAVAILABLE,
_("Unable to load grouplist file for %s: %s"),
CAMEL_SERVICE(store)->url->host,
@@ -113,7 +113,7 @@ camel_nntp_get_grouplist_from_file (CamelNNTPStore *store, CamelException *ex)
sscanf (buf, "%lu", &time);
list->time = time;
- while (fgets (buf, 300, fp)) {
+ while (fgets (buf, sizeof (buf), fp)) {
CamelNNTPGroupListEntry *entry = g_new (CamelNNTPGroupListEntry, 1);
char **split_line = g_strsplit (buf, " ", 4);
diff --git a/camel/providers/nntp/camel-nntp-provider.c b/camel/providers/nntp/camel-nntp-provider.c
index 76ac521ec6..07857c173c 100644
--- a/camel/providers/nntp/camel-nntp-provider.c
+++ b/camel/providers/nntp/camel-nntp-provider.c
@@ -23,7 +23,11 @@
* USA
*/
-#include "config.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <string.h>
#include "camel-nntp-store.h"
#include "camel-provider.h"
#include "camel-session.h"
@@ -47,9 +51,7 @@ static CamelProvider news_provider = {
CAMEL_URL_NEED_HOST | CAMEL_URL_ALLOW_USER |
CAMEL_URL_ALLOW_PASSWORD | CAMEL_URL_ALLOW_AUTH,
- { 0, 0 },
-
- NULL
+ /* ... */
};
void
diff --git a/camel/providers/nntp/camel-nntp-store.c b/camel/providers/nntp/camel-nntp-store.c
index c1e8fb81e8..009058dcd4 100644
--- a/camel/providers/nntp/camel-nntp-store.c
+++ b/camel/providers/nntp/camel-nntp-store.c
@@ -305,7 +305,7 @@ nntp_store_query_auth_types (CamelService *service, gboolean connect, CamelExcep
GList *prev;
g_warning ("nntp::query_auth_types: not implemented. Defaulting.");
- prev = CAMEL_SERVICE_CLASS (remote_store_class)->query_auth_types (service, connect, ex);
+ prev = CAMEL_SERVICE_CLASS (remote_store_class)->query_auth_types (service, ex);
return g_list_prepend (prev, &password_authtype);
}
diff --git a/camel/providers/pop3/camel-pop3-provider.c b/camel/providers/pop3/camel-pop3-provider.c
index 6dae1f6edb..0931f903ed 100644
--- a/camel/providers/pop3/camel-pop3-provider.c
+++ b/camel/providers/pop3/camel-pop3-provider.c
@@ -23,7 +23,10 @@
* USA
*/
-#include "config.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#include "camel-pop3-store.h"
#include "camel-provider.h"
#include "camel-session.h"
diff --git a/camel/providers/pop3/camel-pop3-store.c b/camel/providers/pop3/camel-pop3-store.c
index 558d8a8b38..17b2fdf8ee 100644
--- a/camel/providers/pop3/camel-pop3-store.c
+++ b/camel/providers/pop3/camel-pop3-store.c
@@ -23,7 +23,9 @@
* USA
*/
-#include "config.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
#include <sys/types.h>
#include <sys/socket.h>
diff --git a/camel/providers/sendmail/camel-sendmail-provider.c b/camel/providers/sendmail/camel-sendmail-provider.c
index 5a7cfb82db..2e9168f772 100644
--- a/camel/providers/sendmail/camel-sendmail-provider.c
+++ b/camel/providers/sendmail/camel-sendmail-provider.c
@@ -23,7 +23,10 @@
* USA
*/
-#include "config.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#include "camel-provider.h"
#include "camel-sendmail-transport.h"
#include "camel-session.h"
diff --git a/camel/providers/sendmail/camel-sendmail-transport.c b/camel/providers/sendmail/camel-sendmail-transport.c
index 71595ca218..9cd0c1efa1 100644
--- a/camel/providers/sendmail/camel-sendmail-transport.c
+++ b/camel/providers/sendmail/camel-sendmail-transport.c
@@ -23,7 +23,9 @@
* USA
*/
+#ifdef HAVE_CONFIG_H
#include <config.h>
+#endif
#include <errno.h>
#include <fcntl.h>
diff --git a/camel/providers/smtp/camel-smtp-provider.c b/camel/providers/smtp/camel-smtp-provider.c
index 96cba49594..b84a6a0d83 100644
--- a/camel/providers/smtp/camel-smtp-provider.c
+++ b/camel/providers/smtp/camel-smtp-provider.c
@@ -23,7 +23,10 @@
* USA
*/
-#include "config.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#include "camel-smtp-transport.h"
#include "camel-provider.h"
#include "camel-session.h"
diff --git a/camel/providers/smtp/camel-smtp-transport.c b/camel/providers/smtp/camel-smtp-transport.c
index 8b49aaa2f0..a6572d4bdc 100644
--- a/camel/providers/smtp/camel-smtp-transport.c
+++ b/camel/providers/smtp/camel-smtp-transport.c
@@ -22,7 +22,9 @@
* USA
*/
-#include "config.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
#include <sys/param.h>
#include <sys/types.h>
@@ -331,8 +333,8 @@ smtp_connect (CamelService *service, CamelException *ex)
if (!transport->is_esmtp || !g_hash_table_lookup (transport->authtypes, service->url->authmech)) {
camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_CANT_AUTHENTICATE,
- "SMTP server %s does not support requested "
- "authentication type %s", service->url->host,
+ _("SMTP server %s does not support requested "
+ "authentication type %s"), service->url->host,
service->url->authmech);
camel_service_disconnect (service, TRUE, NULL);
return FALSE;
@@ -341,7 +343,7 @@ smtp_connect (CamelService *service, CamelException *ex)
authtype = camel_sasl_authtype (service->url->authmech);
if (!authtype) {
camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_CANT_AUTHENTICATE,
- "No support for authentication type %s",
+ _("No support for authentication type %s"),
service->url->authmech);
camel_service_disconnect (service, TRUE, NULL);
return FALSE;
diff --git a/camel/string-utils.c b/camel/string-utils.c
index 023aee16af..4a28b199ef 100644
--- a/camel/string-utils.c
+++ b/camel/string-utils.c
@@ -24,7 +24,10 @@
* USA
*/
+#ifdef HAVE_CONFIG_H
#include <config.h>
+#endif
+
#include "string-utils.h"
#include "string.h"