#include <sys/types.h>
#include <sys/stat.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
#include <string.h>
#include <ctype.h>
#include <assert.h>
#include "mm_internal.h"
#include "mm_util.h"
#include "mimeparser.h"
#include "mimeparser.tab.h"
Functions | |
void | PARSER_initialize (MM_CTX *, int) |
void | PARSER_setbuffer (const char *) |
void | PARSER_setfp (FILE *) |
int | mm_parse_mem (MM_CTX *ctx, const char *text, int parsemode, int flags) |
int | mm_parse_file (MM_CTX *ctx, const char *filename, int parsemode, int flags) |
int mm_parse_file | ( | MM_CTX * | ctx, | |
const char * | filename, | |||
int | parsemode, | |||
int | flags | |||
) |
Parses a file into a MiniMIME context
ctx | A valid MiniMIME context object | |
filename | The name of the file to parse | |
parsemode | The parsemode | |
flags | The flags to pass to the parser |
The following modes can be used to specify how the message should be parsed:
The context needs to be initialized before using mm_context_new() and may be freed using mm_context_free().
int mm_parse_mem | ( | MM_CTX * | ctx, | |
const char * | text, | |||
int | parsemode, | |||
int | flags | |||
) |
Parses a NUL-terminated string into a MiniMIME context
ctx | A valid MiniMIME context object | |
text | The NUL-terminated string to parse | |
parsemode | The parsemode | |
flags | The flags to pass to the parser |
The following modes can be used to specify how the message should be parsed:
The context needs to be initialized before using mm_context_new() and may be freed using mm_context_free().
void PARSER_initialize | ( | MM_CTX * | newctx, | |
int | mode | |||
) |
Initializes the parser engine.