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=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!nntp-feed.chiark.greenend.org.uk!ewrotcd!newsfeed.xs3.de!io.xs3.de!news.jacob-sparre.dk!franka.jacob-sparre.dk!pnx.dk!.POSTED.rrsoftware.com!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Can Ada print coloured/styled text to the terminal? (ANSI escape sequences?) Date: Tue, 7 Aug 2018 17:36:25 -0500 Organization: JSA Research & Innovation Message-ID: References: <810948b7-1370-4c0d-aaf3-ed66b7dfbba5@googlegroups.com> Injection-Date: Tue, 7 Aug 2018 22:36:26 -0000 (UTC) Injection-Info: franka.jacob-sparre.dk; posting-host="rrsoftware.com:24.196.82.226"; logging-data="26993"; mail-complaints-to="news@jacob-sparre.dk" X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Response X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.7246 Xref: reader02.eternal-september.org comp.lang.ada:54089 Date: 2018-08-07T17:36:25-05:00 List-Id: "Dmitry A. Kazakov" wrote in message news:pkblh9$b97$1@gioia.aioe.org... > On 2018-08-07 00:15, Randy Brukardt wrote: >> 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. Really? Why? ANSI.SYS was depreciated some decades ago; my understanding was that it was unsupported on Windows 7 and 8. Going back the dinosaur age makes little sense (and causes security issues). There's really no good reason to use TUIs anyway; either write a proper GUI or use a browser for your interface (HTML is no harder to write than escape sequences). If that's overkill, then basic Put_Line is enough. Randy.