From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Can Ada print coloured/styled text to the terminal? (ANSI escape sequences?)
Date: Tue, 7 Aug 2018 10:33:44 +0200
Date: 2018-08-07T10:33:44+02:00 [thread overview]
Message-ID: <pkblh9$b97$1@gioia.aioe.org> (raw)
In-Reply-To: pkah97$6q8$1@franka.jacob-sparre.dk
On 2018-08-07 00:15, Randy Brukardt wrote:
> <briot.emmanuel@gmail.com> wrote in message
> news:810948b7-1370-4c0d-aaf3-ed66b7dfbba5@googlegroups.com...
>
>> You can also take a look at GNATCOLL.terminal, in the GNAT
>> Components Collection. It will do colors either using ansi escape
>> sequences or, on Windows, proper system calls. In terms of
>> portability, better to think early on that not all terminals support
>> escape sequences...
>
> And they don't all support the same escape sequences, either. But most
> important is that Windows almost never supports escape sequences, so any
> code that you want to be reasonably portable has to avoid them.
I didn't test it, because the idea to use character terminal in XXI
century is beyond silly, but I heard that Windows 10 cmd has them
enabled. It took less than 3 decades to do, but they finally managed it!
On older versions ANSI.SYS driver is required.
> (If you want
> it really portable, that is to work with other Ada compileers, you have to
> avoid GNATCOLL, too, since it is GNAT-specific.)
There are lots of GUI frameworks with Ada support for Windows as well as
raw Windows GDI bindings. No reason to mess with terminal commands.
--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de
next prev parent reply other threads:[~2018-08-07 8:33 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 [this message]
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
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