Big header cleanups and nntp compile fix
authorKjartan Maraas <kmaraas@src.gnome.org>
Thu, 29 Mar 2001 20:31:40 +0000 (20:31 +0000)
committerKjartan Maraas <kmaraas@src.gnome.org>
Thu, 29 Mar 2001 20:31:40 +0000 (20:31 +0000)
116 files changed:
camel/ChangeLog
camel/broken-date-parser.c
camel/broken-date-parser.h
camel/camel-address.h
camel/camel-data-wrapper.c
camel/camel-data-wrapper.h
camel/camel-exception.c
camel/camel-exception.h
camel/camel-filter-driver.c
camel/camel-filter-driver.h
camel/camel-filter-search.c
camel/camel-folder-search.c
camel/camel-folder-search.h
camel/camel-folder-summary.h
camel/camel-folder-thread.c
camel/camel-folder.c
camel/camel-folder.h
camel/camel-internet-address.c
camel/camel-lock.c
camel/camel-medium.c
camel/camel-mime-filter-bestenc.c
camel/camel-mime-filter-from.c
camel/camel-mime-filter-linewrap.c
camel/camel-mime-filter.c
camel/camel-mime-filter.h
camel/camel-mime-message.c
camel/camel-mime-part-utils.c
camel/camel-mime-part.c
camel/camel-mime-utils.c
camel/camel-mime-utils.h
camel/camel-movemail.c
camel/camel-multipart.c
camel/camel-object.c
camel/camel-object.h
camel/camel-operation.c
camel/camel-provider.c
camel/camel-remote-store.c
camel/camel-sasl-anonymous.c
camel/camel-sasl-cram-md5.c
camel/camel-sasl-digest-md5.c
camel/camel-sasl-digest-md5.h
camel/camel-sasl-kerberos4.c
camel/camel-sasl-kerberos4.h
camel/camel-sasl-plain.c
camel/camel-sasl.c
camel/camel-search-private.c
camel/camel-seekable-stream.c
camel/camel-seekable-stream.h
camel/camel-seekable-substream.c
camel/camel-service.c
camel/camel-service.h
camel/camel-session.c
camel/camel-store.c
camel/camel-stream-buffer.c
camel/camel-stream-buffer.h
camel/camel-stream-filter.c
camel/camel-stream-fs.c
camel/camel-stream-fs.h
camel/camel-stream-mem.c
camel/camel-stream-mem.h
camel/camel-stream-null.c
camel/camel-stream.c
camel/camel-stream.h
camel/camel-tcp-stream-openssl.c
camel/camel-tcp-stream-raw.c
camel/camel-tcp-stream-ssl.c
camel/camel-tcp-stream.c
camel/camel-tcp-stream.h
camel/camel-transport.c
camel/camel-transport.h
camel/camel-uid-cache.c
camel/camel-uid-cache.h
camel/camel-url.c
camel/camel-vee-folder.c
camel/camel-vee-folder.h
camel/camel-vee-store.h
camel/camel.c
camel/gstring-util.c
camel/hash-table-utils.c
camel/hash-table-utils.h
camel/providers/cache/camel-cache-map.c
camel/providers/cache/camel-cache-provider.c
camel/providers/cache/camel-cache-store.c
camel/providers/imap/camel-imap-command.c
camel/providers/imap/camel-imap-command.h
camel/providers/imap/camel-imap-folder.c
camel/providers/imap/camel-imap-message-cache.c
camel/providers/imap/camel-imap-provider.c
camel/providers/imap/camel-imap-search.c
camel/providers/imap/camel-imap-store.c
camel/providers/imap/camel-imap-summary.c
camel/providers/imap/camel-imap-wrapper.c
camel/providers/local/camel-local-folder.c
camel/providers/local/camel-local-provider.c
camel/providers/local/camel-local-store.c
camel/providers/local/camel-local-summary.c
camel/providers/local/camel-maildir-folder.c
camel/providers/local/camel-maildir-store.c
camel/providers/local/camel-maildir-summary.c
camel/providers/local/camel-mbox-folder.c
camel/providers/local/camel-mbox-store.c
camel/providers/local/camel-mbox-summary.c
camel/providers/local/camel-mh-folder.c
camel/providers/local/camel-mh-store.c
camel/providers/local/camel-mh-summary.c
camel/providers/nntp/camel-nntp-auth.c
camel/providers/nntp/camel-nntp-grouplist.c
camel/providers/nntp/camel-nntp-provider.c
camel/providers/nntp/camel-nntp-store.c
camel/providers/pop3/camel-pop3-provider.c
camel/providers/pop3/camel-pop3-store.c
camel/providers/sendmail/camel-sendmail-provider.c
camel/providers/sendmail/camel-sendmail-transport.c
camel/providers/smtp/camel-smtp-provider.c
camel/providers/smtp/camel-smtp-transport.c
camel/string-utils.c

