DragonFly BSD
DragonFly commits List (threaded) for 2005-07
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

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


From: Dennis Melentyev <dennis.melentyev@xxxxxxxxx>
Date: Fri, 8 Jul 2005 13:21:09 +0300

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@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@xxxxxxxxxxxxx
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.1 (MingW32)
> 
> iD8DBQFCzbH96xCMwBJ+1+sRAneGAJ4gltQ7XjOd4VKzvzyt8x8cRkfapACgniuv
> +lfM1vo5+WTGp2KpA/tfFpQ=
> =G6Ly
> -----END PGP SIGNATURE-----
> 


-- 
Dennis Melentyev




[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]