X-Git-Url: http://git.madism.org/?a=blobdiff_plain;ds=sidebyside;f=rfc2231.c;h=0f9a2f53880be05b40ab0e65e5897ca47365644c;hb=238b70e39b78f585c586bd51aef41988b3cc73d1;hp=778995b48cf62ae0e833aa684d3d9a8c751b6e8f;hpb=617e7d83d14e14e6a520a48e75437211b16c8834;p=apps%2Fmadmutt.git diff --git a/rfc2231.c b/rfc2231.c index 778995b..0f9a2f5 100644 --- a/rfc2231.c +++ b/rfc2231.c @@ -22,12 +22,12 @@ #endif #include +#include +#include #include "mutt.h" -#include "ascii.h" #include "mime.h" #include "charset.h" -#include "lib/str.h" #include "rfc2047.h" #include "rfc2231.h" @@ -187,7 +187,7 @@ static char *rfc2231_get_charset (char *value, char *charset, size_t chslen) } *t = '\0'; - strfcpy (charset, value, chslen); + m_strcpy(charset, chslen, value); if ((u = strchr (t + 1, '\''))) return u + 1; @@ -231,7 +231,7 @@ static void rfc2231_list_insert (struct rfc2231_parameter **list, q = p; p = p->next; - c = str_cmp (par->value, q->value); + c = m_strcmp(par->value, q->value); if ((c > 0) || (c == 0 && par->index >= q->index)) break; } @@ -259,7 +259,7 @@ static void rfc2231_join_continuations (PARAMETER ** head, value = NULL; l = 0; - strfcpy (attribute, par->attribute, sizeof (attribute)); + m_strcpy(attribute, sizeof(attribute), par->attribute); if ((encoded = par->encoded)) valp = rfc2231_get_charset (par->value, charset, sizeof (charset)); @@ -270,7 +270,7 @@ static void rfc2231_join_continuations (PARAMETER ** head, if (encoded && par->encoded) rfc2231_decode_one (par->value, valp); - vl = str_len (par->value); + vl = m_strlen(par->value); p_realloc(&value, l + vl + 1); strcpy (value + l, par->value); /* __STRCPY_CHECKED__ */ @@ -280,13 +280,13 @@ static void rfc2231_join_continuations (PARAMETER ** head, rfc2231_free_parameter (&par); if ((par = q)) valp = par->value; - } while (par && !str_cmp (par->attribute, attribute)); + } while (par && !m_strcmp(par->attribute, attribute)); if (value) { if (encoded) mutt_convert_string (&value, charset, Charset, M_ICONV_HOOK_FROM); *head = mutt_new_parameter (); - (*head)->attribute = str_dup (attribute); + (*head)->attribute = m_strdup(attribute); (*head)->value = value; head = &(*head)->next; } @@ -315,10 +315,10 @@ int rfc2231_encode_string (char **pd) if (!Charset || !SendCharset || !(charset = mutt_choose_charset (Charset, SendCharset, - *pd, str_len (*pd), &d, &dlen))) { - charset = str_dup (Charset ? Charset : "unknown-8bit"); + *pd, m_strlen(*pd), &d, &dlen))) { + charset = m_strdup(Charset ? Charset : "unknown-8bit"); d = *pd; - dlen = str_len (d); + dlen = m_strlen(d); } if (!mutt_is_us_ascii (charset)) @@ -331,9 +331,9 @@ int rfc2231_encode_string (char **pd) ++ext; if (encode) { - e = p_new(char, dlen + 2 * ext + str_len(charset) + 3); + e = p_new(char, dlen + 2 * ext + m_strlen(charset) + 3); sprintf (e, "%s''", charset); /* __SPRINTF_CHECKED__ */ - t = e + str_len (e); + t = e + m_strlen(e); for (s = d, slen = dlen; slen; s++, slen--) if (*s < 0x20 || *s >= 0x7f || strchr (MimeSpecials, *s) || strchr ("*'%", *s)) {