mirror of
https://github.com/luau-lang/luau.git
synced 2025-05-04 10:33:46 +01:00
Revert "Add console output setting for windows"
This reverts commit 20c9bf7077
.
This commit is contained in:
parent
20c9bf7077
commit
f04a37de6c
1 changed files with 0 additions and 17 deletions
|
@ -11,16 +11,6 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
#ifdef _WIN32
|
|
||||||
#ifndef WIN32_LEAN_AND_MEAN
|
|
||||||
#define WIN32_LEAN_AND_MEAN
|
|
||||||
#endif
|
|
||||||
#ifndef NOMINMAX
|
|
||||||
#define NOMINMAX
|
|
||||||
#endif
|
|
||||||
#include <Windows.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static void writestring(const char* s, size_t l)
|
static void writestring(const char* s, size_t l)
|
||||||
{
|
{
|
||||||
fwrite(s, 1, l, stdout);
|
fwrite(s, 1, l, stdout);
|
||||||
|
@ -28,10 +18,6 @@ static void writestring(const char* s, size_t l)
|
||||||
|
|
||||||
static int luaB_print(lua_State* L)
|
static int luaB_print(lua_State* L)
|
||||||
{
|
{
|
||||||
#ifdef _WIN32
|
|
||||||
UINT oldcode = GetConsoleOutputCP();
|
|
||||||
SetConsoleOutputCP(CP_UTF8);
|
|
||||||
#endif
|
|
||||||
int n = lua_gettop(L); // number of arguments
|
int n = lua_gettop(L); // number of arguments
|
||||||
for (int i = 1; i <= n; i++)
|
for (int i = 1; i <= n; i++)
|
||||||
{
|
{
|
||||||
|
@ -43,9 +29,6 @@ static int luaB_print(lua_State* L)
|
||||||
lua_pop(L, 1); // pop result
|
lua_pop(L, 1); // pop result
|
||||||
}
|
}
|
||||||
writestring("\n", 1);
|
writestring("\n", 1);
|
||||||
#ifdef _WIN32
|
|
||||||
SetConsoleOutputCP(oldcode);
|
|
||||||
#endif
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue