Warning: Attempt to read property "date" on null in /usr/local/www/websvn.planix.org/blame.php on line 247

Warning: Attempt to read property "msg" on null in /usr/local/www/websvn.planix.org/blame.php on line 247
WebSVN – planix.SVN – Blame – /os/branches/feature_posix/sys/src/libc/port/strncat.c – Rev 2

Subversion Repositories planix.SVN

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 - 1
#include <u.h>
2
#include <libc.h>
3
 
4
char*
5
strncat(char *s1, char *s2, long n)
6
{
7
	char *os1;
8
 
9
	os1 = s1;
10
	while(*s1++)
11
		;
12
	s1--;
13
	while(*s1++ = *s2++)
14
		if(--n < 0) {
15
			s1[-1] = 0;
16
			break;
17
		}
18
	return os1;
19
}