Re: BUG #16108: Colorization to the output of command-line hasunproperly behaviors at Windows platform

Поиск
Список
Период
Сортировка
От Michail Nikolaev
Тема Re: BUG #16108: Colorization to the output of command-line hasunproperly behaviors at Windows platform
Дата
Msg-id CANtu0oj2z_t9d5SrTLqgZ_mOoiiAheTFp3spP7urUFiuK90=uA@mail.gmail.com
обсуждение исходный текст
Ответы Re: BUG #16108: Colorization to the output of command-line hasunproperly behaviors at Windows platform  (Michail Nikolaev <michail.nikolaev@gmail.com>)
Re: BUG #16108: Colorization to the output of command-line hasunproperly behaviors at Windows platform  (Juan José Santamaría Flecha <juanjo.santamaria@gmail.com>)
Список pgsql-hackers
Hello everyone.

>  Please find attached a version that supports older Mingw versions and SDKs.

I have checked the patch source code and it seems to be working. But a
few moments I want to mention:

I think it is not good idea to mix the logic of detecting the fact of
TTY with enabling of the VT100 mode. Yeah, it seems to be correct for
current case but a little confusing.
Maybe is it better to detect terminal using *isatty* and later call
*enable_vt_mode*?

Also, it seems like if GetConsoleMode returns
ENABLE_VIRTUAL_TERMINAL_PROCESSING flag already set - we could skip
SetConsoleMode call (not a big deal of course).

Thanks,
Michail.



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: ssl passphrase callback
Следующее
От: Masahiko Sawada
Дата:
Сообщение: Re: Transactions involving multiple postgres foreign servers, take 2