X-Recipient: archive-cygwin AT delorie DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 846E8395C06F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1615375934; bh=fcZXRe/OGkY2YRmg4c38iZ+GnbWweaaoCyRlem08Gug=; h=Date:To:Subject:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=nzJUeVkoIWBHXhwIpE4jGTdfLcadzKPXyNum/hYFt/c9R+VS3ySOe5k8RmnO/remp +t9tQhwTcFwNIjgnQqsXDOz/gUWaTJkoIwuei2I4ifhOkbqvufqUFPSyAEutO1gai0 UCj9Ww92zkJ8UVeZ9IpYV9BdUgkKc58nQWdVu2os= X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 8CFC838708CB DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-06.nifty.com 12ABVi10005685 X-Nifty-SrcIP: [118.243.85.178] Date: Wed, 10 Mar 2021 20:31:46 +0900 To: cygwin AT cygwin DOT com Subject: Re: [ANNOUNCEMENT] cygwin 3.2.0-0.1 (TEST) Message-Id: <20210310203146.7107c223f5ebdfc037751e55@nifty.ne.jp> In-Reply-To: References: X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.30; i686-pc-mingw32) Mime-Version: 1.0 X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: cygwin AT cygwin DOT com X-Mailman-Version: 2.1.29 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Takashi Yano via Cygwin Reply-To: Takashi Yano Content-Type: text/plain; charset="utf-8" Errors-To: cygwin-bounces AT cygwin DOT com Sender: "Cygwin" Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by delorie.com id 12ABWGYw019881 On Wed, 10 Mar 2021 03:38:52 +0000 André Bleau wrote: > Hi, > > Last year, I reported a problem about console output with pcon support. For the simple test program, see: > https://cygwin.com/pipermail/cygwin/2020-May/244742.html > > I was told (https://cygwin.com/pipermail/cygwin/2020-May/244745.html) that I need to inset the following lines in my program: > > #include > ... > DWORD mode; > GetConsoleMode(GetStdHandle(STD_OUTPUT_HANDLE), &mode); > mode |= ENABLE_VIRTUAL_TERMINAL_PROCESSING; > SetConsoleMode(GetStdHandle(STD_OUTPUT_HANDLE), mode); > > It worked. > > Now, I just downloaded cygwin 3.2.0-0.1 and retested my program with and without the above lines. Both work correctly. > > Are the above lines no longer necessary? In that case, it could be useful to say so in the release notes. This is due to behaviour change of pseudo console itself. In Win10 20H2 (and perhaps also in 2004), ENABLE_VIRTUAL_TERMINAL_PROCESSNG is set by default in pseudo console. However, older Win10 such as 1809, this flag is not set. Therefore, you need to set this flag explicitly. Also, in command prompt, this flag is not set even with Win10 20H2. So, I recommend to keep this flag set for portability. -- Takashi Yano -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation: https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple