projects
/
apps
/
madmutt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
and more.
[apps/madmutt.git]
/
charset.c
diff --git
a/charset.c
b/charset.c
index
761be88
..
ba6b422
100644
(file)
--- a/
charset.c
+++ b/
charset.c
@@
-336,7
+336,7
@@
size_t mutt_iconv (iconv_t cd, const char **inbuf, size_t * inbytesleft,
outrepl = "?";
my_iconv(cd, 0, 0, &ob, &obl);
if (obl) {
outrepl = "?";
my_iconv(cd, 0, 0, &ob, &obl);
if (obl) {
-
in
t n = m_strlen(outrepl);
+
size_
t n = m_strlen(outrepl);
if (n > obl) {
outrepl = "?";
if (n > obl) {
outrepl = "?";
@@
-399,8
+399,6
@@
int mutt_convert_string (char **ps, const char *from, const char *to,
p_delete(ps);
*ps = buf;
p_delete(ps);
*ps = buf;
-
- str_adjust (ps);
return 0;
}
else
return 0;
}
else
@@
-448,7
+446,7
@@
FGETCONV *fgetconv_open (FILE * file, const char *from, const char *to,
fc->inrepls = mutt_is_utf8 (to) ? repls : repls + 1;
}
else
fc->inrepls = mutt_is_utf8 (to) ? repls : repls + 1;
}
else
- fc = p_new(struct fgetconv_
not
, 1);
+ fc = p_new(struct fgetconv_
s
, 1);
fc->file = file;
fc->cd = cd;
return (FGETCONV *) fc;
fc->file = file;
fc->cd = cd;
return (FGETCONV *) fc;
@@
-556,7
+554,8
@@
static size_t convert_string (const char *f, size_t flen,
{
iconv_t cd;
char *buf, *ob;
{
iconv_t cd;
char *buf, *ob;
- size_t obl, n;
+ size_t obl;
+ ssize_t n;
int e;
cd = mutt_iconv_open (to, from, 0);
int e;
cd = mutt_iconv_open (to, from, 0);
@@
-565,7
+564,7
@@
static size_t convert_string (const char *f, size_t flen,
obl = 4 * flen + 1;
ob = buf = xmalloc(obl);
n = my_iconv(cd, &f, &flen, &ob, &obl);
obl = 4 * flen + 1;
ob = buf = xmalloc(obl);
n = my_iconv(cd, &f, &flen, &ob, &obl);
- if (n
== (size_t) (-1) || my_iconv(cd, 0, 0, &ob, &obl) == (size_t) (-1)
) {
+ if (n
< 0 || my_iconv(cd, 0, 0, &ob, &obl) < 0
) {
e = errno;
p_delete(&buf);
iconv_close (cd);
e = errno;
p_delete(&buf);
iconv_close (cd);