From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 In-Reply-To: <20130311220907.46195B82A@mail.bitblocks.com> References: <20130311220907.46195B82A@mail.bitblocks.com> Date: Mon, 11 Mar 2013 15:44:05 -0700 Message-ID: From: Steven Stallion To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: multipart/alternative; boundary=047d7b86f76a0c21eb04d7ade9f9 Subject: Re: [9fans] atol() bug Topicbox-Message-UUID: 27572fee-ead8-11e9-9d60-3106f5b1d025 --047d7b86f76a0c21eb04d7ade9f9 Content-Type: text/plain; charset=ISO-8859-1 from atof(2): BUGS Atoi, atol, and atoll accept octal and hexadecimal numbers in the style of C, contrary to the ANSI specification. On Mon, Mar 11, 2013 at 3:09 PM, Bakul Shah wrote: > The atol() manpage says: > > Atoi and atol recognize an optional string of tabs and > spaces, then an optional sign, then a string of decimal dig- > its. > > And yet atol(x) acts exactly like strol(x, nil, 0). This makes > it unnecessarily incompatible with the unix version. Ditto > for atoll(). My preference would be to fix the code and not > the man page. > > --047d7b86f76a0c21eb04d7ade9f9 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
from atof(2):

= =A0 =A0 =A0BUGS
=A0 =A0 =A0 =A0 =A0 Atoi, atol, and atoll accept = octal and hexadecimal numbers
=A0 =A0 =A0 =A0 =A0 in the style of= C, contrary to the ANSI specification.


On Mon,= Mar 11, 2013 at 3:09 PM, Bakul Shah <bakul@bitblocks.com>= wrote:
The atol() manpage says:

=A0 =A0 =A0 =A0 =A0 Atoi and atol recognize an optional string of tabs and<= br> =A0 =A0 =A0 =A0 =A0 spaces, then an optional sign, then a string of decimal= dig-
=A0 =A0 =A0 =A0 =A0 its.

And yet atol(x) acts exactly like strol(x, nil, 0). This makes
it unnecessarily incompatible with the unix version. =A0Ditto
for atoll(). My preference would be to fix the code and not
the man page.


--047d7b86f76a0c21eb04d7ade9f9--