2010-03-03 15:27:30 +01:00
|
|
|
/* strcpy() Author: Kees J. Bot */
|
|
|
|
/* 1 Jan 1994 */
|
|
|
|
|
|
|
|
/* char *strcpy(char *s1, const char *s2) */
|
|
|
|
/* Copy string s2 to s1. */
|
|
|
|
/* */
|
2010-08-17 18:44:07 +02:00
|
|
|
#include <machine/asm.h>
|
|
|
|
|
|
|
|
ENTRY(strcpy)
|
2010-03-03 15:27:30 +01:00
|
|
|
push %ebp
|
|
|
|
movl %esp, %ebp
|
|
|
|
push %esi
|
|
|
|
push %edi
|
|
|
|
movl $-1, %ecx /* Unlimited length */
|
2010-08-17 18:44:07 +02:00
|
|
|
call _C_LABEL(_strncpy) /* Common code */
|
2010-03-03 15:27:30 +01:00
|
|
|
movl 8(%ebp), %eax /* Return s1 */
|
|
|
|
pop %edi
|
|
|
|
pop %esi
|
|
|
|
pop %ebp
|
|
|
|
ret
|