Merge branch 'mh/notes-duplicate-entries'
[git/git.git] / mailinfo.h
CommitLineData
c6905e45
JH
1#ifndef MAILINFO_H
2#define MAILINFO_H
3
ef3ca954
EN
4#include "strbuf.h"
5
c6905e45
JH
6#define MAX_BOUNDARIES 5
7
8struct mailinfo {
9 FILE *input;
10 FILE *output;
11 FILE *patchfile;
12
13 struct strbuf name;
14 struct strbuf email;
15 int keep_subject;
16 int keep_non_patch_brackets_in_subject;
17 int add_message_id;
18 int use_scissors;
19 int use_inbody_headers;
20 const char *metainfo_charset;
21
22 struct strbuf *content[MAX_BOUNDARIES];
23 struct strbuf **content_top;
24 struct strbuf charset;
3aa4d81f
RS
25 unsigned int format_flowed:1;
26 unsigned int delsp:1;
c6905e45
JH
27 char *message_id;
28 enum {
29 TE_DONTCARE, TE_QP, TE_BASE64
30 } transfer_encoding;
31 int patch_lines;
32 int filter_stage; /* still reading log or are we copying patch? */
33 int header_stage; /* still checking in-body headers? */
6b4b013f 34 struct strbuf inbody_header_accum;
c6905e45
JH
35 struct strbuf **p_hdr_data;
36 struct strbuf **s_hdr_data;
37
38 struct strbuf log_message;
6ac617a3 39 int input_error;
c6905e45
JH
40};
41
55454427
DL
42void setup_mailinfo(struct mailinfo *);
43int mailinfo(struct mailinfo *, const char *msg, const char *patch);
44void clear_mailinfo(struct mailinfo *);
c6905e45
JH
45
46#endif /* MAILINFO_H */