ReactOS 0.4.15-dev-7958-gcd0bb1a
strlcpy.c File Reference
#include <schily/mconfig.h>
#include <schily/standard.h>
#include <schily/unistd.h>
#include <schily/libport.h>
Include dependency graph for strlcpy.c:

Go to the source code of this file.

Functions

EXPORT size_t strlcpy (char *s1, const char *s2, size_t len)
 

Variables

static UConst char sccsid []
 

Function Documentation

◆ strlcpy()

EXPORT size_t strlcpy ( char s1,
const char s2,
size_t  len 
)

Definition at line 31 of file strlcpy.c.

35{
36 const char *os2 = s2;
37
38 if (len > 0) {
39 while (--len > 0 && (*s1++ = *s2++) != '\0')
40 ;
41 if (len == 0) {
42 *s1 = '\0';
43 while (*s2++ != '\0')
44 ;
45 }
46 } else {
47 while (*s2++ != '\0')
48 ;
49 }
50 return (--s2 - os2);
51}
GLenum GLsizei len
Definition: glext.h:6722
struct S1 s1
struct S2 s2

Variable Documentation

◆ sccsid

UConst char sccsid[]
static
Initial value:
=
"@(#)strlcpy.c 1.4 09/07/08 Copyright 2006-2009 J. Schilling"

Definition at line 4 of file strlcpy.c.