From owner-svn-src-head@FreeBSD.ORG Sat Nov 24 14:11:57 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 16C67C49; Sat, 24 Nov 2012 14:11:57 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (cl-327.ede-01.nl.sixxs.net [IPv6:2001:7b8:2ff:146::2]) by mx1.freebsd.org (Postfix) with ESMTP id C5B0D8FC1C; Sat, 24 Nov 2012 14:11:56 +0000 (UTC) Received: from [192.168.0.6] (spaceball.home.andric.com [192.168.0.6]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 2866B5C37; Sat, 24 Nov 2012 15:11:56 +0100 (CET) Message-ID: <50B0D5B3.9000802@FreeBSD.org> Date: Sat, 24 Nov 2012 15:12:03 +0100 From: Dimitry Andric Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: Andrey Chernov Subject: Re: svn commit: r243474 - head/usr.bin/cut References: <201211240415.qAO4FPaG062952@svn.freebsd.org> <50B07EB6.3010503@freebsd.org> In-Reply-To: <50B07EB6.3010503@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Andrew Turner , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Nov 2012 14:11:57 -0000 On 2012-11-24 09:00, Andrey Chernov wrote: > On 24.11.2012 8:15, Andrew Turner wrote: >> The is_delim function works on wchar_t characters not ints, update the >> function to take a wchar_t as it's argument. >> static int >> -is_delim(int ch) >> +is_delim(wchar_t ch) >> { >> if (wflag) { >> if (ch == ' ' || ch == '\t') >> > > I can't look at the whole code at this moment, but taking standalone > this is incorrect comparison for wchar_t. Should be L' ' and L'\t' instead. The compiler just promotes the space and tab to wchar_t, this is only needed for the sake of consistency (and/or style). There is no binary change if you add the L prefixes. :)