ratio submodule

This commit is contained in:
2024-09-07 14:40:46 +02:00
parent 1894987afc
commit d270657fc9
24 changed files with 534 additions and 4 deletions

View File

@ -0,0 +1,6 @@
#include "../../headers/stdlib.h"
int atoi(const char *str)
{
return atoll(str);
}

View File

@ -0,0 +1,6 @@
#include "../../headers/stdlib.h"
long atol(const char *str)
{
return atoll(str);
}

View File

@ -0,0 +1,13 @@
#include "../../headers/ctype.h"
long long atoll(const char *str)
{
const char *start = str;
long long ret = 0;
while (*start != '\0') {
if (isdigit(*str))
ret = ret * 10 + *str - '0';
}
return ret;
}