From 33593191d37494cecf6bac5e7981a8d062f49818 Mon Sep 17 00:00:00 2001 From: diego Date: Wed, 10 Jan 2007 20:23:24 +0000 Subject: 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 --- osdep/strlcat.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 osdep/strlcat.c (limited to 'osdep/strlcat.c') 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 + */ + +#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); +} + -- cgit v1.2.3