Allow building Win32 console port with new color change code on Borland

5.5, potentially others with older wincon.h.
This commit is contained in:
William McBrine
2016-01-04 00:46:54 -05:00
parent c8262b17f9
commit 62ede2b601
2 changed files with 20 additions and 0 deletions

View File

@@ -32,6 +32,10 @@
# define _CRT_SECURE_NO_DEPRECATE 1 /* kill nonsense warnings */
#endif
#if defined(_WIN32) && !defined(__TURBOC__) && !defined(HAVE_INFOEX)
# define HAVE_INFOEX
#endif
/*----------------------------------------------------------------------*/
typedef struct /* structure for ripped off lines */

View File

@@ -65,6 +65,22 @@ static struct
WCHAR ConsoleTitle[0x100];
} console_info;
#ifndef HAVE_INFOEX
/* Console screen buffer information (extended version) */
typedef struct _CONSOLE_SCREEN_BUFFER_INFOEX {
ULONG cbSize;
COORD dwSize;
COORD dwCursorPosition;
WORD wAttributes;
SMALL_RECT srWindow;
COORD dwMaximumWindowSize;
WORD wPopupAttributes;
BOOL bFullscreenSupported;
COLORREF ColorTable[16];
} CONSOLE_SCREEN_BUFFER_INFOEX;
typedef CONSOLE_SCREEN_BUFFER_INFOEX *PCONSOLE_SCREEN_BUFFER_INFOEX;
#endif
static CONSOLE_SCREEN_BUFFER_INFO orig_scr;
static LPTOP_LEVEL_EXCEPTION_FILTER xcpt_filter;