index bfcfe69..f250eba 100644 (file)
@@ -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"
index 544dc04..4e168ef 100644 (file)
@@ -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 */
index 17000b3..57607a7 100644 (file)
  *
  */
 
-#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 */
 
index 3af3bd3..5115ee6 100644 (file)
@@ -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)
index 277c402..e2d7f10 100644 (file)
  * 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;
index 67cce7e..1b3361f 100644 (file)
@@ -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 ())
index 6f07183..42ef0df 100644 (file)
  * 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 */
index bb8df1a..2bd1bec 100644 (file)
@@ -35,7 +35,6 @@ extern "C" {
 #pragma }
 #endif /* __cplusplus }*/
 
-#include <glib.h>
 #include <camel/camel-types.h>
 
 typedef enum {
index 3fa7038..db1f863 100644 (file)
  *  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"
 
 #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;
        
index fdebb42..94cc548 100644 (file)
@@ -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>
index a680c26..15e8eb7 100644 (file)
  *
  */
 
+#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>
index 7893ee1..7110d7c 100644 (file)
    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>
index 2dd1955..640f2f9 100644 (file)
 #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)
index 48a9ea4..99642c9 100644 (file)
 #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)
index 53d381b..5187901 100644 (file)
 
 /* 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"
index 2183ede..310bd08 100644 (file)
  * 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"
index a4b50c2..1baf020 100644 (file)
@@ -32,6 +32,7 @@ extern "C" {
 #pragma }
 #endif /* __cplusplus }*/
 
+#include <glib.h>
 #include <camel/camel-object.h>
 #include <camel/camel-folder-summary.h>
 
index 33900bb..416451b 100644 (file)
  *  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);
index f1a43a3..c14accd 100644 (file)
@@ -20,7 +20,9 @@
  * USA
  */
 
+#ifdef HAVE_CONFIG_H
 #include <config.h>
+#endif
 
 #include <stdio.h>
 #include <stdlib.h>
index 1854cf1..a54e5ab 100644 (file)
  * 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"
index 18ee703..0c42c5c 100644 (file)
  *  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);
 
index 017a256..2678294 100644 (file)
@@ -20,8 +20,8 @@
  *  USA
  */
 
-#include "camel-mime-filter-from.h"
 #include <string.h>
+#include "camel-mime-filter-from.h"
 
 #define d(x)
 
index dee6c19..ea06566 100644 (file)
@@ -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);
index 9a81dfb..aac01bb 100644 (file)
@@ -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 */
index 1a05b36..dd30b04 100644 (file)
@@ -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)
index e33f793..3728921 100644 (file)
  * 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 */
index 6d9f7e1..ad9c54f 100644 (file)
  * 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"
index 4409ee5..c8720b2 100644 (file)
  * 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))*/
 
index 2f92d5f..71600e4 100644 (file)
 
 /* 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 */
 #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));
index 691653d..7805c27 100644 (file)
@@ -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)
index a0873b2..4e1d675 100644 (file)
@@ -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));
 
 
index 898bd7a..79a0c24 100644 (file)
  * 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,
index 75c14b8..53e7069 100644 (file)
  * USA
  */
 
+#ifdef HAVE_CONFIG_H
 #include <config.h>
+#endif
+
+#include <string.h>
 #include "camel-object.h"
 
 /* I just mashed the keyboard for these... */
index 1d27807..ad76b0a 100644 (file)
@@ -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)
index 9d631fc..c17d24e 100644 (file)
@@ -1,5 +1,6 @@
-
-#include "config.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
 
 #include <stdio.h>
 #ifdef ENABLE_THREADS
index 4549445..ba1dfd5 100644 (file)
 
 /* 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>
 
 #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;
        }
index 396f216..286cd62 100644 (file)
@@ -23,7 +23,9 @@
  *
  */
 
+#ifdef HAVE_CONFIG_H
 #include <config.h>
+#endif
 
 #include <sys/time.h>
 #include <sys/types.h>
index f6d7d4e..5626d46 100644 (file)
  *
  */
 
+#ifdef HAVE_CONFIG_H
 #include <config.h>
+#endif
+
+#include <string.h>
 #include "camel-sasl-anonymous.h"
 #include "camel-internet-address.h"
 #include <string.h>
index d456615..3d3bae3 100644 (file)
  *
  */
 
+#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"),
index 3e89e7d..2200c49 100644 (file)
  *
  */
 
+#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)
 
index b825f2a..b4ce831 100644 (file)
@@ -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))
index 0079a88..2f92f1d 100644 (file)
@@ -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"),
index 38ac9d7..d4bef9a 100644 (file)
@@ -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))
index 427f7bf..aea5199 100644 (file)
  *
  */
 
