[MPlayer-dev-eng] ctype.h functions on win32
Reimar Döffinger
Reimar.Doeffinger at stud.uni-karlsruhe.de
Sun Oct 14 15:28:40 CEST 2007
On Sun, Oct 14, 2007 at 03:23:08PM +0200, Reimar Döffinger wrote:
> On Sun, Oct 14, 2007 at 09:11:07AM -0400, Rich Felker wrote:
> > On Sun, Oct 14, 2007 at 09:15:45AM +0200, Reimar Döffinger wrote:
> > > > > Check if something like
> > > > > #define isspace(c) ((c) != EOF && isspace((unsigned char)(c)))
> > > > > works.
> > > >
> > > > This is unnecessary. The issue is NOT msvc crashing when -1 is passed.
> > > > The issue is msvc crashing when signed char values in the range -128
> > > > to -2 are passed. The relevant arrays/pointers simply need to be
> > > > changed to unsigned char.
> > >
> > > Well, c might be an int returned from fgetc.
> >
> > Any value returned by fgetc is automatically valid as an argument to
> > isspace or any of the is*() functions. RTFM!!!!!!!!!!!!!!!
>
> Please read again all of it.
And keep in mind that none of my docs say that EOF couldn't be 0x120.
More information about the MPlayer-dev-eng
mailing list