public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Takashi Yano <takashi.yano@nifty.ne.jp>
To: cygwin@cygwin.com
Subject: Re: [ANNOUNCEMENT] TEST: Cygwin 3.1.0-0.1
Date: Mon, 12 Aug 2019 19:44:00 -0000	[thread overview]
Message-ID: <20190813044451.212455aada8a12c30c3aa920@nifty.ne.jp> (raw)
In-Reply-To: <20190812130152.GI11632@calimero.vinschen.de>

[-- Attachment #1: Type: text/plain, Size: 2535 bytes --]

On Mon, 12 Aug 2019 15:01:52 +0200
Corinna Vinschen wrote:
> On Aug 11 09:27, Thorsten Kampe wrote:
> > * Corinna Vinschen (Fri, 9 Aug 2019 20:53:38 +0200)
> > > I uploaded a new Cygwin test release 3.1.0-0.1
> > > 
> > > This release comes with a couple of new features and quite a few
> > > bug fixes.
> > > 
> > > The most interesting change, courtesy Ken Brown, is a revamp of the
> > > old FIFO code.  It should now be possible to open FIFOs multiple times
> > > for writing, something the old code failed on.
> > > 
> > > 
> > > Please test.
> > 
> > I've noticed two things in connection with pspg 
> > (https://github.com/okbob/pspg) - a pager for tables:
> 
> Nobody from the dev team uses this application, afaics.
> 
> To help tracking down the cause for the problems, can you bisect
> Cygwin or at least check which of the snapshots from
> http://www.cygwin.com/snapshots/ introduces the problem?
> 
> > 1. Configuring the source takes ages (for instance "checking 
> > whether the C compiler works..."). This is only in ConEmu, not 
> > in MinTTY.
> > 
> > 2. Pager output is completely distorted:
> > 
> > Before:
> > > SELECT ArtistId FROM Chinook.dbo.Album WHERE ArtistId = 78
> > +------------+
> > | ArtistId   |
> > |------------|
> > | 78         |
> > +------------+
> > (1 row affected)
> > Time: 0.356s
> > 
> > After:
> > > SELECT ArtistId FROM Chinook.dbo.Album WHERE ArtistId = 78
> > +------------+
> >               | ArtistId   |
> >                             |------------|
> >                                           | 78         |
> 
> If this all occurs in ConEmu only, it may be one of the end of March
> patches which may introduce incompatibilities with ConEmu's Windows
> API hooking, but that's just a blind guess:
> 
>   6a06c6bc8f84 Cygwin: console: fix key input for native console application
>   f4b47827cf87 Cygwin: console: Make I/O functions thread-safe
>   8382778cdb57 Cygwin: console: fix select() behaviour
>   bd627864ab41 Cygwin: console: support 24 bit color

I looked into this problem, and found that this is due to a bug
of ConEmu.

Attached is the simple test case (conemu-chk.c).
In command prompt, the output of this program is:
AAA
BBB

However, in ConEmu, the output is:
AAA
   BBB

If ENABLE_VIRTUAL_TERMINAL_INPUT flag is set to console input,
it affects to console output and becomes so that the newline '\n'
does not cause carriage return. This is weird.

Thorsten, could you please report this bug to ConEmu developers?

-- 
Takashi Yano <takashi.yano@nifty.ne.jp>

[-- Attachment #2: conemu-chk.c --]
[-- Type: text/x-csrc, Size: 784 bytes --]

#include <windows.h>

#ifndef DISABLE_NEWLINE_AUTO_RETURN
#define DISABLE_NEWLINE_AUTO_RETURN 0x0008
#endif
#ifndef ENABLE_VIRTUAL_TERMINAL_INPUT
#define ENABLE_VIRTUAL_TERMINAL_INPUT 0x0200
#endif

int main()
{
	DWORD mode;
	DWORD len;

	GetConsoleMode(GetStdHandle(STD_OUTPUT_HANDLE), &mode);
	mode &= ~DISABLE_NEWLINE_AUTO_RETURN;
	SetConsoleMode(GetStdHandle(STD_OUTPUT_HANDLE), mode);

	GetConsoleMode(GetStdHandle(STD_INPUT_HANDLE), &mode);
	mode |= ENABLE_VIRTUAL_TERMINAL_INPUT;
	SetConsoleMode(GetStdHandle(STD_INPUT_HANDLE), mode);

	GetConsoleMode(GetStdHandle(STD_OUTPUT_HANDLE), &mode);
	mode &= ~DISABLE_NEWLINE_AUTO_RETURN;
	SetConsoleMode(GetStdHandle(STD_OUTPUT_HANDLE), mode);

	WriteConsole(GetStdHandle(STD_OUTPUT_HANDLE), "AAA\nBBB\n", 8, &len, 0);
	return 0;
}


[-- Attachment #3: Type: text/plain, Size: 219 bytes --]


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

  reply	other threads:[~2019-08-12 19:44 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-09 18:55 Corinna Vinschen
2019-08-11  7:28 ` Thorsten Kampe
2019-08-12 13:01   ` Corinna Vinschen
2019-08-12 19:44     ` Takashi Yano [this message]
2019-08-13 22:27       ` Thorsten Kampe
2019-08-13 21:45     ` Thorsten Kampe
2019-08-13 21:51       ` Thorsten Kampe
2019-08-14  7:23         ` Takashi Yano
2019-08-12 13:44 ` Takashi Yano
2019-08-12 15:36   ` Corinna Vinschen
2019-08-13 10:48     ` Corinna Vinschen
2019-08-14 11:41       ` Takashi Yano
2019-08-14 11:47         ` Takashi Yano
2019-08-14 13:49           ` Corinna Vinschen
2019-08-14 19:21             ` Takashi Yano
2019-08-15  7:49               ` Corinna Vinschen
2019-08-15 10:36                 ` Corinna Vinschen
2019-08-15 15:04                   ` Corinna Vinschen
2019-08-15 15:09                     ` Corinna Vinschen
2019-08-16 14:58                       ` Corinna Vinschen
2019-08-17 16:59                         ` Takashi Yano
2019-08-18 12:07                           ` Corinna Vinschen
2019-08-18 12:08 ` Achim Gratz
2019-08-18 14:29   ` Corinna Vinschen
2019-08-18 14:51     ` Achim Gratz
2019-08-19  8:56       ` Corinna Vinschen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190813044451.212455aada8a12c30c3aa920@nifty.ne.jp \
    --to=takashi.yano@nifty.ne.jp \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).