Permalink
Browse files

Why not use default libc code for now?

  • Loading branch information...
singpolyma committed Apr 21, 2013
1 parent d94202f commit 0993b5a613c50cb3e36b19a79703048e8d07f776
Showing with 2 additions and 22 deletions.
  1. +2 −22 kernel.c
View
@@ -1,30 +1,10 @@
#include <stddef.h>
#include <stdlib.h>
#include <string.h>
#include "versatilepb.h"
#include "asm.h"
void *memcpy(void *dest, const void *src, size_t n) {
char *d = dest;
const char *s = src;
size_t i;
for(i = 0; i < n; i++) {
d[i] = s[i];
}
return d;
}
int strcmp(const char* a, const char* b) {
int r = 0;
while(!r && *a && *b) r = (*a++) - (*b++);
return (*a) - (*b);
}
size_t strlen(const char *s) {
size_t r = 0;
while(*s++) r++;
return r;
}
void bwputs(char *s) {
while(*s) {
while(*(UART0 + UARTFR) & UARTFR_TXFF);

0 comments on commit 0993b5a

Please sign in to comment.