From: hackbard Date: Mon, 17 Sep 2007 20:54:53 +0000 (+0200) Subject: supplied memcpy and memset now (gcc built-in functions) X-Git-Url: https://hackdaworld.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6292cc9190f6e7f36a3634057740e770d58d7460;p=my-code%2Farm.git supplied memcpy and memset now (gcc built-in functions) --- diff --git a/betty/functions.c b/betty/functions.c index 79612b3..9e12c86 100644 --- a/betty/functions.c +++ b/betty/functions.c @@ -52,7 +52,7 @@ int strncpy(char *d,char *s,int n) { return 0; } -int mset(u8 *d,u8 v,int n) { +int memset(u8 *d,int v,int n) { while(n) d[--n]=v; @@ -60,7 +60,7 @@ int mset(u8 *d,u8 v,int n) { return 0; } -int mcpy(u8 *d,u8 *s,int n) { +int memcpy(u8 *d,u8 *s,int n) { while(n--) *d++=*s++; diff --git a/betty/functions.h b/betty/functions.h index aa9c11a..f8e8e1d 100644 --- a/betty/functions.h +++ b/betty/functions.h @@ -18,8 +18,8 @@ int strlen(char *string); int strncmp(char *a,char *b,int n); int strncpy(char *d,char *s,int n); -int mset(u8 *s,u8 v,int n); -int mcpy(u8 *d,u8 *s,int n); +int memset(u8 *s,int v,int n); +int memcpy(u8 *d,u8 *s,int n); int counttok(u8 *s,u8 delim); #endif