int patch_lines;
int filter_stage; /* still reading log or are we copying patch? */
int header_stage; /* still checking in-body headers? */
};
int patch_lines;
int filter_stage; /* still reading log or are we copying patch? */
int header_stage; /* still checking in-body headers? */
};
static struct strbuf charset = STRBUF_INIT;
static struct strbuf **p_hdr_data, **s_hdr_data;
static int use_scissors;
static struct strbuf charset = STRBUF_INIT;
static struct strbuf **p_hdr_data, **s_hdr_data;
static int use_scissors;
-static int check_header(const struct strbuf *line,
- struct strbuf *hdr_data[], int overwrite)
+static int check_header(struct mailinfo *mi,
+ const struct strbuf *line,
+ struct strbuf *hdr_data[], int overwrite)
/* search for the interesting parts */
for (i = 0; header[i]; i++) {
int len = strlen(header[i]);
/* search for the interesting parts */
for (i = 0; header[i]; i++) {
int len = strlen(header[i]);
len = strlen("Message-Id: ");
strbuf_add(&sb, line->buf + len, line->len - len);
decode_header(&sb);
len = strlen("Message-Id: ");
strbuf_add(&sb, line->buf + len, line->len - len);
decode_header(&sb);
- mi->header_stage = check_header(line, s_hdr_data, 0);
+ mi->header_stage = check_header(mi, line, s_hdr_data, 0);
/* slurp in this section's info */
while (read_one_header_line(line, mi->input))
/* slurp in this section's info */
while (read_one_header_line(line, mi->input))
/* process the email header */
while (read_one_header_line(&line, mi->input))
/* process the email header */
while (read_one_header_line(&line, mi->input))
else if (!strcmp(argv[1], "-b"))
mi.keep_non_patch_brackets_in_subject = 1;
else if (!strcmp(argv[1], "-m") || !strcmp(argv[1], "--message-id"))
else if (!strcmp(argv[1], "-b"))
mi.keep_non_patch_brackets_in_subject = 1;
else if (!strcmp(argv[1], "-m") || !strcmp(argv[1], "--message-id"))
else if (!strcmp(argv[1], "-u"))
metainfo_charset = def_charset;
else if (!strcmp(argv[1], "-n"))
else if (!strcmp(argv[1], "-u"))
metainfo_charset = def_charset;
else if (!strcmp(argv[1], "-n"))