From owner-freebsd-current@FreeBSD.ORG Thu Jan 20 22:47:55 2005 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EF96516A4CE; Thu, 20 Jan 2005 22:47:55 +0000 (GMT) Received: from nagual.pp.ru (pobrecita.freebsd.ru [194.87.13.42]) by mx1.FreeBSD.org (Postfix) with ESMTP id 29B5943D54; Thu, 20 Jan 2005 22:47:55 +0000 (GMT) (envelope-from ache@nagual.pp.ru) Received: from nagual.pp.ru (ache@localhost [127.0.0.1]) by nagual.pp.ru (8.13.1/8.13.1) with ESMTP id j0KMlsIM071857; Fri, 21 Jan 2005 01:47:54 +0300 (MSK) (envelope-from ache@nagual.pp.ru) Received: (from ache@localhost) by nagual.pp.ru (8.13.1/8.13.1/Submit) id j0KMlsuf071856; Fri, 21 Jan 2005 01:47:54 +0300 (MSK) (envelope-from ache) Date: Fri, 21 Jan 2005 01:47:53 +0300 From: Andrey Chernov To: Joerg Wunsch Message-ID: <20050120224753.GB71573@nagual.pp.ru> Mail-Followup-To: Andrey Chernov , Joerg Wunsch , current@FreeBSD.ORG, bde@FreeBSD.ORG References: <20050120192324.GA30862@uriah.heep.sax.de> <20050120205501.GA69123@nagual.pp.ru> <20050120211449.GC30862@uriah.heep.sax.de> <20050120214406.GA70088@nagual.pp.ru> <20050120220227.GB70629@nagual.pp.ru> <20050120223232.GF30862@uriah.heep.sax.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050120223232.GF30862@uriah.heep.sax.de> User-Agent: Mutt/1.5.6i X-AntiVirus: checked by AntiVir Milter (version: 1.1.0-3; AVE: 6.29.0.8; VDF: 6.29.0.73; host: nagual.pp.ru) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-1.5.6 (nagual.pp.ru [0.0.0.0]); Fri, 21 Jan 2005 01:47:54 +0300 (MSK) cc: current@FreeBSD.ORG cc: bde@FreeBSD.ORG Subject: Re: Implementation errors in strtol() X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Jan 2005 22:47:56 -0000 On Thu, Jan 20, 2005 at 11:32:32PM +0100, Joerg Wunsch wrote: > You can perform a conversion on any valid subject sequence (that ``has > the expected form''). The optional sign is part of the valid > sequence. As you (and POSIX) say, it is only PART of the valid sequence, but not whole valid sequence which could be converted. > Thus, we do have a subject sequence of the ``expected form''. Any > such sequence is convertible per definitionem. This is just your speculation about what "expected form" is. But POSIX clearly says, what expected form is: "If the value of base is 0, the expected form of the subject sequence is ^^^^^^^^^^^^^^^^^^^ that of a decimal constant, octal constant, or hexadecimal constant, any of which may be preceded by a .+. or .-. sign." No CONSTANT found in just +- case. Next, lets see what expected form is, if base is nonzero: "If the value of base is between 2 and 36, the expected form of the ^^^^^^^^^^^^^^^^^ subject sequence is a sequence of letters and digits representing an integer with the radix specified by base, optionally preceded by a .+. or .-. sign." The same no SEQUENCE OF LETTERS AND DIGITS found in just +- case. As I say, read POSIX, please. -- http://ache.pp.ru/