[dovecot-cvs] dovecot/src/lib-imap Makefile.am,1.5,1.6 imap-envelope.c,1.21,1.22 imap-message-cache.c,1.35,NONE imap-message-cache.h,1.14,NONE
cras at procontrol.fi
cras at procontrol.fi
Mon Jan 20 16:52:53 EET 2003
Update of /home/cvs/dovecot/src/lib-imap
In directory danu:/tmp/cvs-serv7093/lib-imap
Modified Files:
Makefile.am imap-envelope.c
Removed Files:
imap-message-cache.c imap-message-cache.h
Log Message:
mail-storage.h interface changes, affects pretty much everything.
FETCH, SEARCH, SORT and THREAD handling were pretty much moved from
lib-storage/ to imap/ so adding non-index storages would be much easier now.
Also POP3 server can now be easily implemented with lib-storage.
Not too well tested, and at least one major problem: partial fetching is
_slow_.
Index: Makefile.am
===================================================================
RCS file: /home/cvs/dovecot/src/lib-imap/Makefile.am,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- Makefile.am 17 Dec 2002 04:28:41 -0000 1.5
+++ Makefile.am 20 Jan 2003 14:52:51 -0000 1.6
@@ -11,7 +11,6 @@
imap-date.c \
imap-envelope.c \
imap-match.c \
- imap-message-cache.c \
imap-quote.c \
imap-parser.c \
imap-util.c
@@ -22,7 +21,6 @@
imap-date.h \
imap-envelope.h \
imap-match.h \
- imap-message-cache.h \
imap-quote.h \
imap-parser.h \
imap-util.h
Index: imap-envelope.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib-imap/imap-envelope.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- imap-envelope.c 5 Jan 2003 13:09:52 -0000 1.21
+++ imap-envelope.c 20 Jan 2003 14:52:51 -0000 1.22
@@ -35,25 +35,31 @@
switch (name_len) {
case 2:
- if (memcasecmp(name, "To", 2) == 0 && d->to == NULL)
- d->to = message_address_parse(pool, value, value_len);
- else if (memcasecmp(name, "Cc", 2) == 0 && d->cc == NULL)
- d->cc = message_address_parse(pool, value, value_len);
+ if (memcasecmp(name, "To", 2) == 0 && d->to == NULL) {
+ d->to = message_address_parse(pool, value,
+ value_len, 0);
+ } else if (memcasecmp(name, "Cc", 2) == 0 && d->cc == NULL) {
+ d->cc = message_address_parse(pool, value,
+ value_len, 0);
+ }
break;
case 3:
- if (memcasecmp(name, "Bcc", 3) == 0 && d->bcc == NULL)
- d->bcc = message_address_parse(pool, value, value_len);
+ if (memcasecmp(name, "Bcc", 3) == 0 && d->bcc == NULL) {
+ d->bcc = message_address_parse(pool, value,
+ value_len, 0);
+ }
break;
case 4:
- if (memcasecmp(name, "From", 4) == 0 && d->from == NULL)
- d->from = message_address_parse(pool, value, value_len);
- else if (memcasecmp(name, "Date", 4) == 0 && d->date == NULL)
+ if (memcasecmp(name, "From", 4) == 0 && d->from == NULL) {
+ d->from = message_address_parse(pool, value,
+ value_len, 0);
+ } else if (memcasecmp(name, "Date", 4) == 0 && d->date == NULL)
d->date = imap_quote_value(pool, value, value_len);
break;
case 6:
if (memcasecmp(name, "Sender", 6) == 0 && d->sender == NULL) {
d->sender = message_address_parse(pool, value,
- value_len);
+ value_len, 0);
}
break;
case 7:
@@ -63,8 +69,8 @@
case 8:
if (memcasecmp(name, "Reply-To", 8) == 0 &&
d->reply_to == NULL) {
- d->reply_to =
- message_address_parse(pool, value, value_len);
+ d->reply_to = message_address_parse(pool, value,
+ value_len, 0);
}
break;
case 10:
@@ -171,47 +177,55 @@
return FALSE;
}
+ if (*in_group && args[0] == NULL && args[1] == NULL &&
+ args[2] == NULL && args[3] == NULL) {
+ /* end of group */
+ str_append_c(str, ';');
+ *in_group = FALSE;
+ return TRUE;
+ }
+
if (str_len(str) > 0)
str_append(str, ", ");
- if (*in_group) {
- if (args[0] == NULL && args[1] == NULL &&
- args[2] == NULL && args[3] == NULL) {
- /* end of group */
- str_append_c(str, ';');
- *in_group = FALSE;
- return TRUE;
+ if (!*in_group && args[0] == NULL && args[1] == NULL &&
+ args[2] != NULL && args[3] == NULL) {
+ /* beginning of group */
+ str_append(str, args[2]);
+ str_append(str, ": ");
+ *in_group = TRUE;
+ return TRUE;
+ }
+
+ /* a) mailbox at domain
+ b) name <@route:mailbox at domain> */
+ if (args[0] == NULL && args[1] == NULL) {
+ if (args[2] != NULL)
+ str_append(str, args[2]);
+ if (args[3] != NULL) {
+ str_append_c(str, '@');
+ str_append(str, args[3]);
}
} else {
- if (args[0] == NULL && args[1] == NULL &&
- args[2] != NULL && args[3] == NULL) {
- /* beginning of group */
- str_append(str, args[2]);
- str_append(str, ": ");
- *in_group = TRUE;
- return TRUE;
+ if (args[0] != NULL) {
+ str_append(str, args[0]);
+ str_append_c(str, ' ');
}
- }
-
- /* name <@route:mailbox at domain> */
- if (args[0] != NULL) {
- str_append(str, args[0]);
- str_append_c(str, ' ');
- }
- str_append_c(str, '<');
- if (args[1] != NULL) {
- str_append_c(str, '@');
- str_append(str, args[1]);
- str_append_c(str, ':');
- }
- if (args[2] != NULL)
- str_append(str, args[2]);
- if (args[3] != NULL) {
- str_append_c(str, '@');
- str_append(str, args[3]);
+ str_append_c(str, '<');
+ if (args[1] != NULL) {
+ str_append_c(str, '@');
+ str_append(str, args[1]);
+ str_append_c(str, ':');
+ }
+ if (args[2] != NULL)
+ str_append(str, args[2]);
+ if (args[3] != NULL) {
+ str_append_c(str, '@');
+ str_append(str, args[3]);
+ }
+ str_append_c(str, '>');
}
- str_append_c(str, '>');
return TRUE;
}
--- imap-message-cache.c DELETED ---
--- imap-message-cache.h DELETED ---
More information about the dovecot-cvs
mailing list