+#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"),
index f97e424..7ab6b41 100644 (file)
  *
  */
 
+#ifdef HAVE_CONFIG_H
 #include <config.h>
+#endif
+
+#include <string.h>
 #include "camel-sasl.h"
 #include "camel-mime-utils.h"
 #include "camel-service.h"
index a6a87c0..de374c6 100644 (file)
 
 /* (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>
index c4ca950..45a6a6e 100644 (file)
  * USA
  */
 
-
+#ifdef HAVE_CONFIG_H
 #include <config.h>
+#endif
+
 #include "camel-seekable-stream.h"
 
 static CamelStreamClass *parent_class = NULL;
index 0fc67d5..3c0eb24 100644 (file)
@@ -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))
index 294526a..d2990b6 100644 (file)
  * 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;
index b0e8c1e..20bb00e 100644 (file)
  * 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;
index 77b8a54..ed02f98 100644 (file)
@@ -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))
index dd8f57b..6550dd9 100644 (file)
  * USA
  */
 
+#ifdef HAVE_CONFIG_H
 #include <config.h>
+#endif
+
 #include <errno.h>
 #include <stdio.h>
 #include <string.h>
index 5cae2b9..e01509e 100644 (file)
  * 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;
index 7df9fa3..f0857d4 100644 (file)
  * 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;
 
index 5c90375..81ab1a0 100644 (file)
@@ -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))
index 866c8d2..3956f24 100644 (file)
@@ -19,6 +19,7 @@
  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
+#include <string.h>
 #include "camel-stream-filter.h"
 
 #define d(x)
index d19000b..7ecafd8 100644 (file)
  * 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;
 
index ea403f5..4393b0e 100644 (file)
@@ -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))
index b9012bc..afaeca9 100644 (file)
  * 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 */
index 422d054..5ac1375 100644 (file)
@@ -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))
index 34cc67e..1738c32 100644 (file)
  * USA
  */
 
+#ifdef HAVE_CONFIG_H
 #include <config.h>
+#endif
+
 #include "camel-stream-null.h"
 
 static CamelObjectClass *parent_class = NULL;
index 2c8924e..a883905 100644 (file)
  * USA
  */
 
+#ifdef HAVE_CONFIG_H
 #include <config.h>
+#endif
+
+#include <string.h>
 #include "camel-stream.h"
 
 static CamelObjectClass *parent_class = NULL;
index dec4e63..6a2517b 100644 (file)
@@ -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))
index 39a42d6..c59705a 100644 (file)
  *
  */
 
-
+#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;
 
index 59e0908..8e74f7c 100644 (file)
  *
  */
 
-
+#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;
 
index e108dc5..7e521b0 100644 (file)
  *
  */
 
-
+#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 */
index acbd108..c00ca7e 100644 (file)
@@ -20,8 +20,9 @@
  *
  */
 
-
+#ifdef HAVE_CONFIG_H
 #include <config.h>
+#endif
 
 #include "camel-tcp-stream.h"
 
index 68153d3..8d2d413 100644 (file)
@@ -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))
index ff07728..5219ac4 100644 (file)
  * 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"
 
index 87d3628..aeab3ba 100644 (file)
@@ -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 ())
index 2b5fadd..0997e9a 100644 (file)
@@ -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);
 
index 92226a3..57a75ab 100644 (file)
@@ -31,8 +31,8 @@ extern "C" {
 #pragma }
 #endif /* __cplusplus */
 
-#include <glib.h>
 #include <stdio.h>
+#include <glib.h>
 
 typedef struct {
        int fd, level;
index 535564f..d81871b 100644 (file)
  * 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"
index 5364caf..ba1cdb5 100644 (file)
  *  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)
index 6cd75aa..650a53e 100644 (file)
@@ -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)
index ff3d548..c6249a0 100644 (file)
@@ -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)
index 8233e98..6228c72 100644 (file)
  * 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
index a0c1345..82dde51 100644 (file)
  * 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
index b04eaa3..ca4323d 100644 (file)
@@ -25,7 +25,6 @@
  */
 
 #include <ctype.h>
-#include "glib.h"
 #include "hash-table-utils.h"
 
 
index 2904991..79c4cef 100644 (file)
@@ -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);
index d3cece6..a826dfe 100644 (file)
@@ -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';
index 217f068..ac2f329 100644 (file)
  * 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"
index 544cca6..ae076e4 100644 (file)
@@ -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;
        }
index b682167..36f8891 100644 (file)
@@ -24,8 +24,9 @@
  *
  */
 
-
+#ifdef HAVE_CONFIG_H
 #include <config.h>
