From: H. Peter Anvin Date: Thu, 13 Oct 2005 13:27:07 GMT Subject: Re: Usage of isspace and friends Message-ID: <434E60AB.8030607@zytor.com> In-Reply-To: <7vachd6hdx.fsf@assigned-by-dhcp.cox.net> Junio C Hamano wrote: > > Huh? isspace is "int isspace(int)". Presumably standard > integral promotion rules applies here whether char is signed or > unsigned, doesn't it? > > The snippet you quoted is from apply.c, and I would say what is > more problematic is that we do not force C locale while parsing > the diff (see another thread -- we would want to process diffs > as byte streams). > The problem is that isspace() is defined to operate on an integer which can be an unsigned char value promoted to int or EOF (-1). -hpa