From owner-freebsd-standards@FreeBSD.ORG Tue Jun 24 11:57:07 2003 Return-Path: Delivered-To: freebsd-standards@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 10FAF37B401; Tue, 24 Jun 2003 11:57:07 -0700 (PDT) Received: from nagual.pp.ru (pobrecita.freebsd.ru [194.87.13.42]) by mx1.FreeBSD.org (Postfix) with ESMTP id C6DF843FBD; Tue, 24 Jun 2003 11:57:05 -0700 (PDT) (envelope-from ache@pobrecita.freebsd.ru) Received: from pobrecita.freebsd.ru (ache@localhost [127.0.0.1]) by nagual.pp.ru (8.12.9/8.12.9) with ESMTP id h5OIv4t0092175; Tue, 24 Jun 2003 22:57:04 +0400 (MSD) (envelope-from ache@pobrecita.freebsd.ru) Received: (from ache@localhost) by pobrecita.freebsd.ru (8.12.9/8.12.9/Submit) id h5OIv4re092174; Tue, 24 Jun 2003 22:57:04 +0400 (MSD) Date: Tue, 24 Jun 2003 22:57:04 +0400 From: Andrey Chernov To: Garance A Drosihn Message-ID: <20030624185704.GB92022@nagual.pp.ru> References: <20030624114418.GA58305@HAL9000.homeunix.com> <20030624124233.GA83552@nagual.pp.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.4i cc: standards@freebsd.org cc: das@freebsd.org Subject: Re: scanf(3) patch for C99-conformant FP parsing X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Jun 2003 18:57:07 -0000 On Tue, Jun 24, 2003 at 14:49:22 -0400, Garance A Drosihn wrote: > #define isdigitch(Anychar) isdigit(((int) Anychar) & 255) > #define isupperch(Anychar) isupper(((int) Anychar) & 255) > #define isxdigitch(Anychar) isdigit(((int) Anychar) & 255) > #define tolowerch(Anychar) tolower(((int) Anychar) & 255) Just (unsigned char) cast produce better code and more readable. In any case & 255 alone will be enough without needs to convert to (int) first.