diff options
Diffstat (limited to 'ulib.c')
-rw-r--r-- | ulib.c | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -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; +} |