projects
/
apps
/
madmutt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
leftover
[apps/madmutt.git]
/
charset.cpkg
diff --git
a/charset.cpkg
b/charset.cpkg
index
f491e05
..
0056160
100644
(file)
--- a/
charset.cpkg
+++ b/
charset.cpkg
@@
-27,7
+27,7
@@
#include <lib-lib/lib-lib.h>
#include <lib-lib/lib-lib.h>
-#ifdef HAVE_LANGINFO_
CODESET
+#ifdef HAVE_LANGINFO_
H
# include <langinfo.h>
#endif
# include <langinfo.h>
#endif
@@
-47,7
+47,7
@@
static rx_t *iconv_hooks = NULL;
static char *charset_init(void)
{
const char *res = "iso-8859-1";
static char *charset_init(void)
{
const char *res = "iso-8859-1";
-#ifdef HAVE_LANGINFO_
CODESET
+#ifdef HAVE_LANGINFO_
H
char buff[STRING];
char buff2[STRING];
char buff[STRING];
char buff2[STRING];
@@
-59,7
+59,7
@@
static char *charset_init(void)
res = buff2;
}
#endif
res = buff2;
}
#endif
-#ifdef
HAVE_BIND_TEXTDOMAIN_CODESET
+#ifdef
ENABLE_NLS
bind_textdomain_codeset(PACKAGE, res);
#endif
return m_strdup(res);
bind_textdomain_codeset(PACKAGE, res);
#endif
return m_strdup(res);
@@
-128,13
+128,13
@@
static void charset_onchange(const char *cset)
void charset_hook(rx_t local, const string_t alias) {
rx_set_template(local, alias);
void charset_hook(rx_t local, const string_t alias) {
rx_set_template(local, alias);
- rx_list_a
ppend(&charset_hooks,
local);
+ rx_list_a
dd2(&charset_hooks, &
local);
RETURN();
};
void iconv_hook(rx_t local, const string_t alias) {
rx_set_template(local, alias);
RETURN();
};
void iconv_hook(rx_t local, const string_t alias) {
rx_set_template(local, alias);
- rx_list_a
ppend(&iconv_hooks,
local);
+ rx_list_a
dd2(&iconv_hooks, &
local);
RETURN();
};
};
RETURN();
};
};
@@
-209,8
+209,8
@@
int charset_is_us_ascii(const char *s)
/* Like iconv_open, but canonicalises the charsets */
iconv_t mutt_iconv_open(const char *tocode, const char *fromcode, int flags)
{
/* Like iconv_open, but canonicalises the charsets */
iconv_t mutt_iconv_open(const char *tocode, const char *fromcode, int flags)
{
- char to1[STRING];
- char from1[STRING];
+ char to1[STRING]
, to2[STRING]
;
+ char from1[STRING]
, from2[STRING]
;
char tmp[STRING];
iconv_t cd;
char tmp[STRING];
iconv_t cd;
@@
-231,14
+231,10
@@
iconv_t mutt_iconv_open(const char *tocode, const char *fromcode, int flags)
if ((cd = iconv_open(to1, from1)) != MUTT_ICONV_ERROR)
return cd;
if ((cd = iconv_open(to1, from1)) != MUTT_ICONV_ERROR)
return cd;
- {
- char to2[STRING];
-
char from2[STRING]
;
+ if (rx_list_match2(iconv_hooks, to1, to2, sizeof(to2))
+ && rx_list_match2(iconv_hooks, from1, from2, sizeof(from2)))
+
return iconv_open(to2, from2)
;
- if (rx_list_match2(iconv_hooks, to1, to2, sizeof(to2))
- && rx_list_match2(iconv_hooks, from1, from2, sizeof(from2)))
- return iconv_open(to2, from2);
- }
return MUTT_ICONV_ERROR;
}
return MUTT_ICONV_ERROR;
}