cvs commit: src/include _ctype.h

Andrey Chernov ache at nagual.pp.ru
Wed Oct 31 19:39:07 PDT 2007


On Thu, Nov 01, 2007 at 02:44:25AM +0100, Christoph Mallon wrote:
> Also the example is still unrealistic: You usually don't multiply chars by 
> two. Lets try something more realistic: an ASCII filter
> 
> int filter_ascii0(int c)
> {
>         return c < 0 || c >= 128 ? '?' : c;
> }
> 
> int filter_ascii1(int c)
> {
>         return c & ~0x7F ? '?' : c;
> }

We don't need that reaslistic examples, we need only what __isctype() 
does, and it just returns 0 or 1, not 'c'.

-- 
http://ache.pp.ru/


More information about the cvs-all mailing list