cvs commit: src/include ctype.h src/lib/libc/gen isctype.c tolower.c toupper.c

Dennis Melentyev dennis.melentyev at gmail.com
Fri Jul 8 03:22:17 PDT 2005


Just curious...

If EOF is 'int -1' (0xFFFFFFFF), then having is*( _unsigned_ int) will
solve the problem:
Programmer will need to explicitely cast values to unsigned int,
resulting in 0xFF for char -1 and 0xFFFFFFFF for EOF.

PS. I never have read the SUS, so don't shoot me dead... Just ignore
if inappropriate :)

2005/7/8, Thomas E. Spanjaard <tgen at xxxxxxxxxxxxx>:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Matthew Dillon wrote:
> |     But the programmer might not have the expectation
> |     of an is*() call *EVER* causing the program to exit.
> 
> In my honest opinion, the standards are more important than the
> programmer. The programmer has to realize he's using C, and not a higher
> level language like Java or Python. It's good that you want to 'help'
> them, but that's not what C is for, and what the standards for it have
> defined.
> 
> Cheers,
> - --
>                 -- Thomas E. Spanjaard
>                    tgen at xxxxxxxxxxxxx
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.1 (MingW32)
> 
> iD8DBQFCzbH96xCMwBJ+1+sRAneGAJ4gltQ7XjOd4VKzvzyt8x8cRkfapACgniuv
> +lfM1vo5+WTGp2KpA/tfFpQ=
> =G6Ly
> -----END PGP SIGNATURE-----
> 


-- 
Dennis Melentyev






More information about the Commits mailing list