message-parser.c revision fdfac0bebdf66424e52cfca2bccf07b6a8897710
2ronwalf#include "rfc822-parser.h"
2ronwalf#include "message-parser.h"
2ronwalfstruct message_boundary {
2ronwalfstruct message_parser_ctx {
2ronwalf const char *last_boundary;
2ronwalf unsigned int want_count;
2ronwalfstatic struct message_boundary *
return boundaries;
return NULL;
unsigned int missing_cr_count = 0;
size_t i;
int ret;
if (ret <= 0) {
if (ret < 0)
return ret;
static struct message_part *
return part;
struct message_boundary *b;
size_t i;
size_t i;
int ret;
return ret;
const unsigned char *data;
int ret;
return ret;
if (ret >= 0) {
if (ret == 0)
boundary_start = i;
if (boundary_start != 0) {
&boundary);
if (ret >= 0) {
if (eof)
ret = 0;
if (ret >= 0) {
int ret;
return ret;
#define MUTEX_FLAGS \
int ret;
return ret;
else T_BEGIN {
} T_END;
MESSAGE_PART_FLAG_MULTIPART_DIGEST) != 0) {
int ret;
return ret;
int ret;
return ret;
struct message_parser_ctx *
return ctx;
struct message_parser_ctx *
return ctx;
return ret;
int ret;
if (ret == 0) {
return ret;
void *context)
int ret;
if (ret < 0) {
void *context)
int ret;