[PATCH] Cygwin: pty, console: Refactor the code processing special keys.

2022-02-20 Thread Takashi Yano
- This patch commonize the code which processes special keys in pty and console to improve maintanancibility. As a result, some small bugs have been fixed. --- winsup/cygwin/dtable.cc | 1 + winsup/cygwin/exceptions.cc | 15 ++ winsup/cygwin/fhandler.h | 17 +- win

[PATCH] Cygwin: console: Rearrange set_(in|out)put_mode() calls.

2022-02-20 Thread Takashi Yano
- With this patch, all set_(in|out)put_mode() calls are rearranged as follows. 1) Setup for cygwin apps, started from non-cygwin app, is done in fhandler_console::post_open_setup(), which overrides fhandler_base::post_open_setup() called from dtable.cc. 2) Cleanup for cygwin app is

[PATCH] Cygwin: console: Call fix_tab_position() only if having broken tabs.

2022-02-20 Thread Takashi Yano
- Calling fix_tab_position() is necessary in Windows 10 with xterm compatible mode enabled, because it has a problem that the tab positions will be broken when the window size is changed. Fortunately, this problem has been fixed in Windows 11. Therefore, with this patch, necessity of fix_ta