+#if 0
+ parameter_t *head = NULL;
+ parameter_t **last;
+ parameter_t *p, *q;
+
+ rfc2231_param *conthead = NULL;
+ rfc2231_param *conttmp;
+
+ char *s, *t;
+ char charset[STRING];
+
+ int encoded;
+ int idx;
+ short dirty = 0; /* 1 when we may have created empty parameters. */
+
+ if (!headp)
+ return;
+
+ parameter_purge_empty(headp);
+
+ for (last = &head, p = *headp; p; p = q) {
+ q = p->next;
+
+ if (!(s = strchr (p->attribute, '*'))) {
+
+ /*
+ * Using RFC 2047 encoding in MIME parameters is explicitly
+ * forbidden by that document. Nevertheless, it's being
+ * generated by some software, including certain Lotus Notes to
+ * Internet Gateways. So we actually decode it.
+ */
+
+ if (p->value && strstr(p->value, "=?")) {
+ rfc2047_decode(&p->value);
+ } else {
+ if (mime_which_token(mod_cset.assumed_charset, -1) == MIME_US_ASCII)
+ mutt_convert_nonmime_string(&p->value);
+ }
+
+ *last = p;
+ last = &p->next;
+ p->next = NULL;
+ }
+ else if (*(s + 1) == '\0') {
+ *s = '\0';
+
+ s = rfc2231_get_charset (p->value, charset, sizeof (charset));
+ rfc2231_decode_one (p->value, s);
+ mutt_convert_string (&p->value, charset, mod_cset.charset, M_ICONV_HOOK_FROM);
+
+ *last = p;
+ last = &p->next;
+ p->next = NULL;
+
+ dirty = 1;
+ }
+ else {
+ *s = '\0';
+ s++; /* let s point to the first character of idx. */
+ for (t = s; *t && isdigit ((unsigned char) *t); t++);
+ encoded = (*t == '*');
+ *t = '\0';
+
+ idx = atoi (s);
+
+ conttmp = rfc2231_param_new ();
+ conttmp->attribute = p->attribute;
+ conttmp->value = p->value;
+ conttmp->encoded = encoded;
+ conttmp->idx = idx;
+
+ p->attribute = NULL;
+ p->value = NULL;
+ p_delete(&p);
+
+ rfc2231_list_insert (&conthead, conttmp);
+ }