From fe962a2055234adf407999f0557ae25441ca5c35 Mon Sep 17 00:00:00 2001 From: Kjartan Maraas Date: Thu, 29 Mar 2001 20:31:40 +0000 Subject: Big header cleanups and nntp compile fix svn path=/trunk/; revision=9024 --- camel/ChangeLog | 126 +++++++++++++++++++++ camel/broken-date-parser.c | 3 + camel/broken-date-parser.h | 9 -- camel/camel-address.h | 1 + camel/camel-data-wrapper.c | 8 +- camel/camel-data-wrapper.h | 1 + camel/camel-exception.c | 4 + camel/camel-exception.h | 1 - camel/camel-filter-driver.c | 29 +++-- camel/camel-filter-driver.h | 1 + camel/camel-filter-search.c | 5 + camel/camel-folder-search.c | 4 + camel/camel-folder-search.h | 4 +- camel/camel-folder-summary.h | 2 +- camel/camel-folder-thread.c | 5 +- camel/camel-folder.c | 7 +- camel/camel-folder.h | 1 + camel/camel-internet-address.c | 6 +- camel/camel-lock.c | 2 + camel/camel-medium.c | 4 + camel/camel-mime-filter-bestenc.c | 4 +- camel/camel-mime-filter-from.c | 2 +- camel/camel-mime-filter-linewrap.c | 2 +- camel/camel-mime-filter.c | 1 + camel/camel-mime-filter.h | 2 +- camel/camel-mime-message.c | 8 +- camel/camel-mime-part-utils.c | 4 + camel/camel-mime-part.c | 11 +- camel/camel-mime-utils.c | 11 +- camel/camel-mime-utils.h | 2 +- camel/camel-movemail.c | 6 +- camel/camel-multipart.c | 10 +- camel/camel-object.c | 4 + camel/camel-object.h | 2 +- camel/camel-operation.c | 5 +- camel/camel-provider.c | 15 ++- camel/camel-remote-store.c | 2 + camel/camel-sasl-anonymous.c | 4 + camel/camel-sasl-cram-md5.c | 7 +- camel/camel-sasl-digest-md5.c | 11 +- camel/camel-sasl-digest-md5.h | 2 +- camel/camel-sasl-kerberos4.c | 4 +- camel/camel-sasl-kerberos4.h | 2 +- camel/camel-sasl-plain.c | 5 +- camel/camel-sasl.c | 4 + camel/camel-search-private.c | 5 + camel/camel-seekable-stream.c | 4 +- camel/camel-seekable-stream.h | 2 +- camel/camel-seekable-substream.c | 4 + camel/camel-service.c | 9 +- camel/camel-service.h | 2 +- camel/camel-session.c | 3 + camel/camel-store.c | 5 +- camel/camel-stream-buffer.c | 7 +- camel/camel-stream-buffer.h | 2 +- camel/camel-stream-filter.c | 1 + camel/camel-stream-fs.c | 7 +- camel/camel-stream-fs.h | 4 +- camel/camel-stream-mem.c | 7 +- camel/camel-stream-mem.h | 2 +- camel/camel-stream-null.c | 3 + camel/camel-stream.c | 4 + camel/camel-stream.h | 2 +- camel/camel-tcp-stream-openssl.c | 7 +- camel/camel-tcp-stream-raw.c | 8 +- camel/camel-tcp-stream-ssl.c | 8 +- camel/camel-tcp-stream.c | 3 +- camel/camel-tcp-stream.h | 3 +- camel/camel-transport.c | 4 + camel/camel-transport.h | 1 + camel/camel-uid-cache.c | 7 +- camel/camel-uid-cache.h | 2 +- camel/camel-url.c | 3 + camel/camel-vee-folder.c | 6 +- camel/camel-vee-folder.h | 1 + camel/camel-vee-store.h | 1 + camel/camel.c | 6 +- camel/gstring-util.c | 7 +- camel/hash-table-utils.c | 1 - camel/hash-table-utils.h | 2 + camel/providers/cache/camel-cache-map.c | 16 ++- camel/providers/cache/camel-cache-provider.c | 5 +- camel/providers/cache/camel-cache-store.c | 6 +- camel/providers/imap/camel-imap-command.c | 3 +- camel/providers/imap/camel-imap-command.h | 2 +- camel/providers/imap/camel-imap-folder.c | 3 +- camel/providers/imap/camel-imap-message-cache.c | 2 + camel/providers/imap/camel-imap-provider.c | 5 +- camel/providers/imap/camel-imap-search.c | 3 +- camel/providers/imap/camel-imap-store.c | 5 +- camel/providers/imap/camel-imap-summary.c | 6 +- camel/providers/imap/camel-imap-wrapper.c | 8 +- camel/providers/local/camel-local-folder.c | 2 + camel/providers/local/camel-local-provider.c | 5 +- camel/providers/local/camel-local-store.c | 3 +- camel/providers/local/camel-local-summary.c | 11 +- camel/providers/local/camel-maildir-folder.c | 2 + camel/providers/local/camel-maildir-store.c | 2 + camel/providers/local/camel-maildir-summary.c | 12 +- camel/providers/local/camel-mbox-folder.c | 4 +- camel/providers/local/camel-mbox-store.c | 2 + camel/providers/local/camel-mbox-summary.c | 4 + camel/providers/local/camel-mh-folder.c | 2 + camel/providers/local/camel-mh-store.c | 2 + camel/providers/local/camel-mh-summary.c | 10 +- camel/providers/nntp/camel-nntp-auth.c | 4 + camel/providers/nntp/camel-nntp-grouplist.c | 4 +- camel/providers/nntp/camel-nntp-provider.c | 10 +- camel/providers/nntp/camel-nntp-store.c | 2 +- camel/providers/pop3/camel-pop3-provider.c | 5 +- camel/providers/pop3/camel-pop3-store.c | 4 +- camel/providers/sendmail/camel-sendmail-provider.c | 5 +- .../providers/sendmail/camel-sendmail-transport.c | 2 + camel/providers/smtp/camel-smtp-provider.c | 5 +- camel/providers/smtp/camel-smtp-transport.c | 10 +- camel/string-utils.c | 3 + 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 + + * broken-date-parser.c: #include , and + * broken-date-parser.h: Remove all includes but + * camel-address.h: Added #include + * camel-data-wrapper.c: Move system includes to the top. + * camel-data-wrapper.h: #include + * camel-exception.c: #ifdef HAVE_CONFIG_H + * camel-exception.h: Remove #include + * 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 + * camel-filter-search.c: #ifdef HAVE_CONFIG_H + * camel-folder-search.c: #include + * 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 + * 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 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 + * camel-sasl-cram-md5.c: #ifdef HAVE_CONFIG_H. #include and + 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 + * camel-search-private.c: #include + * 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 + * 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 + * 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 + * camel-vee-store.h: Same here + * camel.c: #ifdef HAVE_CONFIG_H + * gstring-util.c: Here too + * hash-table-utils.c: Remove #include + * 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 + * 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 + * 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 + * 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 * 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 +#include +#include #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 - -#include -#include -#include - #include -#include - -#include /* 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 #include #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 +#endif + +#include + #include "camel-data-wrapper.h" #include "camel-mime-utils.h" #include "camel-stream.h" #include "camel-exception.h" -#include - #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 #include #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 +#endif + +#include #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 #include 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 +#endif + +#include +#include + +#include + #include "camel-filter-driver.h" #include "camel-filter-search.h" @@ -29,10 +38,6 @@ #include "camel-service.h" #include "camel-mime-message.h" -#include - -#include - #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 #include #include #include 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 +#endif + /* (from glibc headers: POSIX says that must be included (by the caller) before . */ + #include #include #include 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 +#endif + #include #include #include 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 -#include #include +#include #include #include +#include #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 #include #include #include +#include #include #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 +#endif + #include #include #include #include #include #include -#include #include +#include #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 +#endif + #include -#include "camel-folder.h" -#include "camel-exception.h" +#include +#include #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 #include #include 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 #include +#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 +#endif #include #include 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 +#endif + #include #include #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 +#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 +#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 +#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 #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 #include +#include #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 +#endif + +#include +#include #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 -#include - #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 +#endif + #include #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 +#endif + #include -#include "camel-mime-part.h" #include -#include "string-utils.h" -#include "hash-table-utils.h" -#include "camel-mime-part-utils.h" #include +#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 +#endif #include - #include #include #include /* for MAXHOSTNAMELEN */ @@ -40,14 +41,14 @@ #include #include -#include #include #include #include - #include +#include + #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 #include +#include /* 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 +#endif #include #include @@ -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 +#endif + +#include /* strlen() */ +#include /* for getpid */ +#include /* 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 /* for getpid */ -#include /* 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 +#endif + +#include #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 /* size_t */ -#include #include #include #include +#include #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 +#endif #include #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 +#endif #include #include @@ -41,6 +40,10 @@ #include +#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 +#endif #include #include 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 +#endif + +#include #include "camel-sasl-anonymous.h" #include "camel-internet-address.h" #include 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 +#endif + +#include +#include #include "camel-sasl-cram-md5.h" #include "camel-mime-utils.h" #include "camel-service.h" #include -#include -#include 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 -#include "camel-sasl-digest-md5.h" -#include "camel-mime-utils.h" -#include +#endif + #include #include #include #include - #include +#include "camel-sasl-digest-md5.h" +#include "camel-mime-utils.h" +#include + #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 #include #include +#include #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 +#endif #ifdef HAVE_KRB4 @@ -30,9 +32,9 @@ */ #undef _ +#include #include "camel-sasl-kerberos4.h" #include "camel-service.h" -#include 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 #include #include +#include #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 +#endif + +#include #include "camel-sasl-plain.h" #include "camel-service.h" -#include 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 +#endif + +#include #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 must be included (by the caller) before . */ + +#ifdef HAVE_CONFIG_H +#include +#endif + #include #include #include 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 +#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 #include #include +#include #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 +#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 -#include "camel-service.h" -#include "camel-session.h" -#include "camel-exception.h" +#endif #include #include +#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 #include #include #include -#include #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 +#endif + #include #include #include 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 +#endif + #include #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 -#include "camel-stream-buffer.h" +#endif + +#include #include #include #include #include +#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 #include +#include #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 #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 -#include "camel-stream-fs.h" -#include "camel-session.h" +#endif + #include #include #include @@ -34,6 +35,8 @@ #include #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 - /* for open flags */ #include #include #include +#include + #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 -#include "camel-stream-mem.h" +#endif + +#include #include #include #include #include +#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 #include +#include #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 +#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 +#endif + +#include #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 #include #include +#include #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 +#endif #ifdef HAVE_OPENSSL -#include "camel-tcp-stream-openssl.h" -#include "camel-operation.h" #include #include #include @@ -34,6 +33,8 @@ #include #include #include +#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 -#include "camel-tcp-stream-raw.h" -#include "camel-operation.h" +#endif + #include #include #include @@ -31,6 +31,8 @@ #include #include #include +#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 +#endif #ifdef HAVE_NSS -#include "camel-tcp-stream-ssl.h" -#include "camel-session.h" #include #include #include @@ -40,6 +39,9 @@ #include "nss.h" /* Don't use <> here or it will include the system nss.h instead */ #include +#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 +#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 #include #include #include @@ -38,6 +37,8 @@ extern "C" { #include #include +#include + #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 +#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 #include #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 +#endif #include #include @@ -32,6 +33,8 @@ #include #include +#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 #include +#include 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 +#endif #include #include #include #include + #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 +#endif + +#include #include "camel-exception.h" #include "camel-vee-folder.h" @@ -38,8 +42,6 @@ #include "e-util/e-memory.h" #endif -#include - #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 #include #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 #include #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 -#include "camel.h" +#endif + #include #ifdef HAVE_NSS #include @@ -33,6 +35,8 @@ #include #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 -#include "gstring-util.h" +#endif + #include +#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 -#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 + 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 +#ifdef HAVE_CONFIG_H +#include +#endif #include #include @@ -33,6 +34,9 @@ #include #include +#include "camel-cache-map.h" +#include + /** * 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 +#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 +#endif #include #include @@ -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 +#endif #include #include 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 +#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 +#endif #include #include 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 +#endif #include #include 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 +#endif -#include "config.h" +#include #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 +#endif #include 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 +#endif #include #include @@ -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 - #include #include #include @@ -32,6 +29,9 @@ #include #include +#include "camel-imap-summary.h" +#include + #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 +#endif + +#include +#include #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 -#include - 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 +#endif #include #include 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 +#endif + #include -#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 +#endif #include #include 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 +#ifdef HAVE_CONFIG_H +#include +#endif #include - #include #include #include @@ -32,6 +32,9 @@ #include #include +#include "camel-local-summary.h" +#include + #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 +#endif #include #include 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 +#endif #include #include 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 +#ifdef HAVE_CONFIG_H +#include +#endif #include #include @@ -33,6 +34,9 @@ #include +#include "camel-maildir-summary.h" +#include + #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 +#endif #include #include @@ -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 +#endif #include #include 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 +#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 +#endif #include #include 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 +#endif #include #include 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 +#ifdef HAVE_CONFIG_H +#include +#endif #include #include @@ -33,6 +34,9 @@ #include +#include "camel-mh-summary.h" +#include + #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 +#endif +#include #include #include #include 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 +#endif + +#include #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 +#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 +#endif #include #include 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 +#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 +#endif #include #include 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 +#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 +#endif #include #include @@ -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 +#endif + #include "string-utils.h" #include "string.h" -- cgit v1.2.3