diff options
author | Alex Auvolat <alex.auvolat@ens.fr> | 2014-11-30 19:58:32 +0100 |
---|---|---|
committer | Alex Auvolat <alex.auvolat@ens.fr> | 2014-11-30 19:58:32 +0100 |
commit | 54e7efbbd0e0c88d99bb6bddb82e9fc8d90eae50 (patch) | |
tree | 178f0d423d1708cbddf89c0e4c510a2022fa7eda /kernel/lib/stdlib.c | |
parent | bee97e0b630976b96798246a3ef4eea8964099cf (diff) | |
download | kogata-54e7efbbd0e0c88d99bb6bddb82e9fc8d90eae50.tar.gz kogata-54e7efbbd0e0c88d99bb6bddb82e9fc8d90eae50.zip |
Add debug output and a few elementary stdlib functions.
Diffstat (limited to 'kernel/lib/stdlib.c')
-rw-r--r-- | kernel/lib/stdlib.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/kernel/lib/stdlib.c b/kernel/lib/stdlib.c new file mode 100644 index 0000000..6710da2 --- /dev/null +++ b/kernel/lib/stdlib.c @@ -0,0 +1,8 @@ +#include <stdlib.h> + +size_t strlen(const char* str) { + size_t ret = 0; + while (str[ret] != 0) + ret++; + return ret; +} |