[go: up one dir, main page]

Menu

[897c37]: / lpvm / strncpy.c  Maximize  Restore  History

Download this file

14 lines (12 with data), 282 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
/*
* Just to see if we can fiddle the assembly to make it faster
* It's certainly much faster than the thread safe glibc strcpy...
*/
char * strncpy(char * t, char * f, int n)
{
register char * nt;
nt = t;
while ((n--) > 0 && (*(nt++) = *(f++)))
;
return t;
}