[PATCH v3 0/3] Reworks for console code
Sun Mar 31 17:45:00 GMT 2019
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.
> > What if we just define two const char's like this
> > const char cygterm = "TERM=cygwin";
> > const char xterm = "TERM=xterm-256color";
> > and then just strdup them conditionally:
> > if (!sawTERM)
> > envp[i++] = strdup (wincap.has_con_24bit_colors () ? xterm :
> > cygterm);
> > What do you think?
> > Sorry, didn't notice this before: Please prepend this block with
> > a comment along the lines of "/* Not yet defined in Mingw-w64 */"
> > Doesn't this belong into the select patch?
> Actually, no. This makes select() recognize Ctrl-space, but
> is just tentative. Patch 0002 overwrites this fix.
> This is corresponding to:
> > @@ -435,7 +451,8 @@ fhandler_console::read (void *pv, size_t& buflen)
> > toadd = tmp;
> > }
> > /* Allow Ctrl-Space to emit ^@ */
> > - else if (input_rec.Event.KeyEvent.wVirtualKeyCode == VK_SPACE
> > + else if (input_rec.Event.KeyEvent.wVirtualKeyCode
> > + == (wincap.has_con_24bit_colors () ? '2' : VK_SPACE)
> > && (ctrl_key_state & CTRL_PRESSED)
> > && !(ctrl_key_state & ALT_PRESSED))
> > toadd = "";
Ah, right, that makes sense.
Pushed. I added release info accordingly. I'm also just building new
developer snapshots with this patchset included.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 833 bytes
Desc: not available
More information about the Cygwin-patches