move all the parameter related functions into the lib-mime.
[apps/madmutt.git] / lib-mime / rfc822parse.c
index 01e968a..31b5d88 100644 (file)
@@ -201,14 +201,14 @@ int mutt_check_mime_type(const char *s)
     }
 }
 
-static PARAMETER *parse_parameters(const char *s)
+static parameter_t *parse_parameters(const char *s)
 {
-    PARAMETER *res = NULL;
-    PARAMETER **list = &res;
+    parameter_t *res = NULL;
+    parameter_t **list = &res;
 
     while (*s) {
         const char *p;
-        PARAMETER *new;
+        parameter_t *new;
         int i;
 
         s = skipspaces(s);
@@ -345,10 +345,10 @@ void mutt_parse_content_type(char *s, BODY *ct)
     if (ct->type == TYPETEXT) {
         pc = parameter_getval(ct->parameter, "charset");
         if (!pc) {
-            mutt_set_parameter("charset",
-                               option(OPTSTRICTMIME) ? "us-ascii" :
-                               charset_getfirst(AssumedCharset),
-                               &ct->parameter);
+            parameter_setval(&ct->parameter, "charset",
+                             option(OPTSTRICTMIME)
+                             ? "us-ascii"
+                             : charset_getfirst(AssumedCharset));
         }
     }
 }
@@ -365,7 +365,7 @@ static void parse_content_disposition(const char *s, BODY *ct)
 
     /* Check to see if a default filename was given */
     if ((s = strchr (s, ';'))) {
-        PARAMETER *parms = parse_parameters(vskipspaces(s));
+        parameter_t *parms = parse_parameters(vskipspaces(s));
 
         if ((s = parameter_getval(parms, "filename")))
             m_strreplace(&ct->filename, s);