From f3e03796652b792bb3fd5d3d25b687b9a7f14633 Mon Sep 17 00:00:00 2001 From: Alex AUVOLAT Date: Fri, 18 May 2012 11:25:25 +0200 Subject: A bit of a change in the directory layout. --- src/kernel/lib/std.h | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'src/kernel/lib/std.h') diff --git a/src/kernel/lib/std.h b/src/kernel/lib/std.h index ced49b5..fc1b65d 100644 --- a/src/kernel/lib/std.h +++ b/src/kernel/lib/std.h @@ -5,10 +5,27 @@ #include /* For size_t */ +#define MIN(a, b) ((a) < (b) ? (a) : (b)) +#define MAX(a, b) ((a) > (b) ? (a) : (b)) + #ifdef __cplusplus -extern "C" void abort(); -#else +extern "C" { +#endif + void abort(); +void *memcpy(void *dest, const void *src, int count); +void *memset(void *dest, int val, int count); +uint16_t *memsetw(uint16_t *dest, uint16_t val, int count); + +int strlen(const char *str); +char *strcpy(char *dest, const char *src); +char *strdup(const char *src); +char *strchr(const char *str, char c); +char *strcat(char *dest, const char *src); +int strcmp(const char *s1, const char *s2); + +#ifdef __cplusplus +} #endif #define sbrk ksbrk -- cgit v1.2.3