projects
/
apps
/
madmutt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
mutt_FormatString -> m_strformat (will soon end up into the str lib \o/)
[apps/madmutt.git]
/
imap
/
utf7.c
diff --git
a/imap/utf7.c
b/imap/utf7.c
index
e2b3340
..
b21149b
100644
(file)
--- a/
imap/utf7.c
+++ b/
imap/utf7.c
@@
-7,11
+7,7
@@
* please see the file GPL in the top level source directory.
*/
* please see the file GPL in the top level source directory.
*/
-#if HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include <lib-lib/mem.h>
+#include <lib-lib/lib-lib.h>
#include "mutt.h"
#include "charset.h"
#include "mutt.h"
#include "charset.h"
@@
-111,8
+107,8
@@
bail:
* Unicode characters above U+FFFF are replaced by U+FFFE.
* If input data is invalid, return 0 and don't store anything.
*/
* Unicode characters above U+FFFF are replaced by U+FFFE.
* If input data is invalid, return 0 and don't store anything.
*/
-static char *utf8_to_utf7 (const char *u8, size_t u8len, char **u7,
- size_t * u7len)
+static char *utf8_to_utf7 (const char *u8, s
s
ize_t u8len, char **u7,
+ s
s
ize_t * u7len)
{
char *buf, *p;
int ch;
{
char *buf, *p;
int ch;
@@
-215,7
+211,7
@@
void imap_utf7_encode (char **s)
if (Charset) {
char *t = m_strdup(*s);
if (Charset) {
char *t = m_strdup(*s);
- if (!mutt_convert_string (&t, Charset, "
UTF
-8", 0)) {
+ if (!mutt_convert_string (&t, Charset, "
utf
-8", 0)) {
char *u7 = utf8_to_utf7 (t, strlen (t), NULL, 0);
p_delete(s);
*s = u7;
char *u7 = utf8_to_utf7 (t, strlen (t), NULL, 0);
p_delete(s);
*s = u7;
@@
-229,7
+225,7
@@
void imap_utf7_decode (char **s)
if (Charset) {
char *t = utf7_to_utf8 (*s, m_strlen(*s), 0, 0);
if (Charset) {
char *t = utf7_to_utf8 (*s, m_strlen(*s), 0, 0);
- if (t && !mutt_convert_string (&t, "
UTF
-8", Charset, 0)) {
+ if (t && !mutt_convert_string (&t, "
utf
-8", Charset, 0)) {
p_delete(s);
*s = t;
}
p_delete(s);
*s = t;
}