fhandler_console

Egor Duda deo@logos-m.ru
Fri Feb 23 04:20:00 GMT 2001


Hi!

Tuesday, 20 February, 2001 Egor Duda deo@logos-m.ru wrote:

ED> i've   looked   a  bit deeper into fhandler_console code, and think it
ED> needs more fixing. for example, this command:

ED> echo -e -n "\033[?" && echo -e "1000h"

ED> won't  enable  mouse  events  reporting  ("saw_question_mark" should be
ED> persistent   across  write calls) and several other issues. so i think
ED> several variables  which are related to console "state" should be made
ED> members of  class  fhandler_console.

i've   moved   console  state variables inside fhandler_console class.
this is a combined patch (with raw keyboard mode patch i sent sometime
ago). it adds 4 new rendition commands (\033[24;27;39;49m), compatible
with  linux console and already described in Chuck's terminfo file for
cygwin, and emulate "blink" attribute with bright background.

Egor.            mailto:deo@logos-m.ru ICQ 5165414 FidoNet 2:5020/496.19
console.ChangeLog
console.diff

-------------- next part --------------
2001-02-23  Egor Duda  <deo@logos-m.ru>

	* fhandler.h (class fhandler_console): Make all variables that
	describe "state" of console to be members of fhandler_console.
	default_color is now the color which is set when console recieves
	reset command.
	* fhandler_console.cc (fhandler_console::fhandler_console): Turn
	mouse handling and raw keyboard mode off by default. Initialize
	state information.
	* fhandler.cc (fhandler_console::set_raw_win32_keyboard_mode): New
	function.
	* fhandler_console.cc (fhandler_console::set_default_attr): New
	function. Reset console attributes to default values.
	* fhandler_console.cc (fhandler_console::open): Reset attributes.
	* fhandler_console.cc (fhandler_console::get_win32_attr): New function.
	Calculate win32-style console attribute based on terminal attributes.
	* fhandler_console.cc (fhandler_console::set_cursor_maybe): Use
	member variable.
	* fhandler_console.cc (fhandler_console::read): If in raw-win32
	keyboard mode, encode win32 keyboard events in \033{x;y;z;t;u;wK
	sequences.
	* fhandler_console.cc (fhandler_console::dup): Copy all state
	information to the dup()ed handle.
	* fhandler_console.cc (fhandler_console::scroll_screen): Use current
	fill-in	attribute.
	* fhandler_console.cc (fhandler_console::clear_screen): Ditto.
	* fhandler_console.cc (fhandler_console::char_command): Check if we
	saw '?' symbol by member variable. Set terminal	attributes on \033[Xm
	commands. \033[24m - turn off underline mode, \033[27m - turn off
	reverse mode, \033[39m - restore default foreground color.
	\033[49m - restore default background color. \033[2000h - turn on raw
	keyboard mode, \033[2000l - turn off raw keyboard mode.
	* fhandler_console.cc (fhandler_console::write): Set attribues to
	default values on reset command.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: console.diff
Type: text/x-diff
Size: 16270 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin-patches/attachments/20010223/8d77f526/attachment.bin>


More information about the Cygwin-patches mailing list