|
@ -1,4 +1,4 @@ |
|
|
/* $OpenBSD: wcslcpy.c,v 1.1 2005/04/13 16:35:58 espie Exp $ */ |
|
|
|
|
|
|
|
|
/* $OpenBSD: wcslcpy.c,v 1.2 2005/06/19 22:12:07 espie Exp $ */ |
|
|
/* $NetBSD: wcslcpy.c,v 1.2 2001/01/03 14:33:02 lukem Exp $ */ |
|
|
/* $NetBSD: wcslcpy.c,v 1.2 2001/01/03 14:33:02 lukem Exp $ */ |
|
|
/* from OpenBSD: strlcpy.c,v 1.4 1999/05/01 18:56:41 millert Exp */ |
|
|
/* from OpenBSD: strlcpy.c,v 1.4 1999/05/01 18:56:41 millert Exp */ |
|
|
|
|
|
|
|
@ -30,7 +30,7 @@ |
|
|
*/ |
|
|
*/ |
|
|
|
|
|
|
|
|
#if defined(LIBC_SCCS) && !defined(lint) |
|
|
#if defined(LIBC_SCCS) && !defined(lint) |
|
|
static char *rcsid = "$OpenBSD: wcslcpy.c,v 1.1 2005/04/13 16:35:58 espie Exp $"; |
|
|
|
|
|
|
|
|
static char *rcsid = "$OpenBSD: wcslcpy.c,v 1.2 2005/06/19 22:12:07 espie Exp $"; |
|
|
#endif /* LIBC_SCCS and not lint */ |
|
|
#endif /* LIBC_SCCS and not lint */ |
|
|
|
|
|
|
|
|
#include <sys/types.h> |
|
|
#include <sys/types.h> |
|
@ -42,10 +42,7 @@ static char *rcsid = "$OpenBSD: wcslcpy.c,v 1.1 2005/04/13 16:35:58 espie Exp $" |
|
|
* Returns wcslen(src); if retval >= siz, truncation occurred. |
|
|
* Returns wcslen(src); if retval >= siz, truncation occurred. |
|
|
*/ |
|
|
*/ |
|
|
size_t |
|
|
size_t |
|
|
wcslcpy(dst, src, siz) |
|
|
|
|
|
wchar_t *dst; |
|
|
|
|
|
const wchar_t *src; |
|
|
|
|
|
size_t siz; |
|
|
|
|
|
|
|
|
wcslcpy(wchar_t *dst, const wchar_t *src, size_t siz) |
|
|
{ |
|
|
{ |
|
|
wchar_t *d = dst; |
|
|
wchar_t *d = dst; |
|
|
const wchar_t *s = src; |
|
|
const wchar_t *s = src; |
|
|