[dovecot-cvs] dovecot/src/lib-storage/index/maildir maildir-mail.c, 1.16, 1.17 maildir-storage.h, 1.38, 1.39

cras at dovecot.org cras at dovecot.org
Thu Jun 9 17:43:09 EEST 2005


Update of /var/lib/cvs/dovecot/src/lib-storage/index/maildir
In directory talvi:/tmp/cvs-serv1744

Modified Files:
	maildir-mail.c maildir-storage.h 
Log Message:
Use macros when using W and S extras too.



Index: maildir-mail.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/maildir/maildir-mail.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- maildir-mail.c	9 Jun 2005 14:31:43 -0000	1.16
+++ maildir-mail.c	9 Jun 2005 14:43:07 -0000	1.17
@@ -129,7 +129,7 @@
 		return (uoff_t)-1;
 
 	/* size can be included in filename */
-	p = strstr(fname, MAILDIR_EXTRA_SEP_S"W=");
+	p = strstr(fname, MAILDIR_EXTRA_SEP_S MAILDIR_EXTRA_VIRTUAL_SIZE "=");
 	if (p != NULL) {
 		p += 3;
 		virtual_size = 0;
@@ -188,7 +188,7 @@
 		return (uoff_t)-1;
 
 	/* size can be included in filename */
-	p = strstr(fname, MAILDIR_EXTRA_SEP_S"S=");
+	p = strstr(fname, MAILDIR_EXTRA_SEP_S MAILDIR_EXTRA_FILE_SIZE "=");
 	if (p != NULL) {
 		p += 3;
 		size = 0;

Index: maildir-storage.h
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/maildir/maildir-storage.h,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -d -r1.38 -r1.39
--- maildir-storage.h	9 Jun 2005 14:31:43 -0000	1.38
+++ maildir-storage.h	9 Jun 2005 14:43:07 -0000	1.39
@@ -21,6 +21,12 @@
 /* ":2," is the standard flags separator */
 #define MAILDIR_FLAGS_FULL_SEP MAILDIR_INFO_SEP_S "2" MAILDIR_FLAGS_SEP_S
 
+/* Maildir++ extension: include file size in the filename to avoid stat() */
+#define MAILDIR_EXTRA_FILE_SIZE "S"
+/* Something (can't remember what anymore) could use 'W' in filename to avoid
+   calculating file's virtual size (added missing CRs). */
+#define MAILDIR_EXTRA_VIRTUAL_SIZE "W"
+
 #include "index-storage.h"
 
 #define STORAGE(maildir_storage) \



More information about the dovecot-cvs mailing list