Add generic strlen implementation
This commit is contained in:
parent
d47709b03c
commit
9163857e83
@ -17,6 +17,15 @@ void *memset(void* s, int c, unsigned long n) {
|
||||
}
|
||||
#endif // !MEMSET_DEFINED
|
||||
|
||||
#ifndef _STRLEN_DEFINED
|
||||
#define _STRLEN_DEFINED
|
||||
int strlen(char* s) {
|
||||
int len = 0;
|
||||
for(;s[len] != 0; ++len);
|
||||
return len;
|
||||
}
|
||||
#endif // !_STRLEN_DEFINED
|
||||
|
||||
#ifndef _START_DEFINED
|
||||
#define _START_DEFINED
|
||||
// Generic _start implementation. Can't access any args
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user