Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 1 Nov 2007 05:38:03 +0300
From:      Andrey Chernov <ache@nagual.pp.ru>
To:        Christoph Mallon <christoph.mallon@gmx.de>
Cc:        cvs-src@FreeBSD.ORG, src-committers@FreeBSD.ORG, Juli Mallett <juli@clockworksquid.com>, cvs-all@FreeBSD.ORG
Subject:   Re: cvs commit: src/include _ctype.h
Message-ID:  <20071101023803.GA94332@nagual.pp.ru>
In-Reply-To: <47292F79.9030102@gmx.de>
References:  <200710272232.l9RMWSbK072082@repoman.freebsd.org> <20071030200331.GA29309@toxic.magnesium.net> <20071031215526.GC89932@nagual.pp.ru> <47292F79.9030102@gmx.de>

next in thread | previous in thread | raw e-mail | index | archive | help
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/



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20071101023803.GA94332>