Re: [PATCH] Make git-mailinfo strip whitespace from the start of the mail file.
Simon Sasburg <simon.sasburg@gmail.com> writes:
Show 9 quoted lines
> @@ -935,6 +936,11 @@ static int mailinfo(FILE *in, FILE *out, int ks, const char *encoding,
> p_hdr_data = xcalloc(MAX_HDR_PARSED, sizeof(char *));
> s_hdr_data = xcalloc(MAX_HDR_PARSED, sizeof(char *));
>
> + do {
> + peek = fgetc(in);
> + } while (peek == ' ' || peek == '\r' || peek == '\n');
> + ungetc(peek, in);
> +I wonder why this is not using isspace(peek).