comp.lang.ada
 help / color / mirror / Atom feed
From: alby.gamper@gmail.com
Subject: Re: Can Ada print coloured/styled text to the terminal? (ANSI escape sequences?)
Date: Thu, 16 Aug 2018 02:58:34 -0700 (PDT)
Date: 2018-08-16T02:58:34-07:00	[thread overview]
Message-ID: <f94cf36b-3ad2-464f-a12b-da8531061782@googlegroups.com> (raw)
In-Reply-To: <aef4df7c-3718-4861-a0f0-5b9872db7d93@googlegroups.com>

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 Windows 10 Console to recognize ANSI escape sequences you must first enable the virtual terminal mode by first calling (from within your Ada program) the "SetConsoleMode" API and setting the "ENABLE_VIRTUAL_TERMINAL_PROCESSING" flag.   You can also look at the following link and write your own VT100 emulator...
> 
> https://gist.github.com/tomzorz/6142d69852f831fb5393654c90a1f22e
>  
> I did something more elaborate, but it works fine.
> 
> Cheers

Hi Aurele

I have used your C# code sample and converted it to Ada (and using the win32
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 actually
highlighted issues with the conversion of the C/C++ pre-processor macros!
(which have now been resolved on the 'master' branch on GitHub)

Alex


  reply	other threads:[~2018-08-16  9:58 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-04  1:37 Can Ada print coloured/styled text to the terminal? (ANSI escape sequences?) Hazz
2018-08-04  1:59 ` Lucretia
2018-08-04  2:21 ` Hazz
2018-08-04  9:07 ` Jeffrey R. Carter
2018-08-06  6:35   ` briot.emmanuel
2018-08-06 22:15     ` Randy Brukardt
2018-08-07  5:12       ` Per Sandberg
2018-08-07 22:31         ` Randy Brukardt
2018-08-08  6:39           ` Per Sandberg
2018-08-08 17:59             ` Randy Brukardt
2018-08-08 18:28               ` Dmitry A. Kazakov
2018-08-08 19:23                 ` Dan'l Miller
2018-08-07  8:33       ` Dmitry A. Kazakov
2018-08-07 13:59         ` Dan'l Miller
2018-08-07 22:36         ` Randy Brukardt
2018-08-09 17:08           ` G. B.
2018-08-07  0:01 ` Aurele
2018-08-12 20:56   ` Matt Borchers
2018-08-13 10:23     ` Aurele Vitali
2018-08-16  9:58       ` alby.gamper [this message]
2018-08-16 12:29         ` Aurele Vitali
2018-08-16 12:52           ` alby.gamper
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox