comparison osdep/strlcat.c @ 21857:8d9e6b4fbf4d

Split strl.c into strl(cat|cpy).c and move #ifdefs into the build system.
author diego
date Wed, 10 Jan 2007 20:23:24 +0000
parents
children 9fb716ab06a3
comparison
equal deleted inserted replaced
21856:e268886eb13d 21857:8d9e6b4fbf4d
1 /* strlcat implementation for systems that do not have it in libc
2 * Time-stamp: <2004-03-14 njk>
3 * (C) 2003-2004 Nicholas J. Kain <njk@aerifal.cx>
4 */
5
6 #include "config.h"
7
8 unsigned int strlcat (char *dest, const char *src, unsigned int size)
9 {
10 register char *d = dest;
11
12 for (; size > 0 && *d != '\0'; size--, d++);
13 return (d - dest) + strlcpy(d, src, size);
14 }
15