*
* Utility functions for the IMAP module.
*
- * Note: most of the UTF7 and UTF8 handling in here was lifted from Evolution.
+ * Copyright (c) 2001-2009 by the citadel.org team and others, except for
+ * most of the UTF7 and UTF8 handling code which was lifted from Evolution.
*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * 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
*/
#include <stdlib.h>
#include "room_ops.h"
#include "internet_addressing.h"
#include "imap_tools.h"
-
+#include "ctdl_module.h"
#ifndef HAVE_SNPRINTF
#include "snprintf.h"
/* String handling helpers */
-/* This code uses some pretty narsty string manipulation. To make everything
+/* This code uses some pretty nasty string manipulation. To make everything
* manageable, we use this semi-high-level string manipulation API. Strings are
- * always \0-terminated, despite the fact that we keep track of the size. */
-
+ * always \0-terminated, despite the fact that we keep track of the size.
+ */
struct string {
char* buffer;
int maxsize;
*destp = 0;
string_init(&dest, destp, destend-destp);
- /* lprintf(CTDL_DEBUG, "toimap %s\r\n", src); */
+ /* CtdlLogPrintf(CTDL_DEBUG, "toimap %s\r\n", src); */
for (;;)
{
if (state == 1)
utf7_closeb64(&dest, v, i);
- /* lprintf(CTDL_DEBUG, " -> %s\r\n", destp); */
+ /* CtdlLogPrintf(CTDL_DEBUG, " -> %s\r\n", destp); */
return string_end(&dest);
}
*destp = 0;
string_init(&dest, destp, destend-destp);
- /* lprintf(CTDL_DEBUG, "fromimap %s\r\n", src); */
+ /* CtdlLogPrintf(CTDL_DEBUG, "fromimap %s\r\n", src); */
do {
c = *p++;
}
} while (c != '\0');
- /* lprintf(CTDL_DEBUG, " -> %s\r\n", destp); */
+ /* CtdlLogPrintf(CTDL_DEBUG, " -> %s\r\n", destp); */
return string_end(&dest);
}
ret = (0 | IR_MAILBOX);
exit:
- lprintf(CTDL_DEBUG, "(That translates to \"%s\")\n", rbuf);
+ CtdlLogPrintf(CTDL_DEBUG, "(That translates to \"%s\")\n", rbuf);
return(ret);
}