Clean up local memcpy implementation to take void * parameters.

This commit is contained in:
kan 2004-07-30 00:33:09 +00:00
parent 2ba123c4be
commit 59d6b73b4b
2 changed files with 12 additions and 6 deletions

View File

@ -139,12 +139,15 @@ static int xputc(int);
static int xgetc(int);
static int getc(int);
static void memcpy(char *, const char *, int);
static void memcpy(void *, const void *, int);
static void
memcpy(char *dst, const char *src, int len)
memcpy(void *dst, const void *src, int len)
{
const char *s = src;
char *d = dst;
while (len--)
*dst++ = *src++;
*d++ = *s++;
}
static inline int

View File

@ -139,12 +139,15 @@ static int xputc(int);
static int xgetc(int);
static int getc(int);
static void memcpy(char *, const char *, int);
static void memcpy(void *, const void *, int);
static void
memcpy(char *dst, const char *src, int len)
memcpy(void *dst, const void *src, int len)
{
const char *s = src;
char *d = dst;
while (len--)
*dst++ = *src++;
*d++ = *s++;
}
static inline int