projects
/
apps
/
madmutt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix compilation warnings in hook.c
[apps/madmutt.git]
/
charset.c
diff --git
a/charset.c
b/charset.c
index
32317b1
..
11441e4
100644
(file)
--- a/
charset.c
+++ b/
charset.c
@@
-27,7
+27,6
@@
#include <lib-lib/lib-lib.h>
#include <lib-lib/lib-lib.h>
-#include <sys/types.h>
#ifdef HAVE_LANGINFO_CODESET
# include <langinfo.h>
#endif
#ifdef HAVE_LANGINFO_CODESET
# include <langinfo.h>
#endif
@@
-51,8
+50,8
@@
wchar_t CharsetReplacement = '?';
void charset_initialize(void)
{
#ifdef HAVE_LANGINFO_CODESET
void charset_initialize(void)
{
#ifdef HAVE_LANGINFO_CODESET
- char buff[S
HORT_S
TRING];
- char buff2[S
HORT_S
TRING];
+ char buff[STRING];
+ char buff2[STRING];
m_strcpy(buff, sizeof(buff), nl_langinfo(CODESET));
charset_canonicalize(buff2, sizeof(buff2), buff);
m_strcpy(buff, sizeof(buff), nl_langinfo(CODESET));
charset_canonicalize(buff2, sizeof(buff2), buff);
@@
-66,7
+65,7
@@
void charset_initialize(void)
m_strreplace(&Charset, "iso-8859-1");
}
m_strreplace(&Charset, "iso-8859-1");
}
- Charset_is_utf8 = !strcmp(Charset, "utf-8");
+ Charset_is_utf8 = !
m_
strcmp(Charset, "utf-8");
CharsetReplacement = Charset_is_utf8 ? 0xfffd : '?';
#ifdef HAVE_BIND_TEXTDOMAIN_CODESET
CharsetReplacement = Charset_is_utf8 ? 0xfffd : '?';
#ifdef HAVE_BIND_TEXTDOMAIN_CODESET
@@
-78,7
+77,7
@@
void charset_initialize(void)
void charset_canonicalize(char *dest, ssize_t dlen, const char *name)
{
const struct cset_pair *cp;
void charset_canonicalize(char *dest, ssize_t dlen, const char *name)
{
const struct cset_pair *cp;
- char scratch[S
HORT_S
TRING];
+ char scratch[STRING];
const char *p;
int i = 0;
const char *p;
int i = 0;
@@
-107,7
+106,7
@@
void charset_canonicalize(char *dest, ssize_t dlen, const char *name)
/* XXX: MC: UGLY return of local static */
const char *charset_getfirst(const char *charset)
{
/* XXX: MC: UGLY return of local static */
const char *charset_getfirst(const char *charset)
{
- static char fcharset[S
HORT_S
TRING];
+ static char fcharset[STRING];
const char *p;
if (m_strisempty(charset))
const char *p;
if (m_strisempty(charset))
@@
-120,16
+119,16
@@
const char *charset_getfirst(const char *charset)
int charset_is_utf8(const char *s)
{
int charset_is_utf8(const char *s)
{
- char buf[S
HORT_S
TRING];
+ char buf[STRING];
charset_canonicalize(buf, sizeof(buf), s);
charset_canonicalize(buf, sizeof(buf), s);
- return !strcmp(buf, "utf-8");
+ return !
m_
strcmp(buf, "utf-8");
}
int charset_is_us_ascii(const char *s)
{
}
int charset_is_us_ascii(const char *s)
{
- char buf[S
HORT_S
TRING];
+ char buf[STRING];
charset_canonicalize(buf, sizeof(buf), s);
charset_canonicalize(buf, sizeof(buf), s);
- return !strcmp(buf, "us-ascii");
+ return !
m_
strcmp(buf, "us-ascii");
}
}
@@
-140,8
+139,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 tocode1[S
HORT_S
TRING];
- char fromcode1[S
HORT_S
TRING];
+ char tocode1[STRING];
+ char fromcode1[STRING];
const char *tmp;
iconv_t cd;
const char *tmp;
iconv_t cd;