X-Recipient: archive-cygwin@delorie.com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:date:from:to:subject:message-id:in-reply-to
	:references:mime-version:content-type; q=dns; s=default; b=uZ55E
	zGirRFtimm84+/JCxWlB/9zKRq4VB6bQeGX1azmUwRbQXh9B5IowBg4/+A8LGVBb
	jVuy2ctgZ9y0mmM2KoEyitHAVVYvnVGTFNMSJliedoNSCnzImEyVVoN3+u4dvmde
	6yogVEcIe15QLvMnNpdn1tfwoOanEr4ChkCMAU=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:date:from:to:subject:message-id:in-reply-to
	:references:mime-version:content-type; s=default; bh=EqNOTA6uTXe
	7GhucWJH9eu+ueH8=; b=O66z+lKqew0zdm7JAYiHriVEInIpJZkWjBQCDoI5cof
	iBDy01PBh3QqMpfKGgRNV9XrDIDmMKP9+Mktlq8FH5hRtWchpWlLtRgUgQfCINgO
	wpE0SHnaULgbX7tqhWYmjwdhLD9sLkgMAJ9nLN2idvaOUn2zg+pd6aOU+B5pHZDw
	=
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Authentication-Results: sourceware.org; auth=none
X-Spam-SWARE-Status: No, score=-6.9 required=5.0 tests=AWL,BAYES_00,KAM_NUMSUBJECT,RCVD_IN_DNSWL_NONE autolearn=no version=3.3.1 spammy=AAA
X-HELO: conssluserg-01.nifty.com
DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-01.nifty.com x7CJicOa029821
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.ne.jp;	s=dec2015msa; t=1565639078;	bh=DMHfB2xRySWtUzSz+TGpob9Mcj0FR9aj76ipaF2rZ9Y=;	h=Date:From:To:Subject:In-Reply-To:References:From;	b=zj8cQtuNcCWb8awEj/i93CX0zZMSDiTd9FLc0yPb/wImQ+2PoceYFR7KUG81B8tQi	 2rWlydv+RZu09mfGnumqi4ySNvmdeCejO5Cx5ia5U4fQaVu9aP1TZAaVl8cVrUcdua	 C8/EX5J9BH/PtsleliGov1yTWO8nArGbdIWMn35B6uxOtmDYmcb2MrrcaICuyY1+6S	 HPP3cOD6rVNLtceV3OAyrgGxtyQDvIxw5ebR9Sc9v0E8821KZ7XgSeJnLYfDBk8aHy	 dyrQ39SikJ9SlweX7FRqW1pNJ3u7drhdfsgDkl/ZJZVJ6gdXZNtHwFmut9T0LzpwMp	 5V/dc4rpg/8og==
Date: Tue, 13 Aug 2019 04:44:51 +0900
From: Takashi Yano <takashi.yano@nifty.ne.jp>
To: cygwin@cygwin.com
Subject: Re: [ANNOUNCEMENT] TEST: Cygwin 3.1.0-0.1
Message-Id: <20190813044451.212455aada8a12c30c3aa920@nifty.ne.jp>
In-Reply-To: <20190812130152.GI11632@calimero.vinschen.de>
References: <announce.20190809185338.GZ11632@calimero.vinschen.de>	<qiog1q$5gfi$1@blaine.gmane.org>	<20190812130152.GI11632@calimero.vinschen.de>
Mime-Version: 1.0
Content-Type: multipart/mixed; boundary="Multipart=_Tue__13_Aug_2019_04_44_51_+0900_9iuvQSEBzgPX7x9."
X-IsSubscribed: yes

--Multipart=_Tue__13_Aug_2019_04_44_51_+0900_9iuvQSEBzgPX7x9.
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit

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>

--Multipart=_Tue__13_Aug_2019_04_44_51_+0900_9iuvQSEBzgPX7x9.
Content-Type: text/x-csrc;
 name="conemu-chk.c"
Content-Disposition: attachment;
 filename="conemu-chk.c"
Content-Transfer-Encoding: 7bit

#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;
}


--Multipart=_Tue__13_Aug_2019_04_44_51_+0900_9iuvQSEBzgPX7x9.
Content-Type: text/plain; charset=us-ascii


--
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
--Multipart=_Tue__13_Aug_2019_04_44_51_+0900_9iuvQSEBzgPX7x9.--
