Bug #17639 ยป ENABLE_VIRTUAL_TERMINAL_PROCESSING.diff
ruby.c | ||
---|---|---|
DWORD m;
|
||
if (!GetConsoleMode(h, &m)) return 0;
|
||
# ifndef ENABLE_VIRTUAL_TERMINAL_PROCESSING
|
||
# define ENABLE_VIRTUAL_TERMINAL_PROCESSING 0x200
|
||
# define ENABLE_VIRTUAL_TERMINAL_PROCESSING 0x4
|
||
# endif
|
||
if (!(m & ENABLE_VIRTUAL_TERMINAL_PROCESSING)) return 0;
|
||
return 1;
|
win32/win32.c | ||
---|---|---|
DWORD m;
|
||
if (GetConsoleMode(h, &m)) {
|
||
#ifndef ENABLE_VIRTUAL_TERMINAL_PROCESSING
|
||
#define ENABLE_VIRTUAL_TERMINAL_PROCESSING 0x200
|
||
#define ENABLE_VIRTUAL_TERMINAL_PROCESSING 0x4
|
||
#endif
|
||
SetConsoleMode(h, m | ENABLE_VIRTUAL_TERMINAL_PROCESSING);
|
||
}
|
||
... | ... | |
break;
|
||
}
|
||
reslen = 0;
|
||
if (dwMode & 4) { /* ENABLE_VIRTUAL_TERMINAL_PROCESSING */
|
||
if (dwMode & ENABLE_VIRTUAL_TERMINAL_PROCESSING) {
|
||
if (!WriteConsoleW(handle, ptr, len, &reslen, NULL))
|
||
reslen = (DWORD)-1L;
|
||
}
|