[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: strtonum(3) from OpenBSD?
On Tue, 23 Jun 2009 12:54:14 -0400
Thor Lancelot Simon <tls%rek.tjls.com@localhost> wrote:
> On Tue, Jun 23, 2009 at 11:50:18AM -0500, David Young wrote:
> > On Tue, Jun 23, 2009 at 05:35:04PM +0200, Martin Husemann wrote:
> > > On Tue, Jun 23, 2009 at 11:29:56AM -0400, Thor Lancelot Simon wrote:
> > > > Returning an error *string* is so profoundly bogus I have trouble
> > > > imagining that anyone with more than a few weeks' experience programming
> > > > in C doesn't see why.
> > >
> > > Indeed, but if we change it to a better API it will imediately loose
> > > it's portability value.
> > Right.
> > What if we write strtonum(3) in terms of an API that we do like, and
> > indicate in the manual page that strtonum(3) should not be used for new
> > code?
> Sure, we could do that. We could also cause every string returned by
> strtonum(3) to be "USELESS ERROR STRING -- SEE ERRNO", since the function
> does set errno, and document that our implementation does so. But I
> still don't see how this justifies adding this bogus interface to libc.
And what about implementing something with similar functionality sans the
mentioned api problems and put it into libutil?
Adam Hoka <Adam.Hoka%Gmail.com@localhost>
Adam Hoka <ahoka%NetBSD.org@localhost>
Adam Hoka <ahoka%MirBSD.de@localhost>
Main Index |
Thread Index |