On Fri, May 24, 2019 at 07:22:07PM +0700, Oleg Chumanov wrote:
> First of all, I really want to thank you for your files.
>
> However, Can you show me an example of these:
>
> > makes it easier to perform error
> > recovery in the caller. For example, the caller may wish to
> > reallocate the buf
Can you tell me, What do you think about this implementation?
I think, it is more readable than the current implementation:
size_t
strlcpy(char *dst, const char *src, size_t dsize)
{
const char *sbeg = src;
if (dsize != 0)
for (dst[--dsize] = '\0'; dsize-- != 0; ++src)
First of all, I really want to thank you for your files.
However, Can you show me an example of these:
> makes it easier to perform error
> recovery in the caller. For example, the caller may wish to
> reallocate the buffer and retry.
>
> That would make it a bit harder to do error recovery since
On Thu, 23 May 2019 17:21:19 +0700, Oleg Chumanov wrote:
> First of all,
> I do not understand why the interface (the return value of these functions) i
> s so different. They both do almost the same thing.
>
> I do not understand, why the return value is the length of source or the sum
> of leng
On Thu, May 23, 2019 at 05:21:19PM +0700, Oleg Chumanov wrote:
> Hi, there
>
> First of all,
> I do not understand why the interface (the return value of these functions)
> is so different. They both do almost the same thing.
>
> I do not understand, why the return value is the length of source
Hi, there
First of all,
I do not understand why the interface (the return value of these functions) is
so different. They both do almost the same thing.
I do not understand, why the return value is the length of source or the sum of
lengths. I think, it is useless.
if we will return the number