Re: [PATCH v2 09/25] mailinfo & mailsplit: check for EOF while parsing

2017-05-02 Thread Johannes Schindelin
Hi Junio, On Mon, 1 May 2017, Junio C Hamano wrote: > Johannes Schindelin writes: > > > diff --git a/builtin/mailsplit.c b/builtin/mailsplit.c > > index 30681681c13..9b3efc8e987 100644 > > --- a/builtin/mailsplit.c > > +++ b/builtin/mailsplit.c > > @@ -233,7 +233,8

Re: [PATCH v2 09/25] mailinfo & mailsplit: check for EOF while parsing

2017-05-01 Thread Junio C Hamano
Johannes Schindelin writes: > While POSIX states that it is okay to pass EOF to isspace() (and it seems > to be implied that EOF should *not* be treated as whitespace), and also to > pass EOF to ungetc() (which seems to be intended to fail without buffering > the

[PATCH v2 09/25] mailinfo & mailsplit: check for EOF while parsing

2017-04-28 Thread Johannes Schindelin
While POSIX states that it is okay to pass EOF to isspace() (and it seems to be implied that EOF should *not* be treated as whitespace), and also to pass EOF to ungetc() (which seems to be intended to fail without buffering the character), it is much better to handle these cases explicitly. Not