static void transform_to_7bit (BODY * a, FILE * fpin);
-static void encode_quoted (FGETCONV * fc, FILE * fout, int istext)
+static void encode_quoted (fgetconv_t * fc, FILE * fout, int istext)
{
int c, linelen = 0;
char line[77], savechar;
}
-static void encode_base64 (FGETCONV * fc, FILE * fout, int istext)
+static void encode_base64 (fgetconv_t * fc, FILE * fout, int istext)
{
int ch, ch1 = EOF;
fputc ('\n', fout);
}
-static void encode_8bit (FGETCONV * fc, FILE * fout, int istext)
+static void encode_8bit (fgetconv_t * fc, FILE * fout, int istext)
{
int ch;
char send_charset[SHORT_STRING];
FILE *fpin;
BODY *t;
- FGETCONV *fc;
+ fgetconv_t *fc;
if (a->type == TYPEMULTIPART) {
/* First, find the boundary to use */
ssize_t *score;
cd1 = mutt_iconv_open ("UTF-8", fromcode, 0);
- if (cd1 == (iconv_t) (-1))
+ if (cd1 == MUTT_ICONV_ERROR)
return -1;
cd = p_new(iconv_t, ncodes);
cd[i] = mutt_iconv_open (tocodes[i], "UTF-8", 0);
else
/* Special case for conversion to UTF-8 */
- cd[i] = (iconv_t) (-1), score[i] = -1;
+ cd[i] = MUTT_ICONV_ERROR, score[i] = -1;
rewind (file);
ibl = 0;
/* Convert from UTF-8 */
for (i = 0; i < ncodes; i++)
- if (cd[i] != (iconv_t) (-1) && score[i] != -1) {
+ if (cd[i] != MUTT_ICONV_ERROR && score[i] != -1) {
ub = bufu, ubl = ubl1;
ob = bufo, obl = sizeof (bufo);
n = my_iconv(cd[i], (ibl || ubl) ? &ub : 0, &ubl, &ob, &obl);
update_content_info (&infos[i], &states[i], bufo, ob - bufo);
}
}
- else if (cd[i] == (iconv_t) (-1) && score[i] == -1)
+ else if (cd[i] == MUTT_ICONV_ERROR && score[i] == -1)
/* Special case for conversion to UTF-8 */
update_content_info (&infos[i], &states[i], bufu, ubl1);
/* Find best score */
ret = -1;
for (i = 0; i < ncodes; i++) {
- if (cd[i] == (iconv_t) (-1) && score[i] == -1) {
+ if (cd[i] == MUTT_ICONV_ERROR && score[i] == -1) {
/* Special case for conversion to UTF-8 */
*tocode = i;
ret = 0;
break;
}
- else if (cd[i] == (iconv_t) (-1) || score[i] == -1)
+ else if (cd[i] == MUTT_ICONV_ERROR || score[i] == -1)
continue;
else if (ret == -1 || score[i] < ret) {
*tocode = i;
}
for (i = 0; i < ncodes; i++)
- if (cd[i] != (iconv_t) (-1))
+ if (cd[i] != MUTT_ICONV_ERROR)
iconv_close (cd[i]);
iconv_close (cd1);
convert_file_from_to (fp, fchs, chs ? chs : SendCharset,
&fromcode, &tocode, info) != -1) {
if (!chs) {
- mutt_canonical_charset (chsbuf, sizeof (chsbuf), tocode);
+ charset_canonicalize (chsbuf, sizeof (chsbuf), tocode);
mutt_set_parameter ("charset", chsbuf, &b->parameter);
}
b->file_charset = fromcode;
p = mutt_get_parameter ("charset", b->parameter);
if (p)
- mutt_canonical_charset (d, dlen, NONULL (p));
+ charset_canonicalize (d, dlen, NONULL (p));
else
m_strcpy(d, dlen, "us-ascii");