feat(userspace/libc): implement atoi, strtol, and strtoll functions in <stdlib.h>

Signed-off-by: EnderIce2 <enderice2@protonmail.com>
This commit is contained in:
2025-02-20 01:49:41 +02:00
parent e5acf4a99e
commit ab4bc55270
2 changed files with 169 additions and 4 deletions

View File

@ -54,7 +54,7 @@ extern "C"
int abs(int i);
int atexit(void (*func)(void));
double atof(const char *);
int atoi(const char *);
int atoi(const char *str);
long int atol(const char *);
void *bsearch(const void *, const void *, size_t, size_t, int (*)(const void *, const void *));
void *calloc(size_t, size_t);
@ -100,7 +100,8 @@ extern "C"
void srand48(long int);
void srandom(unsigned);
double strtod(const char *, char **);
long int strtol(const char *, char **, int);
long strtol(const char *restrict nptr, char **restrict endptr, int base);
long long strtoll(const char *restrict nptr, char **restrict endptr, int base);
unsigned long int strtoul(const char *, char **, int);
int system(const char *);
int ttyslot(void);