Chameleon

Chameleon Svn Source Tree

Root/branches/xZenu/src/modules/klibc/strncat.c

Source at commit 1406 created 12 years 10 months ago.
By meklort, Revert drivers.c so that kexts are only loaded when OSBundleRequired is set and that value is not safe mode. Added some comments about it too.
1/*
2 * strncat.c
3 */
4
5#include <string.h>
6
7char *strncat(char *dst, const char *src, size_t n)
8{
9char *q = strchr(dst, '\0');
10const char *p = src;
11char ch;
12
13while (n--) {
14*q++ = ch = *p++;
15if (!ch)
16return dst;
17}
18*q = '\0';
19
20return dst;
21}
22

Archive Download this file

Revision: 1406