projects
/
apps
/
madmutt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
no more SHORT_STRING's. begin some doc.
[apps/madmutt.git]
/
charset.c
diff --git
a/charset.c
b/charset.c
index
8e79d13
..
89d5d74
100644
(file)
--- a/
charset.c
+++ b/
charset.c
@@
-25,26
+25,12
@@
* 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 <string.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-#include <ctype.h>
+#include <lib-lib/lib-lib.h>
-#include <sys/types.h>
-#include <dirent.h>
-#include <unistd.h>
-#include <errno.h>
#ifdef HAVE_LANGINFO_CODESET
# include <langinfo.h>
#endif
#ifdef HAVE_LANGINFO_CODESET
# include <langinfo.h>
#endif
-#include <lib-lib/lib-lib.h>
-
#include "mutt.h"
#include "charset.h"
#include "mutt.h"
#include "charset.h"
@@
-79,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
@@
-135,14
+121,14
@@
int charset_is_utf8(const char *s)
{
char buf[SHORT_STRING];
charset_canonicalize(buf, sizeof(buf), s);
{
char buf[SHORT_STRING];
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)
{
char buf[SHORT_STRING];
charset_canonicalize(buf, sizeof(buf), s);
}
int charset_is_us_ascii(const char *s)
{
char buf[SHORT_STRING];
charset_canonicalize(buf, sizeof(buf), s);
- return !strcmp(buf, "us-ascii");
+ return !
m_
strcmp(buf, "us-ascii");
}
}