Chameleon

Chameleon Svn Source Tree

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

Source at commit 1308 created 12 years 8 months ago.
By meklort, Add a few placeholders for file io
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: 1308