Date: Fri, 16 Jul 1999 00:53:13 +0200 From: Sheldon Hearn <sheldonh@uunet.co.za> To: Tim Vanderhoek <vanderh@ecf.utoronto.ca> Cc: freebsd-hackers@FreeBSD.org Subject: Re: OpenBSD's strlcpy(3) and strlcat(3) Message-ID: <80092.932079193@axl.noc.iafrica.com> In-Reply-To: Your message of "Thu, 15 Jul 1999 18:34:42 -0400." <19990715183442.A53661@mad>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 15 Jul 1999 18:34:42 -0400, Tim Vanderhoek wrote:
> if (fooncat(string, append, sizeof(string)) != strlen(append))
> ...
>
> which is rather evil, given that the second strlen(append) would be
> completely gratuitous if it weren't for the interface you're
> suggesting.
Tim, you're doing that "I'm right, but too concise to be understood"
thing again. What are you saying here? :-)
If all you're saying is that you want an API that doesn't require a test
against the known length of src (append in your example), then you won't
like strl*. :-)
You'd probably prefer the functions to return the number of bytes which
they did not manage to {copy,append}, yes? Lazy bastard [1]. :-)
While this might be something we add, it shouldn't be called
strl{cpy,cat}. And the original question was whether or not we'd add the
strl{cpy,cat} functions to libc. If we do, I seriously hope I'll be
given the opportunity to submit a replacement manpage, since theirs
sucks.
Ciao,
Sheldon.
[1] It's usually the lazy guy who demands the best API, provided his
demands are tempered by the pedantic guy.
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?80092.932079193>
