From owner-cvs-all@FreeBSD.ORG Thu Nov 1 03:31:59 2007 Return-Path: Delivered-To: cvs-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A64E916A417; Thu, 1 Nov 2007 03:31:59 +0000 (UTC) (envelope-from ache@nagual.pp.ru) Received: from nagual.pp.ru (nagual.pp.ru [194.87.13.69]) by mx1.freebsd.org (Postfix) with ESMTP id 1D34E13C4B8; Thu, 1 Nov 2007 03:31:58 +0000 (UTC) (envelope-from ache@nagual.pp.ru) Received: from nagual.pp.ru (ache@localhost [127.0.0.1]) by nagual.pp.ru (8.14.1/8.14.1) with ESMTP id lA13Jo6B095252; Thu, 1 Nov 2007 06:19:50 +0300 (MSK) (envelope-from ache@nagual.pp.ru) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nagual.pp.ru; s=default; t=1193887191; bh=B2yl0KKY2V0lfl8UkzJXGhEC1WBRgc7af/9LXlD P8jo=; l=952; h=Date:From:To:Cc:Subject:Message-ID:Mail-Followup-To: References:MIME-Version:Content-Type:Content-Disposition: In-Reply-To:User-Agent; b=M7lMhcwQ/d1ewf7Ec0iFLnJcXW5Nf8y6dgVC3mTP S9SzJ4RqIbQQfgrBzsv/tKBsITF4DvC4zFZ1Bk2Y5fpJ1fhmV7wGpk5b82Fn7GinT+0 fAQ3jzB0E/90u+q3PcOVE0Ca2A2kL87kw4x+ZUZKpAbmS9Jaqyje/uxgqhQHyzyk= Received: (from ache@localhost) by nagual.pp.ru (8.14.1/8.14.1/Submit) id lA13Jo7Z095251; Thu, 1 Nov 2007 06:19:50 +0300 (MSK) (envelope-from ache) Date: Thu, 1 Nov 2007 06:19:50 +0300 From: Andrey Chernov To: Christoph Mallon Message-ID: <20071101031950.GB95201@nagual.pp.ru> Mail-Followup-To: Andrey Chernov , Christoph Mallon , Juli Mallett , src-committers@FreeBSD.ORG, cvs-src@FreeBSD.ORG, cvs-all@FreeBSD.ORG 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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <472942BF.1080807@gmx.de> User-Agent: Mutt/1.5.16 (2007-06-09) Cc: cvs-src@FreeBSD.org, src-committers@FreeBSD.org, Juli Mallett , cvs-all@FreeBSD.org Subject: Re: cvs commit: src/include _ctype.h X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Nov 2007 03:31:59 -0000 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/