Mercurial > prosody-hg
comparison util-src/windows.c @ 5866:10a16fdebe2c
Merge 0.10->trunk
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Thu, 10 Oct 2013 22:27:01 +0100 |
| parents | 22b1d18eb919 |
| children | 6c8f6364bc48 |
comparison
equal
deleted
inserted
replaced
| 5861:c3ee62b3bdfe | 5866:10a16fdebe2c |
|---|---|
| 56 | 56 |
| 57 CONSOLE_SCREEN_BUFFER_INFO info; | 57 CONSOLE_SCREEN_BUFFER_INFO info; |
| 58 | 58 |
| 59 if (console == INVALID_HANDLE_VALUE) return lerror(L, "GetStdHandle"); | 59 if (console == INVALID_HANDLE_VALUE) return lerror(L, "GetStdHandle"); |
| 60 if (!GetConsoleScreenBufferInfo(console, &info)) return lerror(L, "GetConsoleScreenBufferInfo"); | 60 if (!GetConsoleScreenBufferInfo(console, &info)) return lerror(L, "GetConsoleScreenBufferInfo"); |
| 61 if (!ReadConsoleOutputAttribute(console, &color, sizeof(WORD), info.dwCursorPosition, &read_len)) return lerror(L, "ReadConsoleOutputAttribute"); | 61 if (!ReadConsoleOutputAttribute(console, &color, 1, info.dwCursorPosition, &read_len)) return lerror(L, "ReadConsoleOutputAttribute"); |
| 62 | 62 |
| 63 lua_pushnumber(L, color); | 63 lua_pushnumber(L, color); |
| 64 return 1; | 64 return 1; |
| 65 } | 65 } |
| 66 static int Lset_consolecolor(lua_State *L) { | 66 static int Lset_consolecolor(lua_State *L) { |
