Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 1 Nov 2007 06:19:50 +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:  <20071101031950.GB95201@nagual.pp.ru>
In-Reply-To: <472942BF.1080807@gmx.de>
References:  <200710272232.l9RMWSbK072082@repoman.freebsd.org> <20071030200331.GA29309@toxic.magnesium.net> <20071031215526.GC89932@nagual.pp.ru> <47292F79.9030102@gmx.de> <20071101023803.GA94332@nagual.pp.ru> <472942BF.1080807@gmx.de>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Nov 01, 2007 at 04:06:39AM +0100, Christoph Mallon wrote:
> Andrey Chernov wrote:
>> 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'.
> 
> Sorry, I don't understand what you want to tell me. I showed, that your 
> example is invalid (because of undefined behaviour) and unrealistic, 
> therefore I provided a better example on how this condition is used. But, 
> of course, let's look at __isctype() in both variants:

Just backed out.

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



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