struct strbuf continuation = STRBUF_INIT;
/* Get the first part of the line. */
- if (strbuf_getline(line, in, '\n'))
+ if (strbuf_getline_lf(line, in))
return 0;
/*
peek = fgetc(in); ungetc(peek, in);
if (peek != ' ' && peek != '\t')
break;
- if (strbuf_getline(&continuation, in, '\n'))
+ if (strbuf_getline_lf(&continuation, in))
break;
continuation.buf[0] = ' ';
strbuf_rtrim(&continuation);
static int find_boundary(struct mailinfo *mi, struct strbuf *line)
{
- while (!strbuf_getline(line, mi->input, '\n')) {
+ while (!strbuf_getline_lf(line, mi->input)) {
if (*(mi->content_top) && is_multipart_boundary(mi, line))
return 1;
}
strbuf_release(&newline);
/* replenish line */
- if (strbuf_getline(line, mi->input, '\n'))
+ if (strbuf_getline_lf(line, mi->input))
return 0;
strbuf_addch(line, '\n');
return 1;
mi->header_stage = 1;
mi->use_inbody_headers = 1;
mi->content_top = mi->content;
- git_config(git_mailinfo_config, &mi);
+ git_config(git_mailinfo_config, mi);
}
void clear_mailinfo(struct mailinfo *mi)