projects
/
apps
/
madmutt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Rocco Rutte:
[apps/madmutt.git]
/
charset.c
diff --git
a/charset.c
b/charset.c
index
0a9339f
..
fbf8a69
100644
(file)
--- a/
charset.c
+++ b/
charset.c
@@
-25,6
+25,10
@@
#include "mutt.h"
#include "charset.h"
#include "mutt.h"
#include "charset.h"
+#include "lib/mem.h"
+#include "lib/intl.h"
+#include "lib/str.h"
+
#ifndef EILSEQ
# define EILSEQ EINVAL
#endif
#ifndef EILSEQ
# define EILSEQ EINVAL
#endif
@@
-224,7
+228,7
@@
void mutt_canonical_charset (char *dest, size_t dlen, const char *name)
for (i = 0; PreferredMIMENames[i].key; i++)
if (!ascii_strcasecmp (scratch, PreferredMIMENames[i].key) ||
for (i = 0; PreferredMIMENames[i].key; i++)
if (!ascii_strcasecmp (scratch, PreferredMIMENames[i].key) ||
- !
mutt
_strcasecmp (scratch, PreferredMIMENames[i].key)) {
+ !
safe
_strcasecmp (scratch, PreferredMIMENames[i].key)) {
strfcpy (dest, PreferredMIMENames[i].pref, dlen);
return;
}
strfcpy (dest, PreferredMIMENames[i].pref, dlen);
return;
}
@@
-331,7
+335,7
@@
size_t mutt_iconv (iconv_t cd, ICONV_CONST char **inbuf, size_t * inbytesleft,
for (t = inrepls; *t; t++) {
ICONV_CONST char *ib1 = *t;
for (t = inrepls; *t; t++) {
ICONV_CONST char *ib1 = *t;
- size_t ibl1 = strlen (*t);
+ size_t ibl1 =
mutt_
strlen (*t);
char *ob1 = ob;
size_t obl1 = obl;
char *ob1 = ob;
size_t obl1 = obl;
@@
-351,7
+355,7
@@
size_t mutt_iconv (iconv_t cd, ICONV_CONST char **inbuf, size_t * inbytesleft,
outrepl = "?";
iconv (cd, 0, 0, &ob, &obl);
if (obl) {
outrepl = "?";
iconv (cd, 0, 0, &ob, &obl);
if (obl) {
- int n = strlen (outrepl);
+ int n =
mutt_
strlen (outrepl);
if (n > obl) {
outrepl = "?";
if (n > obl) {
outrepl = "?";
@@
-402,7
+406,7
@@
int mutt_convert_string (char **ps, const char *from, const char *to,
else
outrepl = "?";
else
outrepl = "?";
- len = strlen (s);
+ len =
mutt_
strlen (s);
ib = s, ibl = len + 1;
obl = MB_LEN_MAX * ibl;
ob = buf = safe_malloc (obl + 1);
ib = s, ibl = len + 1;
obl = MB_LEN_MAX * ibl;
ob = buf = safe_malloc (obl + 1);
@@
-415,7
+419,7
@@
int mutt_convert_string (char **ps, const char *from, const char *to,
FREE (ps);
*ps = buf;
FREE (ps);
*ps = buf;
-
mutt_
str_adjust (ps);
+ str_adjust (ps);
return 0;
}
else
return 0;
}
else