This repository has been archived on 2023-08-20. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
RescueBootCD/extra/syslinux-3.09/com32/lib/strlcat.c

32 lines
379 B
C

/*
* strlcat.c
*/
#include <string.h>
#include <klibc/compiler.h>
size_t strlcat(char *dst, const char *src, size_t size)
{
size_t bytes = 0;
char *q = dst;
const char *p = src;
char ch;
while ( bytes < size && *q ) {
q++;
bytes++;
}
while ( (ch = *p++) ) {
if ( bytes < size )
*q++ = ch;
bytes++;
}
*q = '\0';
return bytes;
}