From 3bb3b654e7ce8f5b926c43899a6a8c9e2d18d8d0 Mon Sep 17 00:00:00 2001 From: "Zed A. Shaw" Date: Tue, 19 Nov 2024 13:23:38 -0500 Subject: [PATCH] Fixes to build on non-windows and give the answer parser a real name. --- ansi_parser.rl | 2 +- main.cpp | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ansi_parser.rl b/ansi_parser.rl index 250df97..49aa594 100644 --- a/ansi_parser.rl +++ b/ansi_parser.rl @@ -8,7 +8,7 @@ using namespace fmt; %%{ - machine foo; + machine ansi_parser; alphtype int; action tstart { diff --git a/main.cpp b/main.cpp index 922761a..15f859d 100644 --- a/main.cpp +++ b/main.cpp @@ -10,7 +10,11 @@ #include "ftxui/screen/terminal.hpp" // for SetColorSupport, Color, TrueColor #include #include -#include + +#if defined(_WIN64) || defined(_WIN32) + #include +#endif + using namespace ftxui; namespace fs = std::filesystem; @@ -51,7 +55,9 @@ void configure_world(DinkyECS::World &world, Map &game_map) { int main(int argc, char *argv[]) { +#if defined(_WIN64) || defined(_WIN32) _setmode(_fileno(stdout), _O_U16TEXT); +#endif DinkyECS::World world; Map game_map(GAME_MAP_X, GAME_MAP_Y);