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_fixcpp/sys/src/ape/lib/ap/gen/strxfrm.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 <string.h>
2
 
3
size_t
4
strxfrm(char *s1, const char *s2, size_t n)
5
{
6
	/*
7
	 * BUG: supposed to transform s2 to a canonical form
8
	 * so that strcmp can be used instead of strcoll, but
9
	 * our strcoll just uses strcmp.
10
	 */
11
 
12
	size_t xn = strlen(s2);
13
	if(n > xn)
14
		n = xn;
15
	memcpy(s1, s2, n);
16
	return xn;
17
}