From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Received: by 2002:a6b:8f92:: with SMTP id r140-v6mr13070681iod.87.1534413515206; Thu, 16 Aug 2018 02:58:35 -0700 (PDT) X-Received: by 2002:aca:c744:: with SMTP id x65-v6mr784866oif.2.1534413515014; Thu, 16 Aug 2018 02:58:35 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!feeder4.usenet.farm!feed.usenet.farm!weretis.net!feeder6.news.weretis.net!feeder.usenetexpress.com!feeder-in1.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!w19-v6no2247606itb.0!news-out.google.com!c189-v6ni1447ith.0!nntp.google.com!w19-v6no2247602itb.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Thu, 16 Aug 2018 02:58:34 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=101.164.108.182; posting-account=wavAeAoAAAAZF_sXSZepBukuPCBO0Zqt NNTP-Posting-Host: 101.164.108.182 References: <942a9ff7-9acd-47df-9e02-d32aa9fad2e2@googlegroups.com> <856da002-664f-4759-92ea-b4e63331d848@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: Can Ada print coloured/styled text to the terminal? (ANSI escape sequences?) From: alby.gamper@gmail.com Injection-Date: Thu, 16 Aug 2018 09:58:35 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Xref: reader02.eternal-september.org comp.lang.ada:54177 Date: 2018-08-16T02:58:34-07:00 List-Id: On Monday, August 13, 2018 at 8:23:07 PM UTC+10, Aurele Vitali wrote: > As described in the link I previously linked, in order for the new Window= s 10 Console to recognize ANSI escape sequences you must first enable the v= irtual terminal mode by first calling (from within your Ada program) the "S= etConsoleMode" API and setting the "ENABLE_VIRTUAL_TERMINAL_PROCESSING" fla= g. You can also look at the following link and write your own VT100 emula= tor... >=20 > https://gist.github.com/tomzorz/6142d69852f831fb5393654c90a1f22e > =20 > I did something more elaborate, but it works fine. >=20 > Cheers Hi Aurele I have used your C# code sample and converted it to Ada (and using the win3= 2 bindings) and it works/looks fine also. See https://github.com/Alex-Gamper/Ada-Win32/tree/master/Examples/Vt100 Note: this was coded up as a simple test of the Win32 bindings, which actua= lly highlighted issues with the conversion of the C/C++ pre-processor macros! (which have now been resolved on the 'master' branch on GitHub) Alex