diff options
author | diego <diego@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2007-01-10 20:23:24 +0000 |
---|---|---|
committer | diego <diego@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2007-01-10 20:23:24 +0000 |
commit | 33593191d37494cecf6bac5e7981a8d062f49818 (patch) | |
tree | a37e69e582912a089e1a84653629988da0fbd626 /osdep/strlcat.c | |
parent | 7db81061d745e47e6aae1b947c7a5b40084529de (diff) |
Split strl.c into strl(cat|cpy).c and move #ifdefs into the build system.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21875 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'osdep/strlcat.c')
-rw-r--r-- | osdep/strlcat.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/osdep/strlcat.c b/osdep/strlcat.c new file mode 100644 index 0000000000..1facc3333d --- /dev/null +++ b/osdep/strlcat.c @@ -0,0 +1,15 @@ +/* strlcat implementation for systems that do not have it in libc + * Time-stamp: <2004-03-14 njk> + * (C) 2003-2004 Nicholas J. Kain <njk@aerifal.cx> + */ + +#include "config.h" + +unsigned int strlcat (char *dest, const char *src, unsigned int size) +{ + register char *d = dest; + + for (; size > 0 && *d != '\0'; size--, d++); + return (d - dest) + strlcpy(d, src, size); +} + |