Add missing casts to unsigned char inside ctype functions. These are necessary because the argument to a ctype function cannot be a negative value unless it's EOF. Thanks to Cygwin gcc for pointing out the mistake, and to Patrick Shaughnessy for this patch.