Re: [PATCH v3 0/3] Reworks for console code

2019-03-31 Thread Corinna Vinschen
On Apr 1 00:47, Takashi Yano wrote: > Hi Corinna, > > On Sun, 31 Mar 2019 16:36:51 +0200 Corinna Vinschen rote: > > This hunk is ok, but I wonder if the time hasn't come to simplify the > > original code. The `static char NO_COPY' only makes marginal sense > > since it's strdup'ed anyway. > >

[PATCH v3 1/3] Cygwin: console: support 24 bit color

2019-03-31 Thread Takashi Yano
- Add 24 bit color support using xterm compatibility mode in Windows 10 1703 or later. - Add fake 24 bit color support for legacy console, which uses the nearest color from 16 system colors. --- winsup/cygwin/environ.cc | 7 +- winsup/cygwin/fhandler.h | 4 +

[PATCH v3 2/3] Cygwin: console: fix select() behaviour

2019-03-31 Thread Takashi Yano
- Previously, select() would return when only one key is typed even in canonical mode. With this patch, it returns after one line is completed. --- winsup/cygwin/fhandler.h | 12 +- winsup/cygwin/fhandler_console.cc | 794 -- winsup/cygwin/select.cc

[PATCH v3 0/3] Reworks for console code

2019-03-31 Thread Takashi Yano
Hi Corinna, On Sun, 31 Mar 2019 16:36:51 +0200 Corinna Vinschen rote: > This hunk is ok, but I wonder if the time hasn't come to simplify the > original code. The `static char NO_COPY' only makes marginal sense > since it's strdup'ed anyway. > > What if we just define two const char's like this

[PATCH v3 3/3] Cygwin: console: Make I/O functions thread-safe

2019-03-31 Thread Takashi Yano
- POSIX states I/O functions shall be thread-safe, however, cygwin console I/O functions were not. This patch makes console I/O functions thread-safe. --- winsup/cygwin/fhandler.h | 18 +++- winsup/cygwin/fhandler_console.cc | 136 +-

Re: [PATCH v2 1/3] Cygwin: console: support 24 bit color

2019-03-31 Thread Corinna Vinschen
On Mar 31 22:47, Takashi Yano wrote: > - Add 24 bit color support using xterm compatibility mode in > Windows 10 1703 or later. > - Add fake 24 bit color support for legacy console, which uses > the nearest color from 16 system colors. > --- > winsup/cygwin/environ.cc | 7 +- >

Re: [PATCH v2 0/3] Reworks for console code

2019-03-31 Thread Corinna Vinschen
Hi Takashi, On Mar 31 22:47, Takashi Yano wrote: > Hi Corinna, > > I have revised the patches according to your advice. > Could you please have a look? Thanks for sending this in git `send-email' style :))) I have a few comments on patch 1 only. Please see there. Thanks, Corinna --

[PATCH v2 2/3] Cygwin: console: fix select() behaviour

2019-03-31 Thread Takashi Yano
- Previously, select() would return when only one key is typed even in canonical mode. With this patch, it returns after one line is completed. --- winsup/cygwin/fhandler.h | 12 +- winsup/cygwin/fhandler_console.cc | 794 -- winsup/cygwin/select.cc

[PATCH v2 0/3] Reworks for console code

2019-03-31 Thread Takashi Yano
Hi Corinna, I have revised the patches according to your advice. Could you please have a look? Takashi Yano (3): Cygwin: console: support 24 bit color Cygwin: console: fix select() behaviour Cygwin: console: Make I/O functions thread-safe winsup/cygwin/environ.cc |7 +-

[PATCH v2 1/3] Cygwin: console: support 24 bit color

2019-03-31 Thread Takashi Yano
- Add 24 bit color support using xterm compatibility mode in Windows 10 1703 or later. - Add fake 24 bit color support for legacy console, which uses the nearest color from 16 system colors. --- winsup/cygwin/environ.cc | 7 +- winsup/cygwin/fhandler.h | 4 +

[PATCH v2 3/3] Cygwin: console: Make I/O functions thread-safe

2019-03-31 Thread Takashi Yano
- POSIX states I/O functions shall be thread-safe, however, cygwin console I/O functions were not. This patch makes console I/O functions thread-safe. --- winsup/cygwin/fhandler.h | 18 +++- winsup/cygwin/fhandler_console.cc | 136 +-

Re: [PATCH] Reworks for console code

2019-03-31 Thread Corinna Vinschen
Hi Takashi, On Mar 31 15:20, Takashi Yano wrote: > Hi, > > I would like to propose 3 patches attached to improve console code. Not a hard requirement, but it would be nice if you could send your patches as patchset with cover letter via `git send-email' from the git-email package or in the same

[PATCH] Reworks for console code

2019-03-31 Thread Takashi Yano
Hi, I would like to propose 3 patches attached to improve console code. Patch 0001: This revises console code for better color handling. This provides 24 bit color support for Windows 10 build 14931 or later. For legacy console, fake 24 bit color support is implemented, which use the nearest