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!news.uzoreto.com!news.redatomik.org!newsfeed.xs4all.nl!newsfeed7.news.xs4all.nl!85.12.16.70.MISMATCH!peer03.ams1!peer.ams1.xlned.com!news.xlned.com!peer02.am4!peer.am4.highwinds-media.com!news.highwinds-media.com!fx06.am4.POSTED!not-for-mail Subject: Re: Can Ada print coloured/styled text to the terminal? (ANSI escape sequences?) Newsgroups: comp.lang.ada References: <810948b7-1370-4c0d-aaf3-ed66b7dfbba5@googlegroups.com> From: Per Sandberg User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Message-ID: X-Complaints-To: abuse@usenet.se NNTP-Posting-Date: Tue, 07 Aug 2018 05:12:05 UTC Organization: usenet.se Date: Tue, 7 Aug 2018 07:12:05 +0200 X-Received-Bytes: 2040 X-Received-Body-CRC: 350873293 Xref: reader02.eternal-september.org comp.lang.ada:54079 Date: 2018-08-07T07:12:05+02:00 List-Id: On 08/07/18 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. (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.) > > Randy. > > > Yes these source-code libraries are strongly associated with GNAT, but most of the code is compilable with "any" ada-12 compiler without change and they are battle proven so whey not use them instead of reinventing the wheel. /P