#include <glib.h>
#include <libxml/xmlmemory.h>
+#include <libgnome/gnome-i18n.h>
#include <camel/camel-internet-address.h>
#define d(x)
CAMEL_GROUPWISE_CFLAGS.
(libcamelgroupwise_la_LIBADD): use CAMEL_GROUPWISE_LIBS.
+2004-09-07 Not Zed <NotZed@Ximian.com>
+
+ * providers/groupwise/camel-groupwise-provider.c: put the options
+ in their own section.
+
+2004-09-06 Not Zed <NotZed@Ximian.com>
+
+ * camel-search-private.c (utf8_get): remove this, and make the
+ code use camel_utf8_getc instead. Quite a bit faster esp if
+ optimising with inlines.
+
+ * camel-object.c (check_magic_fail): change the check_magic code
+ to mostly run from a macro, its worth it.
+
+2004-09-04 Not Zed <NotZed@Ximian.com>
+
+ * providers/local/camel-mbox-summary.c (message_info_new): fix
+ cast issue.
+
+ * providers/pop3/camel-pop3-engine.c (get_capabilities): remove
+ some unused variables.
+
+ * camel-object.h: remove camel-i18n.h, fixed all c files where
+ appropriate.
+
+2004-08-25 Not Zed <NotZed@Ximian.com>
+
+ * camel-list-utils.[ch]: Copied e_dlist* stuff to here, part of
+ removing e-util dependency on camel.
+
+2004-08-05 Not Zed <NotZed@Ximian.com>
+
+ * providers/local/camel-local-provider.c: same.
+
+ * providers/imap/camel-imap-provider.c: put the extra stuff into a
+ 'general' section.
+
+ * providers/imapp/camel-imapp-provider.c: same.
+
+ * providers/pop3/camel-pop3-provider.c: make sure each section
+ start has a name.
+
+2004-08-03 Not Zed <NotZed@Ximian.com>
+
+ * camel-url.c (camel_url_set_param): when clearing a param, use
+ remove_data instead of set_data_full. craptatious glib at it
+ again.
+
+ * providers/nntp/camel-nntp-provider.c: turn on ssl option.
+
+2004-07-07 Not Zed <NotZed@Ximian.com>
+
+ * camel-folder.c: removed filter-rule.h ugh.
+
2004-07-02 Christian Neumair <chris@gnome-de.org>
* camel-smime-context.c: s/Can't/Cannot/.
camel-multipart.c \
camel-multipart-encrypted.c \
camel-multipart-signed.c \
+ camel-list-utils.c \
camel-object.c \
camel-operation.c \
camel-partition-table.c \
camel-multipart.h \
camel-multipart-encrypted.h \
camel-multipart-signed.h \
+ camel-list-utils.h \
camel-object.h \
camel-operation.h \
camel-partition-table.h \
#include <glib.h>
+#include "camel-i18n.h"
#include "camel-cipher-context.h"
#include "camel-stream.h"
#include "camel-operation.h"
#include <alloca.h>
#endif
+#include "camel-i18n.h"
#include "camel-data-cache.h"
#include "camel-exception.h"
#include "camel-stream-fs.h"
#include <stdio.h>
#include <errno.h>
+#include "camel-i18n.h"
#include "camel-disco-diary.h"
#include "camel-disco-folder.h"
#include "camel-disco-store.h"
#include "camel-exception.h"
#include "camel-session.h"
+#include "camel-i18n.h"
#define CF_CLASS(o) (CAMEL_FOLDER_CLASS (CAMEL_OBJECT_GET_CLASS (o)))
#define CDF_CLASS(o) (CAMEL_DISCO_FOLDER_CLASS (CAMEL_OBJECT_GET_CLASS (o)))
#include "camel-disco-folder.h"
#include "camel-exception.h"
#include "camel-session.h"
+#include "camel-i18n.h"
#define d(x)
#include "camel-stream-fs.h"
#include "camel-stream-mem.h"
#include "camel-mime-message.h"
-
#include "camel-debug.h"
+#include "camel-i18n.h"
#include "e-util/e-sexp.h"
#include "e-util/e-memory.h"
#include "camel-stream-mem.h"
#include "camel-stream-fs.h"
#include "camel-search-private.h"
-
+#include "camel-i18n.h"
#include "camel-url.h"
#define d(x)
#include "camel-stream-mem.h"
#include "e-util/e-memory.h"
#include "camel-search-private.h"
+#include "camel-i18n.h"
#define d(x)
#define r(x)
#include "camel-store.h"
#include "camel-mime-message.h"
#include "camel-debug.h"
-
#include "e-util/e-memory.h"
#include "camel-operation.h"
-
#include "camel-session.h"
#include "camel-filter-driver.h"
#include "camel-private.h"
#include "camel-vtrash-folder.h"
-#include "filter/filter-rule.h"
+#include "camel-i18n.h"
#define d(x)
#define w(x)
&& changed->uid_recent->len > 0)
driver = camel_session_get_filter_driver(session,
(folder->folder_flags & CAMEL_FOLDER_FILTER_RECENT)
- ? FILTER_SOURCE_INCOMING : FILTER_SOURCE_JUNKTEST, NULL);
+ ? "incoming":"junktest", NULL);
if (driver) {
recents = g_ptr_array_new();
#include "camel-operation.h"
#include "camel-mime-part.h"
#include "camel-mime-filter-canon.h"
-
#include "camel-multipart-signed.h"
#include "camel-multipart-encrypted.h"
+#include "camel-i18n.h"
#define d(x)
--- /dev/null
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+/*
+ * Authors: Michael Zucchi <notzed@ximian.com>
+ *
+ * Copyright 2004 Novell, Inc. (www.novell.com)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of version 2 of the GNU General Public
+ * License as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public
+ * License along with this program; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ *
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <glib.h>
+
+#include "camel-list-utils.h"
+
+/**
+ * camel_dlist_init:
+ * @v:
+ *
+ * Initialise a double-linked list header. All list headers must be
+ * initialised before use.
+ **/
+void camel_dlist_init(CamelDList *v)
+{
+ v->head = (CamelDListNode *)&v->tail;
+ v->tail = 0;
+ v->tailpred = (CamelDListNode *)&v->head;
+}
+
+/**
+ * camel_dlist_addhead:
+ * @l: An initialised list header.
+ * @n: A node, the next and prev pointers will be overwritten.
+ *
+ * Add the list node @n to the head (start) of the list @l.
+ *
+ * Return value: @n.
+ **/
+CamelDListNode *camel_dlist_addhead(CamelDList *l, CamelDListNode *n)
+{
+ n->next = l->head;
+ n->prev = (CamelDListNode *)&l->head;
+ l->head->prev = n;
+ l->head = n;
+ return n;
+}
+
+/**
+ * camel_dlist_addtail:
+ * @l: An intialised list header.
+ * @n: A node, the next and prev pointers will be overwritten.
+ *
+ * Add the list onde @n to the tail (end) of the list @l.
+ *
+ * Return value: @n.
+ **/
+CamelDListNode *camel_dlist_addtail(CamelDList *l, CamelDListNode *n)
+{
+ n->next = (CamelDListNode *)&l->tail;
+ n->prev = l->tailpred;
+ l->tailpred->next = n;
+ l->tailpred = n;
+ return n;
+}
+
+/**
+ * camel_dlist_remove:
+ * @n: A node which is part of a list.
+ *
+ * Remove @n from the list it's in. @n must belong to a list.
+ *
+ * Return value: @n.
+ **/
+CamelDListNode *camel_dlist_remove(CamelDListNode *n)
+{
+ n->next->prev = n->prev;
+ n->prev->next = n->next;
+ return n;
+}
+
+/**
+ * camel_dlist_remhead:
+ * @l: An initialised list, maybe containing items.
+ *
+ * Remove the head node (start) of the list.
+ *
+ * xReturn value: The previously first-node in the list, or NULLif @l
+ * is an empty list.
+ **/
+CamelDListNode *camel_dlist_remhead(CamelDList *l)
+{
+ CamelDListNode *n, *nn;
+
+ n = l->head;
+ nn = n->next;
+ if (nn) {
+ nn->prev = n->prev;
+ l->head = nn;
+ return n;
+ }
+ return NULL;
+}
+
+/**
+ * camel_dlist_remtail:
+ * @l: An initialised list, maybe containing items.
+ *
+ * Remove the last node in the list.
+ *
+ * Return value: The previously last-node in the list, or NULL if @l
+ * is an empty list.
+ **/
+CamelDListNode *camel_dlist_remtail(CamelDList *l)
+{
+ CamelDListNode *n, *np;
+
+ n = l->tailpred;
+ np = n->prev;
+ if (np) {
+ np->next = n->next;
+ l->tailpred = np;
+ return n;
+ }
+ return NULL;
+}
+
+/**
+ * camel_dlist_empty:
+ * @l: An initialised list header.
+ *
+ * Returns %TRUE if @l is an empty list.
+ *
+ * Return value: %TRUE if @l is an empty list, %FALSE otherwise.
+ **/
+int camel_dlist_empty(CamelDList *l)
+{
+ return (l->head == (CamelDListNode *)&l->tail);
+}
+
+/**
+ * camel_dlist_length:
+ * @l: An initialised list header.
+ *
+ * Returns the number of nodes in the list @l.
+ *
+ * Return value: The number of nodes.
+ **/
+int camel_dlist_length(CamelDList *l)
+{
+ CamelDListNode *n, *nn;
+ int count = 0;
+
+ n = l->head;
+ nn = n->next;
+ while (nn) {
+ count++;
+ n = nn;
+ nn = n->next;
+ }
+
+ return count;
+}
+
+/* This is just for orthogonal completeness */
+
+void camel_slist_init(CamelSList *v)
+{
+ v->head = NULL;
+}
+
+CamelSListNode *camel_slist_addhead(CamelSList *l, CamelSListNode *n)
+{
+ n->next = l->head;
+ l->head = n;
+
+ return n;
+}
+
+CamelSListNode *camel_slist_addtail(CamelSList *l, CamelSListNode *n)
+{
+ CamelSListNode *p;
+
+ p = (CamelSListNode *)l;
+ while (p->next)
+ p = p->next;
+ n->next = NULL;
+ p->next = n;
+
+ return n;
+}
+
+CamelSListNode *camel_slist_remove(CamelSList *l, CamelSListNode *n)
+{
+ CamelSListNode *p, *q;
+
+ p = (CamelSListNode *)l;
+ while ( (q = p->next) ) {
+ if (q == n) {
+ p->next = n->next;
+ return n;
+ }
+ p = q;
+ }
+
+ g_warning("Trying to remove SList node not present in SList");
+
+ return NULL;
+}
+
+CamelSListNode *camel_slist_remhead(CamelSList *l)
+{
+ CamelSListNode *n;
+
+ n = l->head;
+ if (n)
+ l->head = n->next;
+
+ return n;
+}
+
+CamelSListNode *camel_slist_remtail(CamelSList *l)
+{
+ CamelSListNode *n, *p;
+
+ n = l->head;
+ if (l->head == NULL)
+ return NULL;
+ p = (CamelSListNode *)l;
+ while (n->next) {
+ p = n;
+ n = n->next;
+ }
+ p->next = NULL;
+
+ return n;
+}
+
+int camel_slist_empty(CamelSList *l)
+{
+ return (l->head == NULL);
+}
+
+int camel_slist_length(CamelSList *l)
+{
+ CamelSListNode *n;
+ int count = 0;
+
+ n = l->head;
+ while (n) {
+ count++;
+ n = n->next;
+ }
+
+ return count;
+}
+
--- /dev/null
+/*
+ * Authors: Michael Zucchi <notzed@ximian.com>
+ *
+ * Copyright 2004 Novell, Inc. (www.novell.com)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of version 2 of the GNU General Public
+ * License as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public
+ * License along with this program; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ *
+ */
+
+#ifndef _CAMEL_LIST_UTILS_H
+#define _CAMEL_LIST_UTILS_H
+
+/* This is a copy of Amiga's Exec lists, the head and tail nodes are
+ * overlapped and merged into a single list header. All operations
+ * are O(1), including node removal and addition from/to either end of
+ * the list. It can be used to implement O(1) queues, fifo's and
+ * normal lists. You don't need the list header to remove the node. */
+
+typedef struct _CamelDList CamelDList;
+typedef struct _CamelDListNode CamelDListNode;
+
+/**
+ * struct _CamelDListNode - A double-linked list node.
+ *
+ * @next: The next node link.
+ * @prev: The previous node link.
+ *
+ * A double-linked list node header. Put this at the start of the
+ * list node structure. Data is stored in the list by subclassing the
+ * node header rather than using a pointer. Or more normally by just
+ * duplicating the next and previous pointers for better type safety.
+ **/
+struct _CamelDListNode {
+ struct _CamelDListNode *next;
+ struct _CamelDListNode *prev;
+};
+
+/**
+ * struct _CamelDList - A double-linked list header.
+ *
+ * @head: The head node's next pointer.
+ * @tail: The tail node's next pointer.
+ * @tailpred: The previous node to the tail node.
+ *
+ * This is the merging of two separate head and tail nodes into a
+ * single structure. i.e. if you ahve a NULL terminated head and tail
+ * node such as head = { first, NULL } and tail = { NULL, last } then
+ * overlap them at the common NULL, you get this structure.
+ *
+ * The list header must be initialised with camel_dlist_init, or by
+ * using the static CAMEL_DLIST_INITIALISER macro.
+ **/
+struct _CamelDList {
+ struct _CamelDListNode *head;
+ struct _CamelDListNode *tail;
+ struct _CamelDListNode *tailpred;
+};
+
+#define CAMEL_DLIST_INITIALISER(l) { (CamelDListNode *)&l.tail, 0, (CamelDListNode *)&l.head }
+
+void camel_dlist_init(CamelDList *v);
+CamelDListNode *camel_dlist_addhead(CamelDList *l, CamelDListNode *n);
+CamelDListNode *camel_dlist_addtail(CamelDList *l, CamelDListNode *n);
+CamelDListNode *camel_dlist_remove(CamelDListNode *n);
+CamelDListNode *camel_dlist_remhead(CamelDList *l);
+CamelDListNode *camel_dlist_remtail(CamelDList *l);
+int camel_dlist_empty(CamelDList *l);
+int camel_dlist_length(CamelDList *l);
+
+/* This is provided mostly for orthogonality with the dlist structure.
+ * By making the nodes contain all of the data themselves it
+ * simplifies memory management. Removing and adding from/to the head
+ * of the list is O(1), the rest of the operations are O(n). */
+
+typedef struct _CamelSListNode CamelSListNode;
+typedef struct _CamelSList CamelSList;
+
+/**
+ * struct _CamelSListNode - A single-linked list node.
+ *
+ * @next: The next node in the list.
+ *
+ * A single-linked list node header. Put this at hte start of the
+ * actual list node structure, or more commonly, just a next pointer.
+ * Data is stored in the list node by subclassing the node-header
+ * rather than using a pointer.
+ **/
+struct _CamelSListNode {
+ struct _CamelSListNode *next;
+};
+
+/**
+ * struct _CamelSList - A single-linked list header.
+ *
+ * @head: The head of the list.
+ *
+ * This is the header of a single-linked list.
+ **/
+struct _CamelSList {
+ struct _CamelSListNode *head;
+};
+
+#define CAMEL_SLIST_INITIALISER(l) { 0 }
+
+void camel_slist_init(CamelSList *l);
+CamelSListNode *camel_slist_addhead(CamelSList *l, CamelSListNode *n);
+CamelSListNode *camel_slist_addtail(CamelSList *l, CamelSListNode *n);
+CamelSListNode *camel_slist_remove(CamelSList *l, CamelSListNode *n);
+CamelSListNode *camel_slist_remhead(CamelSList *l);
+CamelSListNode *camel_slist_remtail(CamelSList *l);
+int camel_slist_empty(CamelSList *l);
+int camel_slist_length(CamelSList *l);
+
+#endif
#include "camel-movemail.h"
#include "camel-exception.h"
-
#include "camel-mime-parser.h"
#include "camel-mime-filter.h"
#include "camel-mime-filter-from.h"
-
#include "camel-lock-client.h"
+#include "camel-i18n.h"
#define d(x)
#include "camel-stream-fs.h"
#include "camel-mime-utils.h"
#include "camel-mime-part.h"
+#include "camel-i18n.h"
static void camel_multipart_encrypted_class_init (CamelMultipartEncryptedClass *klass);
static void camel_multipart_encrypted_init (gpointer object, gpointer klass);
#include "camel-seekable-substream.h"
#include "camel-mime-filter-crlf.h"
#include "camel-mime-filter-canon.h"
+#include "camel-i18n.h"
#define d(x) /*(printf("%s(%d): ", __FILE__, __LINE__),(x))
#include <stdio.h>;*/
}
static char *
-desc_data(CamelObject *o, int ok)
+desc_data(CamelObject *o, guint32 ok)
{
char *what;
return what;
}
+#define check_magic(o, ctype, omagic) \
+ ( ((CamelObject *)(o))->magic == (omagic) \
+ && (ctype)->magic == CAMEL_OBJECT_CLASS_MAGIC) \
+ ? 1 : check_magic_fail(o, ctype, omagic)
+
static gboolean
-check_magic(void *o, CamelType ctype, int isob)
+check_magic_fail(void *o, CamelType ctype, guint32 omagic)
{
char *what, *to;
- what = desc_data(o, isob?CAMEL_OBJECT_MAGIC:CAMEL_OBJECT_CLASS_MAGIC);
+ what = desc_data(o, omagic);
to = desc_data((CamelObject *)ctype, CAMEL_OBJECT_CLASS_MAGIC);
if (what || to) {
if (what == NULL) {
- if (isob)
+ if (omagic == CAMEL_OBJECT_MAGIC)
what = g_strdup_printf("OBJECT '%s'", ((CamelObject *)o)->klass->name);
else
what = g_strdup_printf("OBJECT '%s'", ((CamelObjectClass *)o)->name);
{
CamelObjectClass *k;
- g_return_val_if_fail(check_magic(o, ctype, TRUE), FALSE);
+ g_return_val_if_fail(check_magic(o, ctype, CAMEL_OBJECT_MAGIC), FALSE);
k = o->klass;
while (k) {
gboolean
camel_object_class_is(CamelObjectClass *k, CamelType ctype)
{
- g_return_val_if_fail(check_magic(k, ctype, FALSE), FALSE);
+ g_return_val_if_fail(check_magic(k, ctype, CAMEL_OBJECT_CLASS_MAGIC), FALSE);
while (k) {
if (k == ctype)
{
CamelObjectClass *k;
- g_return_val_if_fail(check_magic(o, ctype, TRUE), NULL);
+ g_return_val_if_fail(check_magic(o, ctype, CAMEL_OBJECT_MAGIC), NULL);
k = o->klass;
while (k) {
{
CamelObjectClass *r = k;
- g_return_val_if_fail(check_magic(k, ctype, FALSE), NULL);
+ g_return_val_if_fail(check_magic(k, ctype, CAMEL_OBJECT_CLASS_MAGIC), NULL);
while (k) {
if (k == ctype)
return ret;
}
+void *camel_object_get_ptr(void *vo, CamelException *ex, int tag)
+{
+ CamelObject *o = vo;
+ CamelArgGetV args;
+ CamelObjectClass *klass = o->klass;
+ int ret = 0;
+ void *val = NULL;
+
+ g_return_val_if_fail(CAMEL_IS_OBJECT(o), NULL);
+ g_return_val_if_fail((tag & CAMEL_ARG_TYPE) == CAMEL_ARG_OBJ
+ || (tag & CAMEL_ARG_TYPE) == CAMEL_ARG_STR
+ || (tag & CAMEL_ARG_TYPE) == CAMEL_ARG_PTR, 0);
+
+ /* woefully inefficient, *shrug */
+ args.argc = 1;
+ args.argv[0].tag = tag;
+ args.argv[0].ca_ptr = &val;
+
+ ret = klass->getv(o, ex, &args);
+ if (ret != 0)
+ return NULL;
+ else
+ return val;
+}
+
+int camel_object_get_int(void *vo, CamelException *ex, int tag)
+{
+ CamelObject *o = vo;
+ CamelArgGetV args;
+ CamelObjectClass *klass = o->klass;
+ int ret = 0;
+ int val = 0;
+
+ g_return_val_if_fail(CAMEL_IS_OBJECT(o), 0);
+ g_return_val_if_fail((tag & CAMEL_ARG_TYPE) == CAMEL_ARG_INT
+ || (tag & CAMEL_ARG_TYPE) == CAMEL_ARG_BOO, 0);
+
+ /* woefully inefficient, *shrug */
+ args.argc = 1;
+ args.argv[0].tag = tag;
+ args.argv[0].ca_int = &val;
+
+ ret = klass->getv(o, ex, &args);
+ if (ret != 0)
+ return 0;
+ else
+ return val;
+}
+
int camel_object_getv(void *vo, CamelException *ex, CamelArgGetV *args)
{
g_return_val_if_fail(CAMEL_IS_OBJECT(vo), -1);
#include <camel/camel-arg.h>
#include <camel/camel-types.h> /* this is a @##$@#SF stupid header */
-/* this crap shouldn't be here */
-#include <camel/camel-i18n.h>
-
/* turn on so that camel_object_class_dump_tree() dumps object instances as well */
#define CAMEL_OBJECT_TRACK_INSTANCES
int camel_object_get(void *obj, struct _CamelException *ex, ...);
int camel_object_getv(void *obj, struct _CamelException *ex, CamelArgGetV *);
+/* not very efficient one-time calls */
+void *camel_object_get_ptr(void *vo, CamelException *ex, int tag);
+int camel_object_get_int(void *vo, CamelException *ex, int tag);
+
/* meta-data for user-specific data */
char *camel_object_meta_get(void *vo, const char * name);
gboolean camel_object_meta_set(void *vo, const char * name, const char *value);
#include "camel-exception.h"
#include "camel-string-utils.h"
#include "camel-vee-store.h"
-
#include "e-util/e-msgport.h"
+#include "camel-i18n.h"
/* table of CamelProviderModule's */
static GHashTable *module_table;
/* Flags describing the provider, flags describing its URLs */
int flags, url_flags;
+
+ /* The ConfEntry and AutoDetect functions will probably be
+ * DEPRECATED in a future release */
/* Extra configuration information */
CamelProviderConfEntry *extra_conf;
#include "camel-sasl-anonymous.h"
#include "camel-internet-address.h"
#include <string.h>
-
+#include "camel-i18n.h"
CamelServiceAuthType camel_sasl_anonymous_authtype = {
N_("Anonymous"),
#include "camel-mime-utils.h"
#include "camel-service.h"
#include <e-util/md5-utils.h>
+#include "camel-i18n.h"
CamelServiceAuthType camel_sasl_cram_md5_authtype = {
N_("CRAM-MD5"),
#include "camel-charset-map.h"
#include "camel-mime-utils.h"
#include "camel-sasl-digest-md5.h"
+#include "camel-i18n.h"
#define d(x)
#include <string.h>
#include "camel-sasl-login.h"
#include "camel-service.h"
+#include "camel-i18n.h"
CamelServiceAuthType camel_sasl_login_authtype = {
N_("Login"),
#include <config.h>
#endif
-#include "camel-sasl-ntlm.h"
-
#include <ctype.h>
#include <string.h>
+#include "camel-sasl-ntlm.h"
+#include "camel-i18n.h"
+
CamelServiceAuthType camel_sasl_ntlm_authtype = {
N_("NTLM / SPA"),
#include <string.h>
#include "camel-sasl-plain.h"
#include "camel-service.h"
+#include "camel-i18n.h"
CamelServiceAuthType camel_sasl_plain_authtype = {
N_("PLAIN"),
#include "camel-sasl-popb4smtp.h"
#include "camel-service.h"
#include "camel-session.h"
+#include "camel-i18n.h"
CamelServiceAuthType camel_sasl_popb4smtp_authtype = {
N_("POP before SMTP"),
#include "camel-multipart.h"
#include "camel-stream-mem.h"
#include "e-util/e-sexp.h"
-
#include "camel-search-private.h"
+#include "camel-i18n.h"
#include <glib/gunicode.h>
#define d(x)
+static inline guint32
+camel_utf8_getc(const unsigned char **ptr)
+{
+ register unsigned char *p = (unsigned char *)*ptr;
+ register unsigned char c, r;
+ register guint32 v, m;
+
+again:
+ r = *p++;
+loop:
+ if (r < 0x80) {
+ *ptr = p;
+ v = r;
+ } else if (r < 0xfe) { /* valid start char? */
+ v = r;
+ m = 0x7f80; /* used to mask out the length bits */
+ do {
+ c = *p++;
+ if ((c & 0xc0) != 0x80) {
+ r = c;
+ goto loop;
+ }
+ v = (v<<6) | (c & 0x3f);
+ r<<=1;
+ m<<=5;
+ } while (r & 0x40);
+
+ *ptr = p;
+
+ v &= ~m;
+ } else {
+ goto again;
+ }
+
+ return v;
+}
+
/* builds the regex into pattern */
/* taken from camel-folder-search, with added isregex & exception parameter */
/* Basically, we build a new regex, either based on subset regex's, or substrings,
return truth;
}
-/* FIXME: This is stupidly slow and needs to be removed */
-static gunichar
-utf8_get (const char **inp)
-{
- const unsigned char *p = *inp;
- gunichar c;
-
- if (p == NULL)
- return 0;
-
- c = g_utf8_get_char (p);
- *inp = g_unichar_validate (c) ? g_utf8_next_char (p) : NULL;
-
- return c;
-}
-
const char *
camel_ustrstrcase (const char *haystack, const char *needle)
{
gunichar *nuni, *puni;
gunichar u;
- const char *p;
+ const unsigned char *p;
g_return_val_if_fail (haystack != NULL, NULL);
g_return_val_if_fail (needle != NULL, NULL);
puni = nuni = g_alloca (sizeof (gunichar) * strlen (needle));
p = needle;
- while ((u = utf8_get (&p)))
+ while ((u = camel_utf8_getc(&p)))
*puni++ = g_unichar_tolower (u);
/* NULL means there was illegal utf-8 sequence */
if (!p)
return NULL;
- p = haystack;
- while ((u = utf8_get (&p))) {
+ p = (const unsigned char *)haystack;
+ while ((u = camel_utf8_getc(&p))) {
gunichar c;
c = g_unichar_tolower (u);
/* We have valid stripped char */
if (c == nuni[0]) {
- const gchar *q = p;
+ const unsigned char *q = p;
gint npos = 1;
while (nuni + npos < puni) {
- u = utf8_get (&q);
+ u = camel_utf8_getc(&q);
if (!q || !u)
return NULL;
CAMEL_SEARCH_COMPARE (s1, s2, NULL);
- u1 = utf8_get (&s1);
- u2 = utf8_get (&s2);
+ u1 = camel_utf8_getc((const unsigned char **)&s1);
+ u2 = camel_utf8_getc((const unsigned char **)&s2);
while (u1 && u2) {
u1 = g_unichar_tolower (u1);
u2 = g_unichar_tolower (u2);
else if (u1 > u2)
return 1;
- u1 = utf8_get (&s1);
- u2 = utf8_get (&s2);
+ u1 = camel_utf8_getc((const unsigned char **)&s1);
+ u2 = camel_utf8_getc((const unsigned char **)&s2);
}
/* end of one of the strings ? */
CAMEL_SEARCH_COMPARE (s1, s2, NULL);
- u1 = utf8_get (&s1);
- u2 = utf8_get (&s2);
+ u1 = camel_utf8_getc((const unsigned char **)&s1);
+ u2 = camel_utf8_getc((const unsigned char **)&s2);
while (len > 0 && u1 && u2) {
u1 = g_unichar_tolower (u1);
u2 = g_unichar_tolower (u2);
return 1;
len--;
- u1 = utf8_get (&s1);
- u2 = utf8_get (&s2);
+ u1 = camel_utf8_getc((const unsigned char **)&s1);
+ u2 = camel_utf8_getc((const unsigned char **)&s2);
}
if (len == 0)
static int
header_match(const char *value, const char *match, camel_search_match_t how)
{
- const char *p;
+ const unsigned char *p;
int vlen, mlen;
if (how == CAMEL_SEARCH_MATCH_SOUNDEX)
/* from dan the man, if we have mixed case, perform a case-sensitive match,
otherwise not */
- p = match;
+ p = (const unsigned char *)match;
while (*p) {
if (isupper(*p)) {
switch (how) {
return truth;
}
-static inline guint32
-camel_utf8_getc(const unsigned char **ptr)
-{
- register unsigned char *p = (unsigned char *)*ptr;
- register unsigned char c, r;
- register guint32 v, m;
-
-again:
- r = *p++;
-loop:
- if (r < 0x80) {
- *ptr = p;
- v = r;
- } else if (r < 0xfe) { /* valid start char? */
- v = r;
- m = 0x7f80; /* used to mask out the length bits */
- do {
- c = *p++;
- if ((c & 0xc0) != 0x80) {
- r = c;
- goto loop;
- }
- v = (v<<6) | (c & 0x3f);
- r<<=1;
- m<<=5;
- } while (r & 0x40);
-
- *ptr = p;
-
- v &= ~m;
- } else {
- goto again;
- }
-
- return v;
-}
-
static void
output_c(GString *w, guint32 c, int *type)
{
#include <errno.h>
#include "e-util/e-msgport.h"
-
#include "e-util/e-host-utils.h"
#include "camel-service.h"
#include "camel-exception.h"
#include "camel-operation.h"
#include "camel-private.h"
+#include "camel-i18n.h"
#define d(x)
#define w(x)
#include "camel-file-utils.h"
#include "camel-string-utils.h"
#include "camel-url.h"
+#include "camel-i18n.h"
#include "camel-private.h"
#include "camel-smime-context.h"
#include "camel-operation.h"
+#include "camel-i18n.h"
#define d(x)
#include "camel-vtrash-folder.h"
#include "camel-exception.h"
#include "camel-private.h"
+#include "camel-i18n.h"
#define d(x)
#define w(x)
#include "camel-session.h"
#include "camel-certdb.h"
#include "camel-operation.h"
+#include "camel-i18n.h"
/* from md5-utils.h */
void md5_get_digest (const char *buffer, int buffer_size, unsigned char digest[16]);
#include "camel-mime-utils.h"
#include "camel-object.h"
#include "camel-string-utils.h"
+#include "camel-i18n.h"
static void copy_param (GQuark key_id, gpointer data, gpointer user_data);
static void output_param (GQuark key_id, gpointer data, gpointer user_data);
void
camel_url_set_param (CamelURL *url, const char *name, const char *value)
{
- g_datalist_set_data_full (&url->params, name, value ? g_strdup (value) : NULL, g_free);
+ if (value)
+ g_datalist_set_data_full (&url->params, name, g_strdup(value), g_free);
+ else
+ g_datalist_remove_data(&url->params, name);
}
const char *
#include "camel-vee-store.h" /* for open flags */
#include "camel-private.h"
#include "camel-debug.h"
+#include "camel-i18n.h"
#include "e-util/md5-utils.h"
#include "camel-vee-folder.h"
#include "camel-private.h"
+#include "camel-i18n.h"
#include <string.h>
#include "camel-store.h"
#include "camel-vee-store.h"
#include "camel-mime-message.h"
+#include "camel-i18n.h"
#include <string.h>
#include "camel-url.h"
#include "camel-sasl.h"
#include "camel-gw-listener.h"
+#include "camel-i18n.h"
static void add_hash (guint *hash, char *s);
static guint groupwise_url_hash (gconstpointer key);
N_("Check for new messages in all folders"), "1" },
{ CAMEL_PROVIDER_CONF_SECTION_END },
+ { CAMEL_PROVIDER_CONF_SECTION_START, "general", NULL, N_("Options") },
{ CAMEL_PROVIDER_CONF_CHECKBOX, "filter", NULL,
N_("Apply filters to new messages in Inbox on this server"), "0" },
{ CAMEL_PROVIDER_CONF_CHECKBOX, "filter_junk", NULL,
N_("Only check for Junk messages in the INBOX folder"), "0" },
{ CAMEL_PROVIDER_CONF_CHECKBOX, "offline_sync", NULL,
N_("Automatically synchronize remote mail locally"), "0" },
+ { CAMEL_PROVIDER_CONF_SECTION_END },
/* extra Groupwise configuration settings */
{CAMEL_PROVIDER_CONF_SECTION_START, "soapport", NULL,
{ CAMEL_PROVIDER_CONF_SECTION_END },
-
{ CAMEL_PROVIDER_CONF_END }
};
#include <camel/camel-private.h>
#include <camel/camel-utf8.h>
#include <camel/camel-session.h>
-
+#include "camel-i18n.h"
extern int camel_verbose_debug;
* USA
*/
-
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "camel-string-utils.h"
#include "camel-file-utils.h"
#include "camel-debug.h"
+#include "camel-i18n.h"
#define d(x) x
#include "camel-data-wrapper.h"
#include "camel-exception.h"
#include "camel-stream-fs.h"
+#include "camel-i18n.h"
static void finalize (CamelImapMessageCache *cache);
static void stream_finalize (CamelObject *stream, gpointer event_data, gpointer user_data);
#include "camel-session.h"
#include "camel-url.h"
#include "camel-sasl.h"
+#include "camel-i18n.h"
static void add_hash (guint *hash, char *s);
static guint imap_url_hash (gconstpointer key);
{ CAMEL_PROVIDER_CONF_ENTRY, "namespace", "override_namespace",
N_("Namespace") },
{ CAMEL_PROVIDER_CONF_SECTION_END },
+ { CAMEL_PROVIDER_CONF_SECTION_START, "general", NULL, N_("Options") },
{ CAMEL_PROVIDER_CONF_CHECKBOX, "filter", NULL,
N_("Apply filters to new messages in INBOX on this server"), "0" },
{ CAMEL_PROVIDER_CONF_CHECKBOX, "filter_junk", NULL,
N_("Only check for Junk messages in the INBOX folder"), "0" },
{ CAMEL_PROVIDER_CONF_CHECKBOX, "offline_sync", NULL,
N_("Automatically synchronize remote mail locally"), "0" },
+ { CAMEL_PROVIDER_CONF_SECTION_END },
{ CAMEL_PROVIDER_CONF_END }
};
*
*/
-
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "camel-sasl.h"
#include "camel-utf8.h"
#include "camel-string-utils.h"
-
#include "camel-imap-private.h"
#include "camel-private.h"
-
#include "camel-debug.h"
+#include "camel-i18n.h"
#define d(x)
#include "camel/camel-session.h"
#include "camel/camel-url.h"
#include "camel/camel-sasl.h"
+#include "camel/camel-i18n.h"
#include "camel-imapp-store.h"
CamelProviderConfEntry imapp_conf_entries[] = {
- { CAMEL_PROVIDER_CONF_SECTION_START, NULL, NULL,
+ { CAMEL_PROVIDER_CONF_SECTION_START, "storage", NULL,
N_("Message storage") },
{ CAMEL_PROVIDER_CONF_SECTION_END },
{ CAMEL_PROVIDER_CONF_END }
#ifdef HAVE_SSL
#include "camel/camel-tcp-stream-ssl.h"
#endif
+#include "camel/camel-i18n.h"
#include "camel-imapp-store-summary.h"
#include "camel-imapp-store.h"
#include "camel-stream-filter.h"
#include "camel-mime-filter-from.h"
#include "camel-exception.h"
+#include "camel-i18n.h"
#include "camel-local-private.h"
#include "camel-mbox-store.h"
#include "camel-maildir-store.h"
#include "camel-spool-store.h"
+#include "camel-i18n.h"
#define d(x)
static CamelProviderConfEntry mh_conf_entries[] = {
CAMEL_PROVIDER_CONF_DEFAULT_PATH,
+ { CAMEL_PROVIDER_CONF_SECTION_START, "general", NULL, N_("Options") },
{ CAMEL_PROVIDER_CONF_CHECKBOX, "dotfolders", NULL,
N_("Use the `.folders' folder summary file (exmh)"), "0" },
+ { CAMEL_PROVIDER_CONF_SECTION_END },
{ CAMEL_PROVIDER_CONF_END }
};
static CamelProviderConfEntry maildir_conf_entries[] = {
CAMEL_PROVIDER_CONF_DEFAULT_PATH,
+ { CAMEL_PROVIDER_CONF_SECTION_START, "general", NULL, N_("Options") },
{ CAMEL_PROVIDER_CONF_CHECKBOX, "filter", NULL,
N_("Apply filters to new messages in INBOX"), "0" },
+ { CAMEL_PROVIDER_CONF_SECTION_END },
{ CAMEL_PROVIDER_CONF_END }
};
static CamelProviderConfEntry spool_conf_entries[] = {
CAMEL_PROVIDER_CONF_DEFAULT_PATH,
+ { CAMEL_PROVIDER_CONF_SECTION_START, "general", NULL, N_("Options") },
{ CAMEL_PROVIDER_CONF_CHECKBOX, "filter", NULL, N_("Apply filters to new messages in INBOX"), "0" },
{ CAMEL_PROVIDER_CONF_CHECKBOX, "xstatus", NULL, N_("Store status headers in Elm/Pine/Mutt format"), "0" },
+ { CAMEL_PROVIDER_CONF_SECTION_END },
{ CAMEL_PROVIDER_CONF_END }
};
#include "camel-local-store.h"
#include "camel-exception.h"
#include "camel-url.h"
+#include "camel-i18n.h"
#include "camel-local-folder.h"
#include <camel/camel-text-index.h>
#include "camel/camel-mime-message.h"
#include "camel/camel-stream-null.h"
#include "camel/camel-file-utils.h"
+#include "camel/camel-i18n.h"
#define w(x)
#define io(x)
#include "camel-data-wrapper.h"
#include "camel-mime-message.h"
#include "camel-exception.h"
+#include "camel-i18n.h"
#define d(x) /*(printf("%s(%d): ", __FILE__, __LINE__),(x))*/
#include "camel-url.h"
#include "camel-private.h"
#include "camel-maildir-summary.h"
+#include "camel-i18n.h"
#define d(x)
#include "camel-private.h"
#include "e-util/e-memory.h"
+#include "camel-i18n.h"
#define d(x) /*(printf("%s(%d): ", __FILE__, __LINE__),(x))*/
if (info) {
d(printf("already seen uid '%s', just summarising instead\n", uid));
camel_folder_summary_info_free(s, mi);
- mdi = (CamelMaildirMessageInfo *)mi = info;
+ mdi = (CamelMaildirMessageInfo *)(mi = info);
}
/* with maildir we know the real received date, from the filename */
#include "camel-stream-filter.h"
#include "camel-mime-filter-from.h"
#include "camel-exception.h"
+#include "camel-i18n.h"
#define d(x) /*(printf("%s(%d): ", __FILE__, __LINE__),(x))*/
#include "camel-text-index.h"
#include "camel-exception.h"
#include "camel-url.h"
+#include "camel-i18n.h"
#define d(x)
#include "camel/camel-file-utils.h"
#include "camel/camel-mime-message.h"
#include "camel/camel-operation.h"
+#include "camel-i18n.h"
#define io(x)
#define d(x) /*(printf("%s(%d): ", __FILE__, __LINE__),(x))*/
if ((info->flags & CAMEL_MESSAGE_FOLDER_NOTSEEN)) {
info->flags &= ~CAMEL_MESSAGE_FOLDER_NOTSEEN;
camel_folder_summary_info_free(s, mi);
- mbi = (CamelMboxMessageInfo *)mi = info;
+ mbi = (CamelMboxMessageInfo *)(mi = info);
} else {
add = 7;
d(printf("seen '%s' before, adding anew\n", uid));
#include "camel-data-wrapper.h"
#include "camel-mime-message.h"
#include "camel-exception.h"
+#include "camel-i18n.h"
#define d(x) /*(printf("%s(%d): ", __FILE__, __LINE__),(x))*/
#include "camel-exception.h"
#include "camel-url.h"
#include "camel-private.h"
+#include "camel-i18n.h"
#include <camel/camel-stream-fs.h>
#include <camel/camel-stream-buffer.h>
#include <camel/camel-mime-message.h>
#include "camel-private.h"
+#include "camel-i18n.h"
#define d(x) /*(printf("%s(%d): ", __FILE__, __LINE__),(x))*/
#include "camel-stream-filter.h"
#include "camel-mime-filter-from.h"
#include "camel-exception.h"
-
#include "camel-lock-client.h"
-
#include "camel-local-private.h"
+#include "camel-i18n.h"
#define d(x) /*(printf("%s(%d): ", __FILE__, __LINE__),(x))*/
#include "camel-exception.h"
#include "camel-url.h"
#include "camel-private.h"
+#include "camel-i18n.h"
#define d(x)
#include "camel-mime-message.h"
#include "camel-file-utils.h"
#include "camel-operation.h"
+#include "camel-i18n.h"
#define io(x)
#define d(x) /*(printf("%s(%d): ", __FILE__, __LINE__),(x))*/
* USA
*/
-
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "camel/camel-multipart.h"
#include "camel/camel-mime-part.h"
#include "camel/camel-stream-buffer.h"
+#include "camel/camel-i18n.h"
#include "camel-nntp-summary.h"
#include "camel-nntp-store.h"
#include "camel-nntp-store.h"
#include "camel-provider.h"
#include "camel-session.h"
+#include "camel-i18n.h"
static void add_hash (guint *hash, char *s);
static guint nntp_url_hash (gconstpointer key);
"news",
CAMEL_PROVIDER_IS_REMOTE | CAMEL_PROVIDER_IS_SOURCE |
- CAMEL_PROVIDER_IS_STORAGE,
+ CAMEL_PROVIDER_IS_STORAGE | CAMEL_PROVIDER_SUPPORTS_SSL,
CAMEL_URL_NEED_HOST | CAMEL_URL_ALLOW_USER |
CAMEL_URL_ALLOW_PASSWORD | CAMEL_URL_ALLOW_AUTH,
* USA
*/
-
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "camel-nntp-folder.h"
#include "camel-nntp-private.h"
#include "camel-nntp-resp-codes.h"
+#include "camel-i18n.h"
#define w(x)
extern int camel_verbose_debug;
#include "camel/camel-stream-null.h"
#include "camel/camel-operation.h"
#include "camel/camel-data-cache.h"
+#include "camel/camel-i18n.h"
#include "camel-nntp-summary.h"
#include "camel-nntp-folder.h"
#include "camel-pop3-engine.h"
#include "camel-pop3-stream.h"
-#include <camel/camel-service.h>
-#include <camel/camel-sasl.h>
+#include "camel-service.h"
+#include "camel-sasl.h"
+#include "camel-i18n.h"
/* max 'outstanding' bytes in output stream, so we can't deadlock waiting
for the server to accept our data when pipelining */
get_capabilities(CamelPOP3Engine *pe)
{
CamelPOP3Command *pc;
- unsigned char *line;
- unsigned int len;
if (!(pe->flags & CAMEL_POP3_ENGINE_DISABLE_EXTENSIONS)) {
pc = camel_pop3_engine_command_new(pe, CAMEL_POP3_COMMAND_MULTI, cmd_capa, NULL, "CAPA\r\n");
#include "camel-mime-message.h"
#include "camel-operation.h"
#include "camel-data-cache.h"
+#include "camel-i18n.h"
#include <e-util/md5-utils.h>
#include "camel-session.h"
#include "camel-url.h"
#include "camel-sasl.h"
+#include "camel-i18n.h"
CamelProviderConfEntry pop3_conf_entries[] = {
- { CAMEL_PROVIDER_CONF_SECTION_START, NULL, NULL,
+ { CAMEL_PROVIDER_CONF_SECTION_START, "storage", NULL,
N_("Message storage") },
{ CAMEL_PROVIDER_CONF_CHECKBOX, "keep_on_server", NULL,
N_("Leave messages on server"), "0" },
#ifdef HAVE_SSL
#include "camel-tcp-stream-ssl.h"
#endif
+#include "camel-i18n.h"
/* Specified in RFC 1939 */
#define POP3_PORT 110
#include "camel-sendmail-transport.h"
#include "camel-session.h"
#include "camel-url.h"
+#include "camel-i18n.h"
static CamelProvider sendmail_provider = {
"sendmail",
#include "camel-data-wrapper.h"
#include "camel-stream-fs.h"
#include "camel-exception.h"
+#include "camel-i18n.h"
static char *get_name (CamelService *service, gboolean brief);
#include "camel-session.h"
#include "camel-url.h"
#include "camel-sasl.h"
+#include "camel-i18n.h"
static CamelProvider smtp_provider = {
"smtp",
#include "camel-session.h"
#include "camel-exception.h"
#include "camel-sasl.h"
-
+#include "camel-i18n.h"
extern int camel_verbose_debug;
#define d(x) (camel_verbose_debug ? (x) : 0)