[dovecot-cvs] dovecot/src/lib strfuncs.c,1.28,1.29 strfuncs.h,1.16,1.17

cras at procontrol.fi cras at procontrol.fi
Mon Jan 20 16:52:53 EET 2003


Update of /home/cvs/dovecot/src/lib
In directory danu:/tmp/cvs-serv7093/lib

Modified Files:
	strfuncs.c strfuncs.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: strfuncs.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib/strfuncs.c,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -d -r1.28 -r1.29
--- strfuncs.c	5 Jan 2003 13:09:51 -0000	1.28
+++ strfuncs.c	20 Jan 2003 14:52:51 -0000	1.29
@@ -462,6 +462,16 @@
         return str;
 }
 
+int null_strcmp(const char *s1, const char *s2)
+{
+	if (s1 == NULL)
+		return s2 == NULL ? 0 : -1;
+	if (s2 == NULL)
+		return 1;
+
+	return strcmp(s1, s1);
+}
+
 int memcasecmp(const void *p1, const void *p2, size_t size)
 {
 	const unsigned char *s1 = p1;

Index: strfuncs.h
===================================================================
RCS file: /home/cvs/dovecot/src/lib/strfuncs.h,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- strfuncs.h	5 Jan 2003 13:09:51 -0000	1.16
+++ strfuncs.h	20 Jan 2003 14:52:51 -0000	1.17
@@ -51,6 +51,7 @@
 char *str_ucase(char *str);
 char *str_lcase(char *str);
 
+int null_strcmp(const char *s1, const char *s2);
 int memcasecmp(const void *p1, const void *p2, size_t size);
 
 /* seprators is an array of separator characters, not a separator string. */




More information about the dovecot-cvs mailing list