[dovecot-cvs] dovecot/src/lib-charset charset-iconv.c,1.15,1.16
cras at procontrol.fi
cras at procontrol.fi
Mon May 10 03:59:29 EEST 2004
Update of /home/cvs/dovecot/src/lib-charset
In directory talvi:/tmp/cvs-serv30920
Modified Files:
charset-iconv.c
Log Message:
iconv_t isn't necessarily pointer.
Index: charset-iconv.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib-charset/charset-iconv.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- charset-iconv.c 15 May 2003 19:22:22 -0000 1.15
+++ charset-iconv.c 10 May 2004 00:59:27 -0000 1.16
@@ -26,11 +26,11 @@
if (strcasecmp(charset, "us-ascii") == 0 ||
strcasecmp(charset, "ascii") == 0) {
- cd = NULL;
+ cd = (iconv_t)-1;
ascii = TRUE;
} else if (strcasecmp(charset, "UTF-8") == 0 ||
strcasecmp(charset, "UTF8") == 0) {
- cd = NULL;
+ cd = (iconv_t)-1;
ascii = FALSE;
} else {
ascii = FALSE;
@@ -50,14 +50,14 @@
void charset_to_utf8_end(struct charset_translation *t)
{
- if (t->cd != NULL)
+ if (t->cd != (iconv_t)-1)
iconv_close(t->cd);
i_free(t);
}
void charset_to_utf8_reset(struct charset_translation *t)
{
- if (t->cd != NULL)
+ if (t->cd != (iconv_t)-1)
(void)iconv(t->cd, NULL, NULL, NULL, NULL);
}
@@ -74,7 +74,7 @@
destpos = buffer_get_used_size(dest);
destleft = buffer_get_size(dest) - destpos;
- if (t->cd == NULL) {
+ if (t->cd == (iconv_t)-1) {
/* no translation needed - just copy it to outbuf uppercased */
if (*src_size > destleft)
*src_size = destleft;
More information about the dovecot-cvs
mailing list