+#endif
 
 #include <stdarg.h>
 #include <stdio.h>
index 9dd31b8..5b84152 100644 (file)
@@ -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;
index 84df6c0..67739e7 100644 (file)
@@ -22,8 +22,9 @@
  * USA
  */
 
-
+#ifdef HAVE_CONFIG_H
 #include <config.h> 
+#endif
 
 #include <stdlib.h>
 #include <sys/types.h>
index a45c039..474a2f2 100644 (file)
@@ -23,7 +23,9 @@
  * USA
  */
 
+#ifdef HAVE_CONFIG_H
 #include <config.h>
+#endif
 
 #include <ctype.h>
 #include <dirent.h>
index ce4f304..19e72db 100644 (file)
  *
  */
 
+#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"
index 06cf4a8..4b913b1 100644 (file)
@@ -23,8 +23,9 @@
  *
  */
 
-
+#ifdef HAVE_CONFIG_H
 #include <config.h>
+#endif
 
 #include <string.h>
 
index daa9871..40b603a 100644 (file)
@@ -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;
index 34597cf..ca7a2ab 100644 (file)
@@ -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 *);
index a0e8b96..20ad0c7 100644 (file)
  * 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 */
index ea2894a..205606f 100644 (file)
@@ -20,7 +20,9 @@
  * USA
  */
 
+#ifdef HAVE_CONFIG_H
 #include <config.h>
+#endif
 
 #include <stdlib.h>
 #include <sys/types.h>
index 59c2982..a63ff84 100644 (file)
  * 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"
index 34da035..d0ce48c 100644 (file)
@@ -20,8 +20,9 @@
  * USA
  */
 
-
+#ifdef HAVE_CONFIG_H
 #include <config.h>
+#endif
 
 #include <sys/stat.h>
 #include <errno.h>
index 869b7c7..8f785af 100644 (file)
  *  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;
 }
index c4d347d..198e4eb 100644 (file)
@@ -20,7 +20,9 @@
  * USA
  */
 
+#ifdef HAVE_CONFIG_H
 #include <config.h>
+#endif
 
 #include <stdlib.h>
 #include <sys/types.h>
index d419095..8fa4454 100644 (file)
@@ -20,7 +20,9 @@
  * USA
  */
 
+#ifdef HAVE_CONFIG_H
 #include <config.h>
+#endif
 
 #include <sys/stat.h>
 #include <errno.h>
index 29310e9..e2ce0f4 100644 (file)
@@ -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;
index 14dca00..9db90fb 100644 (file)
@@ -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;
        }
 
index c6ddc7c..712c7fd 100644 (file)
@@ -20,7 +20,9 @@
  * USA
  */
 
+#ifdef HAVE_CONFIG_H
 #include <config.h>
+#endif
 
 #include <sys/stat.h>
 #include <errno.h>
index b8219b4..a37d163 100644 (file)
  *  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"
index fec620e..cdf636b 100644 (file)
@@ -20,7 +20,9 @@
  * USA
  */
 
+#ifdef HAVE_CONFIG_H
 #include <config.h>
+#endif
 
 #include <stdlib.h>
 #include <sys/types.h>
index a488a71..3edadb5 100644 (file)
@@ -20,7 +20,9 @@
  * USA
  */
 
+#ifdef HAVE_CONFIG_H
 #include <config.h>
+#endif
 
 #include <sys/stat.h>
 #include <errno.h>
index c933626..3e588be 100644 (file)
@@ -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;
        }
 
index 1f1e6ab..b211f52 100644 (file)
  * 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>
index d7ee85d..578a6eb 100644 (file)
@@ -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);
 
index 76ac521..07857c1 100644 (file)
  * 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
index c1e8fb8..009058d 100644 (file)
@@ -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);
 }
 
index 6dae1f6..0931f90 100644 (file)
  * 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"
index 558d8a8..17b2fdf 100644 (file)
@@ -23,7 +23,9 @@
  * USA
  */
 
-#include "config.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
 
 #include <sys/types.h>
 #include <sys/socket.h>
index 5a7cfb8..2e9168f 100644 (file)
  * 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"
index 71595ca..9cd0c1e 100644 (file)
@@ -23,7 +23,9 @@
  * USA
  */
 
+#ifdef HAVE_CONFIG_H
 #include <config.h>
+#endif
 
 #include <errno.h>
 #include <fcntl.h>
index 96cba49..b84a6a0 100644 (file)
  * 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"
index 8b49aaa..a6572d4 100644 (file)
@@ -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;
index 023aee1..4a28b19 100644 (file)
  * USA
  */
 
+#ifdef HAVE_CONFIG_H
 #include <config.h>
+#endif
+
 #include "string-utils.h"
 #include "string.h"