#include "exim.h"
-#ifdef EXPERIMENTAL_INTERNATIONAL
+#ifdef SUPPORT_I18N
uschar *
imap_utf7_encode(uschar *string, const uschar *charset, uschar sep,
errno == EINVAL ? " (maybe unsupported conversion)" : "");
return NULL;
}
-#endif
+#endif
while (slen > 0)
{
return NULL;
}
#else
- for (utf16ptr = utf16buf;
+ for (utf16ptr = utf16buf;
slen > 0 && (utf16ptr - utf16buf) < sizeof(utf16buf);
utf16ptr += 2, slen--, sptr++)
{
{
lastsep = FALSE;
/* Encode as modified BASE64 */
- if (!base64mode)
+ if (!base64mode)
{
*outptr++ = '&';
base64mode = TRUE;
i = 0;
}
- for (j = 0; j < 2; j++, s++) switch (i++)
+ for (j = 0; j < 2; j++, s++) switch (i++)
{
case 0:
/* Top 6 bits of the first octet */
/* Encode as self (almost) */
if (base64mode)
{
- switch (i)
+ switch (i)
{
case 1:
/* Remaining bottom 2 bits of the last octet */
else
{
*error = string_sprintf("imapfolder: illegal character '%c'", s[1]);
- if (yield) store_reset(yield);
return NULL;
}
if (outptr > outbuf + sizeof(outbuf) - 3)
{
- yield = string_cat(yield, &size, &ptr, outbuf, outptr - outbuf);
+ yield = string_catn(yield, &size, &ptr, outbuf, outptr - outbuf);
outptr = outbuf;
}
}
- } /* End of input string */
+ } /* End of input string */
-if (base64mode)
+if (base64mode)
{
- switch (i)
+ switch (i)
{
case 1:
/* Remaining bottom 2 bits of the last octet */
iconv_close(icd);
#endif
-yield = string_cat(yield, &size, &ptr, outbuf, outptr - outbuf);
+yield = string_catn(yield, &size, &ptr, outbuf, outptr - outbuf);
if (yield[ptr-1] == '.')
ptr--;
yield[ptr] = '\0';