From c3bb1751d7f62a13a46f28c1eb67d9e20d8d6f7f Mon Sep 17 00:00:00 2001 From: nic-gaffney Date: Sun, 25 Jun 2023 23:21:02 -0500 Subject: Fixed standard library --- std/stdlib.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'std/stdlib.c') diff --git a/std/stdlib.c b/std/stdlib.c index d27b36f..7e77385 100644 --- a/std/stdlib.c +++ b/std/stdlib.c @@ -1,13 +1,19 @@ #include +#include +#include void wait(long long x) { sleep(x); } -int slen(char *str) { - return strlen(str); +long long slen(char *str) { + return (long long) strlen(str); } -char charAt(char *str, int) { - return str[int]; +char charAt(char *str, long long x) { + return str[x]; +} + +long long parse_int(char *str) { + return (long long) atoi(str); } -- cgit v1.2.3