9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: "rob pike, esq." <rob@mightycheese.com>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] no error checking in strtol and strtoul
Date: Mon, 24 Feb 2003 11:41:18 -0800	[thread overview]
Message-ID: <d438935d14841d8751c6a6d48c96746a@mightycheese.com> (raw)
In-Reply-To: <6d3220b4.0302221730.6677da7@posting.google.com>

[-- Attachment #1: Type: text/plain, Size: 269 bytes --]

Please be more specific.  I just read the spec and, within the
constraints of a different model (no errno), the Plan 9 routines
seem to handle overflow fine.  If you're asking why it doesn't
set errstr, well, it could and that's probably just an oversight.

-rob

[-- Attachment #2: Type: message/rfc822, Size: 2108 bytes --]

From: Saroj Mahapatra <saroj@optonline.net>
To: 9fans@cse.psu.edu
Subject: [9fans] no error checking in strtol and strtoul
Date: Mon, 24 Feb 2003 10:00:21 GMT
Message-ID: <6d3220b4.0302221730.6677da7@posting.google.com>

Hi,

Was the decision to leave out error checking (like ANSI C strtol and
strtoul do) deliberate? The first type of error (wrong syntax) is easy
to check (if ret value == 0 and rest == beginning of string), but not
handling overflow situation is unsatisfactory. I'd like to hear plan 9
implementators' comment on this.

Thanks,
Saroj Mahapatra

      reply	other threads:[~2003-02-24 19:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-02-24 10:00 Saroj Mahapatra
2003-02-24 19:41 ` rob pike, esq. [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d438935d14841d8751c6a6d48c96746a@mightycheese.com \
    --to=rob@mightycheese.com \
    --cc=9fans@cse.psu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).