piler/src/parser.h

31 lines
1005 B
C
Raw Normal View History

2011-11-14 15:57:52 +01:00
/*
* parser.h, SJ
*/
#ifndef _PARSER_H
#define _PARSER_H
#include "cfg.h"
#include "config.h"
#include "defs.h"
2011-11-16 14:47:47 +01:00
struct _state parse_message(struct session_data *sdata, struct __config *cfg);
int parse_line(char *buf, struct _state *state, struct session_data *sdata, struct __config *cfg);
2011-11-14 15:57:52 +01:00
2011-11-16 14:47:47 +01:00
void init_state(struct _state *state);
unsigned long parse_date_header(char *s);
int isHexNumber(char *p);
2011-11-14 15:57:52 +01:00
int extract_boundary(char *p, struct _state *state);
void fixupEncodedHeaderLine(char *buf);
void fixupSoftBreakInQuotedPritableLine(char *buf, struct _state *state);
void fixupBase64EncodedLine(char *buf, struct _state *state);
void markHTML(char *buf, struct _state *state);
int appendHTMLTag(char *buf, char *htmlbuf, int pos, struct _state *state);
void translateLine(unsigned char *p, struct _state *state);
void reassembleToken(char *p);
void degenerateToken(unsigned char *p);
void fixURL(char *url);
2011-11-16 14:47:47 +01:00
int extractNameFromHeaderLine(char *s, char *name, char *resultbuf);
2011-11-14 15:57:52 +01:00
#endif /* _PARSER_H */