diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 1999-12-02 14:31:19 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 1999-12-02 14:31:19 +0000 |
commit | acc25eec35e186abc118b9ca4f097e22fc6b4846 (patch) | |
tree | 7fa75871c51372e70cbd9cb50b0a2fab55cfa750 /c/src/lib/libbsp/powerpc/shared/bootloader/lib.c | |
parent | Merged of mcp750 and mvme2307 BSP by Eric Valette <valette@crf.canon.fr>. (diff) | |
download | rtems-acc25eec35e186abc118b9ca4f097e22fc6b4846.tar.bz2 |
Merged of mcp750 and mvme2307 BSP by Eric Valette <valette@crf.canon.fr>.
As part of this effort, the mpc750 libcpu code is now shared with the
ppc6xx.
Diffstat (limited to 'c/src/lib/libbsp/powerpc/shared/bootloader/lib.c')
-rw-r--r-- | c/src/lib/libbsp/powerpc/shared/bootloader/lib.c | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/c/src/lib/libbsp/powerpc/shared/bootloader/lib.c b/c/src/lib/libbsp/powerpc/shared/bootloader/lib.c new file mode 100644 index 0000000000..242f637b5d --- /dev/null +++ b/c/src/lib/libbsp/powerpc/shared/bootloader/lib.c @@ -0,0 +1,53 @@ +/* lib.c + * + * This file contains the implementation of functions that are unresolved + * in the bootloader. Unfortunately it shall not use any object code + * from newlib or rtems because they are not compiled with the right option!!! + * + * You've been warned!!!. + * + * CopyRight (C) 1998, 1999 valette@crf.canon.fr + * + * The license and distribution terms for this file may be + * found in found in the file LICENSE in this distribution or at + * http://www.OARcorp.com/rtems/license.html. + * + * $Id$ + */ + + +void* memset(void *p, int c, unsigned int n) +{ + char *q =p; + for(; n>0; --n) *q++=c; + return p; +} + +void* memcpy(void *dst, const void * src, unsigned int n) +{ + unsigned char *d=dst; + const unsigned char *s=src; + + while(n-- > 0) *d++=*s++; + return dst; +} + +char* strcat(char * dest, const char * src) +{ + char *tmp = dest; + + while (*dest) + dest++; + while ((*dest++ = *src++) != '\0') + ; + return tmp; +} + +int strlen(const char* string) +{ + register int i = 0; + + while (string[i] != '\0') + ++i; + return i; +} |