From 0d498270350a28b8c22bab80012d88a9c571d710 Mon Sep 17 00:00:00 2001 From: Emin Arslan Date: Mon, 4 May 2026 10:56:02 +0300 Subject: [PATCH] Reorganized --- platform_hosted.c | 38 --------------------- platform_freestanding.c => platform_linux.c | 0 2 files changed, 38 deletions(-) delete mode 100644 platform_hosted.c rename platform_freestanding.c => platform_linux.c (100%) diff --git a/platform_hosted.c b/platform_hosted.c deleted file mode 100644 index 222ef90..0000000 --- a/platform_hosted.c +++ /dev/null @@ -1,38 +0,0 @@ -#include "forth.h" -#include -#include -#include -#include -#include - -void forth_putchar(char c) { - putchar((unsigned char)c); -} - -int forth_getchar(void) { - return getchar(); -} - -void forth_fflush(void) { - fflush(stdout); -} - -void forth_panic(void) { - for (;;); -} - -int64_t forth_strtoll(const char* str, char** endptr, int base) { - return (int64_t)strtoll(str, endptr, base); -} - -void forth_printf(const char* fmt, ...) { - va_list ap; - va_start(ap, fmt); - vprintf(fmt, ap); - va_end(ap); -} - -int main(void) { - forth_run(); - return 0; -} diff --git a/platform_freestanding.c b/platform_linux.c similarity index 100% rename from platform_freestanding.c rename to platform_linux.c