From owner-svn-src-all@FreeBSD.ORG Sun Nov 25 05:13:30 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 190762A4 for ; Sun, 25 Nov 2012 05:13:30 +0000 (UTC) (envelope-from mailer-daemon@vniz.net) Received: from mail-la0-f54.google.com (mail-la0-f54.google.com [209.85.215.54]) by mx1.freebsd.org (Postfix) with ESMTP id 75E7D8FC15 for ; Sun, 25 Nov 2012 05:13:28 +0000 (UTC) Received: by mail-la0-f54.google.com with SMTP id j13so9693413lah.13 for ; Sat, 24 Nov 2012 21:13:28 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=message-id:disposition-notification-to:date:from:user-agent :mime-version:to:cc:subject:references:in-reply-to:openpgp :content-type:content-transfer-encoding:x-gm-message-state; bh=Zj8Wd0LXkNNA4ro54XWMIxChI5KonKAWC47YM5bn4Bc=; b=OB2En4Yytxi0/6SuyU+1TnUKLShzwjhhEfyoMC23TztvPb9C+iLXL0/iki/drDmmD8 nywamBDmecaUrfxQhvRfNe7E0ZRjlWdRB62xDxHgRM7+Gz1GVoFKqtBbXZ/poudt74cv tYCIpdUHysmniXWj9vx/+lelbj0dGvYX6TvihYPPrTmBbkMFVlyMN9zLw3ddfIatuiR3 HpG3GjW5NIwREn2OrosEYcN3YVsplOMmdzmLHNnC1YPqdKD4u7fG67rzss09d3kVyMVT k7HJkmS2AqCayjy8ikw0lLIMxwYZicHu15T9b1T1B/mM4EO7No3vPMMR47YCJyGpqf7J Djyw== Received: by 10.112.48.40 with SMTP id i8mr3533254lbn.97.1353820407954; Sat, 24 Nov 2012 21:13:27 -0800 (PST) Received: from [192.168.1.2] ([89.169.163.3]) by mx.google.com with ESMTPS id sj3sm3915623lab.2.2012.11.24.21.13.27 (version=SSLv3 cipher=OTHER); Sat, 24 Nov 2012 21:13:27 -0800 (PST) Message-ID: <50B1A8F8.9090302@freebsd.org> Date: Sun, 25 Nov 2012 09:13:28 +0400 From: Andrey Chernov User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: Dimitry Andric Subject: Re: svn commit: r243474 - head/usr.bin/cut References: <201211240415.qAO4FPaG062952@svn.freebsd.org> <50B07EB6.3010503@freebsd.org> <50B0D5B3.9000802@FreeBSD.org> <50B0DF04.5060001@freebsd.org> In-Reply-To: <50B0DF04.5060001@freebsd.org> OpenPGP: id=964474DD Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Gm-Message-State: ALoCoQmdGosyXNziTabo6cIZPaUrBJxtydSbz3Jp86HPRtZAJFXUaQNuVx38m+NfEmRT0mALbf0q Cc: Andrew Turner , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Nov 2012 05:13:30 -0000 On 24.11.2012 18:51, Andrey Chernov wrote: > On 24.11.2012 18:12, Dimitry Andric wrote: >>>> -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. :) > > In general case byte order of type promotion is not necessary equal to > byte order of L'x' literals. > Forget to note that this point "The compiler just promotes the space and tab to wchar_t" is wrong. Since there are no direct (wchar_t) cast, compiler promotes both to the nearby integer type.