Forked from
redox-os / relibc
2153 commits behind the upstream repository.
-
Dan Robertson authored
Add ctype functions - isalnum - isalpha - isascii - isdigit - islower - isspace - isupper Add stdlib functions - atoi - atol Fix some warnings Make a fmt run
Dan Robertson authoredAdd ctype functions - isalnum - isalpha - isascii - isdigit - islower - isspace - isupper Add stdlib functions - atoi - atol Fix some warnings Make a fmt run
atoi.c 342 B
#include <stdlib.h>
#include <stdio.h>
int main(int argc, char* argv[]) {
printf("%d\n", atoi(" -42"));
printf("%d\n", atoi(" +555"));
printf("%d\n", atoi(" 1234567890 "));
printf("%ld\n", atol(" -42"));
printf("%ld\n", atol(" +555"));
printf("%ld\n", atol(" 1234567890 "));
return 0;
}