On Fri, Jul 16, 1999 at 12:53:13AM +0200, Sheldon Hearn wrote: > > 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*. :-)
Well, if I read your message correctly, the difference between fooncat() and strlcat() would be that strlcat() returns the total number of chars in (or would be in) the destination string, whereas fooncat() returns the total number of chars copied. The former, strlcat(), avoids the problem I was noting. Looking at OpenBSD's actual definition of strlcat() which returns the number of chars that would have been in the final string is potentially non-useful, but not really toooooo terrible. [If I'm using strlcat() in the first place, am I _really_ going to care how many chars would have been copied? Maybe in legacy code, but in anything newer...] > You'd probably prefer the functions to return the number of bytes which > they did not manage to {copy,append}, yes? Lazy bastard [1]. :-) Hmm... That's an interesting idea... > 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 Ahh, well, you did hijack this off of the -security list. Adding strlcpy() and strlcat() is probably a good idea. > given the opportunity to submit a replacement manpage, since theirs > sucks. Bah. You're in avail now. Just commit ontop of whatever manpage gets imported. ;-) If your replacement is good, no one will object. :) -- This is my .signature which gets appended to the end of my messages. To Unsubscribe: send mail to majord...@freebsd.org with "unsubscribe freebsd-hackers" in the body of the message