Use p_new instead of xmalloc()
[apps/madmutt.git] / charset.c
index 89d5d74..11441e4 100644 (file)
--- a/charset.c
+++ b/charset.c
@@ -50,8 +50,8 @@ wchar_t CharsetReplacement = '?';
 void charset_initialize(void)
 {
 #ifdef HAVE_LANGINFO_CODESET
-    char buff[SHORT_STRING];
-    char buff2[SHORT_STRING];
+    char buff[STRING];
+    char buff2[STRING];
 
     m_strcpy(buff, sizeof(buff), nl_langinfo(CODESET));
     charset_canonicalize(buff2, sizeof(buff2), buff);
@@ -77,7 +77,7 @@ void charset_initialize(void)
 void charset_canonicalize(char *dest, ssize_t dlen, const char *name)
 {
     const struct cset_pair *cp;
-    char scratch[SHORT_STRING];
+    char scratch[STRING];
     const char *p;
     int i = 0;
 
@@ -106,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)
 {
-    static char fcharset[SHORT_STRING];
+    static char fcharset[STRING];
     const char *p;
 
     if (m_strisempty(charset))
@@ -119,14 +119,14 @@ const char *charset_getfirst(const char *charset)
 
 int charset_is_utf8(const char *s)
 {
-    char buf[SHORT_STRING];
+    char buf[STRING];
     charset_canonicalize(buf, sizeof(buf), s);
     return !m_strcmp(buf, "utf-8");
 }
 
 int charset_is_us_ascii(const char *s)
 {
-    char buf[SHORT_STRING];
+    char buf[STRING];
     charset_canonicalize(buf, sizeof(buf), s);
     return !m_strcmp(buf, "us-ascii");
 }
@@ -139,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)
 {
-    char tocode1[SHORT_STRING];
-    char fromcode1[SHORT_STRING];
+    char tocode1[STRING];
+    char fromcode1[STRING];
     const char *tmp;
 
     iconv_t cd;