Skip to content
Snippets Groups Projects
Commit e204d0a1 authored by rsc's avatar rsc
Browse files

atoi, for kill

parent e0924827
No related branches found
No related tags found
No related merge requests found
......@@ -88,3 +88,14 @@ stat(char *n, struct stat *st)
close(fd);
return r;
}
int
atoi(const char *s)
{
int n;
n = 0;
while('0' <= *s && *s <= '9')
n = n*10 + *s++ - '0';
return n;
}
......@@ -31,3 +31,4 @@ unsigned int strlen(char*);
void* memset(void*, int, unsigned int);
void* malloc(uint);
void free(void*);
int atoi(const char*);
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment