diff options
-rw-r--r-- | 3rdparty/linenoise-ng/src/linenoise.cpp | 18 | ||||
-rw-r--r-- | scripts/src/3rdparty.lua | 20 | ||||
-rw-r--r-- | src/osd/asio.cpp | 1 |
3 files changed, 32 insertions, 7 deletions
diff --git a/3rdparty/linenoise-ng/src/linenoise.cpp b/3rdparty/linenoise-ng/src/linenoise.cpp index cc6f7e59640..bdec55ff800 100644 --- a/3rdparty/linenoise-ng/src/linenoise.cpp +++ b/3rdparty/linenoise-ng/src/linenoise.cpp @@ -924,8 +924,10 @@ static struct termios orig_termios; /* in order to restore at exit */ static KillRing killRing; -//static int rawmode = 0; /* for atexit() function to check if restore is needed*/ -//static int atexit_registered = 0; /* register atexit just 1 time */ +#ifndef _WIN32 +static int rawmode = 0; /* for atexit() function to check if restore is needed*/ +static int atexit_registered = 0; /* register atexit just 1 time */ +#endif static int historyMaxLen = LINENOISE_DEFAULT_HISTORY_MAX_LEN; static int historyLen = 0; static int historyIndex = 0; @@ -937,8 +939,9 @@ static char8_t** history = NULL; // and zero is a valid index (so -1 is a valid "previous index") static int historyPreviousIndex = -2; static bool historyRecallMostRecent = false; - -//static void linenoiseAtExit(void); +#ifndef _WIN32 +static void linenoiseAtExit(void); +#endif static bool isUnsupportedTerm(void) { char* term = getenv("TERM"); @@ -1026,8 +1029,9 @@ static void disableRawMode(void) { } // At exit we'll try to fix the terminal to the initial conditions -//static void linenoiseAtExit(void) { disableRawMode(); } - +#ifndef _WIN32 +static void linenoiseAtExit(void) { disableRawMode(); } +#endif static int getScreenColumns(void) { int cols; #ifdef _WIN32 @@ -3326,7 +3330,7 @@ void linenoisePrintKeyCodes(void) { char c; int nread; -#if _WIN32 +#ifdef _WIN32 nread = _read(STDIN_FILENO, &c, 1); #else nread = read(STDIN_FILENO, &c, 1); diff --git a/scripts/src/3rdparty.lua b/scripts/src/3rdparty.lua index 238461934c8..8e4cfce1680 100644 --- a/scripts/src/3rdparty.lua +++ b/scripts/src/3rdparty.lua @@ -1473,3 +1473,23 @@ end } end + +-------------------------------------------------- +-- linenoise-ng library +-------------------------------------------------- + +project "linenoise-ng" + uuid "7320ffc8-2748-4add-8864-ae29b72a8511" + kind (LIBTYPE) + + addprojectflags() + + includedirs { + MAME_DIR .. "3rdparty/linenoise-ng/include", + } + + files { + MAME_DIR .. "3rdparty/linenoise-ng/src/ConvertUTF.cpp", + MAME_DIR .. "3rdparty/linenoise-ng/src/linenoise.cpp", + MAME_DIR .. "3rdparty/linenoise-ng/src/wcwidth.cpp", + } diff --git a/src/osd/asio.cpp b/src/osd/asio.cpp index 7d154cb6821..eb37539c3ab 100644 --- a/src/osd/asio.cpp +++ b/src/osd/asio.cpp @@ -13,6 +13,7 @@ #pragma clang diagnostic ignored "-Winconsistent-missing-override" #elif defined(__GNUC__) #pragma GCC diagnostic ignored "-Wsuggest-override" +#pragma GCC diagnostic ignored "-Wunused-variable" #endif #define ASIO_STANDALONE |