From a77d9b00a200e54cce159f60b3447f7029220291 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pavel=20Kala=C5=A1=20=28Floxen=29?= Date: Tue, 14 Jul 2026 19:34:57 +0200 Subject: [PATCH] =?UTF-8?q?Odstran=C4=9Bny=20funkce=20parse=5Fi32=20a=20pa?= =?UTF-8?q?rse=5Fu32,=20funkce=20p=C5=99esunuty=20do=20souboru=20int.c?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kernel/main.c | 44 +------------------------------------------- 1 file changed, 1 insertion(+), 43 deletions(-) diff --git a/kernel/main.c b/kernel/main.c index d38eab9..0df2f38 100644 --- a/kernel/main.c +++ b/kernel/main.c @@ -24,6 +24,7 @@ #include "sysapps_runtime.h" #include "syscall.h" #include "timer.h" +#include "int.h" void app_tetris_main(void); extern const sysapp_entry_t g_sysapps[]; @@ -1153,49 +1154,6 @@ static char *next_token(char **cursor) { return start; } -static unsigned long parse_u32(const char *s, int *ok) { - unsigned long value = 0; - *ok = 0; - - if (!s || *s == '\0') { - return 0; - } - - while (*s) { - if (*s < '0' || *s > '9') { - return 0; - } - - value = value * 10UL + (unsigned long)(*s - '0'); - ++s; - } - - *ok = 1; - return value; -} - -static long parse_i32(const char *s, int *ok) { - int sign = 1; - unsigned long v; - - if (!s || *s == '\0') { - *ok = 0; - return 0; - } - - if (*s == '-') { - sign = -1; - ++s; - } - - v = parse_u32(s, ok); - if (!*ok) { - return 0; - } - - return (long)v * (long)sign; -} - static void resolve_path(const char *name, char *out, usize out_size) { usize i = 0; usize j = 0;