* please see the file GPL in the top level source directory.
*/
-#if HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include <stdio.h>
-
-#include <lib-lib/mem.h>
-#include <lib-lib/str.h>
-#include <lib-lib/ascii.h>
-#include <lib-lib/macros.h>
-#include <lib-lib/buffer.h>
-#include <lib-lib/date.h>
-#include <lib-lib/url.h>
+#include <lib-lib/lib-lib.h>
#include "recvattach.h"
}
}
-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);
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));
}
}
}
/* 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);
*/
BODY *mutt_read_mime_header(FILE *fp, int digest)
{
- BODY *body = mutt_new_body ();
+ BODY *body = body_new();
char *line = p_new(char, LONG_STRING);
ssize_t linelen = LONG_STRING;
char *p;
*/
if (new->offset > end_off) {
- mutt_free_body(&new);
+ body_list_wipe(&new);
break;
}
off_t loc;
if (hdr && !hdr->content) {
- hdr->content = mutt_new_body ();
+ hdr->content = body_new();
/* set the defaults from RFC1521 */
hdr->content->type = TYPETEXT;