mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Fixed commit miss at 19cc24b34b
This commit is contained in:
parent
da18d6f015
commit
41eb4fbf86
1 changed files with 22 additions and 30 deletions
|
@ -6591,20 +6591,21 @@ constat_handle(HANDLE h)
|
|||
{
|
||||
st_data_t data;
|
||||
struct constat *p;
|
||||
|
||||
EnterCriticalSection(&conlist_mutex);
|
||||
if (!conlist) {
|
||||
if (console_emulator_p()) {
|
||||
conlist = conlist_disabled;
|
||||
} else {
|
||||
return NULL;
|
||||
}
|
||||
conlist = st_init_numtable();
|
||||
install_vm_exit_handler();
|
||||
}
|
||||
else if (conlist == conlist_disabled) {
|
||||
return NULL;
|
||||
}
|
||||
if (conlist != conlist_disabled) {
|
||||
if (st_lookup(conlist, (st_data_t)h, &data)) {
|
||||
p = (struct constat *)data;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
CONSOLE_SCREEN_BUFFER_INFO csbi;
|
||||
p = ALLOC(struct constat);
|
||||
p->vt100.state = constat_init;
|
||||
|
@ -6616,11 +6617,6 @@ constat_handle(HANDLE h)
|
|||
}
|
||||
st_insert(conlist, (st_data_t)h, (st_data_t)p);
|
||||
}
|
||||
} else {
|
||||
p = NULL;
|
||||
}
|
||||
LeaveCriticalSection(&conlist_mutex);
|
||||
|
||||
return p;
|
||||
}
|
||||
|
||||
|
@ -6630,16 +6626,12 @@ constat_reset(HANDLE h)
|
|||
{
|
||||
st_data_t data;
|
||||
struct constat *p;
|
||||
|
||||
EnterCriticalSection(&conlist_mutex);
|
||||
if (
|
||||
conlist && conlist != conlist_disabled &&
|
||||
st_lookup(conlist, (st_data_t)h, &data)
|
||||
) {
|
||||
thread_exclusive(conlist) {
|
||||
if (!conlist || conlist == conlist_disabled) continue;
|
||||
if (!st_lookup(conlist, (st_data_t)h, &data)) continue;
|
||||
p = (struct constat *)data;
|
||||
p->vt100.state = constat_init;
|
||||
}
|
||||
LeaveCriticalSection(&conlist_mutex);
|
||||
}
|
||||
|
||||
#define FOREGROUND_MASK (FOREGROUND_BLUE | FOREGROUND_GREEN | FOREGROUND_RED | FOREGROUND_INTENSITY)
|
||||
|
|
Loading…
Reference in a new issue