ReactOS  0.4.14-dev-98-gb0d4763
strlcat.c File Reference
#include <schily/mconfig.h>
#include <schily/standard.h>
#include <schily/unistd.h>
#include <schily/string.h>
#include <schily/libport.h>
Include dependency graph for strlcat.c:

Go to the source code of this file.

Functions

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

Variables

static UConst char sccsid []
 

Function Documentation

◆ strlcat()

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

Definition at line 32 of file strlcat.c.

36 {
37  const char *os1 = s1;
38  size_t olen = len;
39 
40  if (len > 0) {
41  while (--len > 0 && *s1++ != '\0')
42  ;
43 
44  if (len == 0)
45  return (olen + strlen(s2));
46 
47  s1--;
48  len++;
49  while (--len > 0 && (*s1++ = *s2++) != '\0')
50  ;
51  if (len == 0) {
52  *s1 = '\0';
53  return (s1 - os1 + strlen(s2));
54  }
55  return (--s1 - os1);
56  }
57  return (strlen(s2));
58 }
struct S2 s2
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
struct S1 s1
GLenum GLsizei len
Definition: glext.h:6722

Referenced by merge_old_directory_into_tree().

Variable Documentation

◆ sccsid

UConst char sccsid[]
static
Initial value:
=
"@(#)strlcat.c 1.1 10/04/26 Copyright 2010 J. Schilling"

Definition at line 4 of file strlcat.c.