From c0d0117a963cf8e4dfb28b919087d8a8ecbbca6e Mon Sep 17 00:00:00 2001 From: pommicket Date: Mon, 2 Jan 2023 13:36:38 -0500 Subject: fix up restructuring --- main.c | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) (limited to 'main.c') diff --git a/main.c b/main.c index 9433c4d..f8e07d7 100644 --- a/main.c +++ b/main.c @@ -54,19 +54,11 @@ FUTURE FEATURES: - LSP request timeout */ -#include "base.h" -no_warn_start -#if _WIN32 -#include -#else -#if DEBUG || __TINYC__ // speed up compile time on debug, also tcc doesn't have immintrin.h -#define SDL_DISABLE_IMMINTRIN_H -#endif -#include -#endif -no_warn_end +#include "ted.h" + #include #include +#include #if __linux__ #include #endif @@ -78,6 +70,13 @@ no_warn_end #pragma comment(lib, "shell32.lib") #endif + +#if !defined ONE_SOURCE && !defined DEBUG + #define ONE_SOURCE 1 +#endif + +#if ONE_SOURCE + #include "util.c" #if _WIN32 @@ -114,12 +113,15 @@ no_warn_end #include "lsp-write.c" #include "lsp-parse.c" +#endif // ONE_SOURCE + #if PROFILE #define PROFILE_TIME(var) double var = time_get_seconds(); #else #define PROFILE_TIME(var) #endif + static Rect error_box_rect(Ted *ted) { Font *font = ted->font; const Settings *settings = ted_active_settings(ted); -- cgit v1.2.3