Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

Real Users know your home telephone number.


devel / comp.lang.ada / Re: Bold text (in terminal) from Ada?

SubjectAuthor
* Bold text (in terminal) from Ada?reinert
+- Re: Bold text (in terminal) from Ada?Jeffrey R.Carter
+- Re: Bold text (in terminal) from Ada?Niklas Holsti
`* Re: Bold text (in terminal) from Ada?Stephen Leake
 `* Re: Bold text (in terminal) from Ada?reinert
  `* Re: Bold text (in terminal) from Ada?Emmanuel Briot
   `- Re: Bold text (in terminal) from Ada?onox

1
Bold text (in terminal) from Ada?

<77f28b34-63ef-4903-a111-026968c0918dn@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=8897&group=comp.lang.ada#8897

  copy link   Newsgroups: comp.lang.ada
X-Received: by 2002:a05:622a:5149:b0:38d:961c:a568 with SMTP id ew9-20020a05622a514900b0038d961ca568mr17816060qtb.511.1665475614250;
Tue, 11 Oct 2022 01:06:54 -0700 (PDT)
X-Received: by 2002:a05:6214:c4e:b0:4b1:aa37:f4c1 with SMTP id
r14-20020a0562140c4e00b004b1aa37f4c1mr17612941qvj.107.1665475603087; Tue, 11
Oct 2022 01:06:43 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.ada
Date: Tue, 11 Oct 2022 01:06:42 -0700 (PDT)
Injection-Info: google-groups.googlegroups.com; posting-host=84.209.88.37; posting-account=bPTmZAoAAAC_6HP9XLKB9aAAxBa6BuOR
NNTP-Posting-Host: 84.209.88.37
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <77f28b34-63ef-4903-a111-026968c0918dn@googlegroups.com>
Subject: Bold text (in terminal) from Ada?
From: reinkor@gmail.com (reinert)
Injection-Date: Tue, 11 Oct 2022 08:06:54 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 1081
 by: reinert - Tue, 11 Oct 2022 08:06 UTC

Any simple way to print out bold text from an Ada program?
In case, how?

Assume linux.

reinert

Re: Bold text (in terminal) from Ada?

<ti3abj$11edh$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=8898&group=comp.lang.ada#8898

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: spam.jrcarter.not@spam.acm.org.not (Jeffrey R.Carter)
Newsgroups: comp.lang.ada
Subject: Re: Bold text (in terminal) from Ada?
Date: Tue, 11 Oct 2022 10:43:31 +0200
Organization: A noiseless patient Spider
Lines: 23
Message-ID: <ti3abj$11edh$1@dont-email.me>
References: <77f28b34-63ef-4903-a111-026968c0918dn@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 11 Oct 2022 08:43:31 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="3ad25625c99a564dd24967e4a8f6372d";
logging-data="1096113"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+4BsHsK9oakK+imscafcSkRM6UVFoe6Kw="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.2.2
Cancel-Lock: sha1:HM3117uN8KNa4yxXeigdyomCmrY=
Content-Language: en-US
In-Reply-To: <77f28b34-63ef-4903-a111-026968c0918dn@googlegroups.com>
 by: Jeffrey R.Carter - Tue, 11 Oct 2022 08:43 UTC

On 2022-10-11 10:06, reinert wrote:
> Any simple way to print out bold text from an Ada program?
> In case, how?
>
> Assume linux.

Looking at PragmARC.Ansi_Tty_Control
(https://github.com/jrcarter/PragmARC/blob/Ada-12/pragmarc-ansi_tty_control.ads)
we can see that sending

PragmARC.Ansi_Tty_Control.Bold_Mode

to most Linux terminal emulators initiates bold mode.

--
Jeff Carter
"Simplicity and elegance are unpopular because
they require hard work and discipline to
achieve and education to be appreciated."
Edsger Dijkstra
170

Re: Bold text (in terminal) from Ada?

<jqkp05Fn8h5U1@mid.individual.net>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=8899&group=comp.lang.ada#8899

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: niklas.holsti@tidorum.invalid (Niklas Holsti)
Newsgroups: comp.lang.ada
Subject: Re: Bold text (in terminal) from Ada?
Date: Tue, 11 Oct 2022 11:49:09 +0300
Organization: Tidorum Ltd
Lines: 33
Message-ID: <jqkp05Fn8h5U1@mid.individual.net>
References: <77f28b34-63ef-4903-a111-026968c0918dn@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: individual.net qiXdDR/mYkEzHE7Gj5EMAQVUAIsCy4AbVn9gETr+7LoNgZv9Dy
Cancel-Lock: sha1:xmLn4szeoBV+fAgQUEAFmVcw2n0=
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:102.0)
Gecko/20100101 Thunderbird/102.2.2
Content-Language: en-US
In-Reply-To: <77f28b34-63ef-4903-a111-026968c0918dn@googlegroups.com>
 by: Niklas Holsti - Tue, 11 Oct 2022 08:49 UTC

On 2022-10-11 11:06, reinert wrote:
> Any simple way to print out bold text from an Ada program?
> In case, how?
>
> Assume linux.
>
> reinert

Print the corresponding ANSI control sequence to turn on bold mode
before you print the text, then print the ANSI control sequence to turn
off bold mode.

See https://www.linux.org/threads/ansi-codes-and-colorized-terminals.11706/.

Example:

with Ada.Characters.Latin_1;
with Ada.Text_IO;
procedure Be_Bold
is
use Ada.Characters, Ada.Text_IO;
begin
Put ("This is a very ");
-- Bold mode:
Put (Latin_1.ESC); Put ("[1m");
Put ("bold");
-- Normal mode:
Put (Latin_1.ESC); Put ("[0m");
Put_Line (" program.");
end Be_Bold;

Re: Bold text (in terminal) from Ada?

<86mta1hpee.fsf@stephe-leake.org>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=8901&group=comp.lang.ada#8901

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!aioe.org!gy7opw3oYmwPg+L8gXeD2w.user.46.165.242.75.POSTED!not-for-mail
From: stephen_leake@stephe-leake.org (Stephen Leake)
Newsgroups: comp.lang.ada
Subject: Re: Bold text (in terminal) from Ada?
Date: Tue, 11 Oct 2022 17:11:21 -0700
Organization: Aioe.org NNTP Server
Message-ID: <86mta1hpee.fsf@stephe-leake.org>
References: <77f28b34-63ef-4903-a111-026968c0918dn@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain
Injection-Info: gioia.aioe.org; logging-data="15365"; posting-host="gy7opw3oYmwPg+L8gXeD2w.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (windows-nt)
X-Notice: Filtered by postfilter v. 0.9.2
Cancel-Lock: sha1:Y5AbVuzJZqKXNxzV1AyoZN2nadc=
 by: Stephen Leake - Wed, 12 Oct 2022 00:11 UTC

reinert <reinkor@gmail.com> writes:

> Any simple way to print out bold text from an Ada program?
> In case, how?

Totally depends on what device you are printing to.

Others have posted solutions for terminals that respect certain control
codes.

If you are printing to paper or a pdf file, you'll need to use some
typesetting program like latex or Open Office document.

> Assume linux.

Not enough information.

--
-- Stephe

Re: Bold text (in terminal) from Ada?

<103d4957-016a-44a3-a9cb-07d266991f47n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=8903&group=comp.lang.ada#8903

  copy link   Newsgroups: comp.lang.ada
X-Received: by 2002:ad4:5b8b:0:b0:4b3:f368:de23 with SMTP id 11-20020ad45b8b000000b004b3f368de23mr12618207qvp.73.1665549401407;
Tue, 11 Oct 2022 21:36:41 -0700 (PDT)
X-Received: by 2002:a05:620a:4083:b0:6ce:7e02:5cb8 with SMTP id
f3-20020a05620a408300b006ce7e025cb8mr19245920qko.170.1665549401260; Tue, 11
Oct 2022 21:36:41 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.ada
Date: Tue, 11 Oct 2022 21:36:41 -0700 (PDT)
In-Reply-To: <86mta1hpee.fsf@stephe-leake.org>
Injection-Info: google-groups.googlegroups.com; posting-host=84.209.88.37; posting-account=bPTmZAoAAAC_6HP9XLKB9aAAxBa6BuOR
NNTP-Posting-Host: 84.209.88.37
References: <77f28b34-63ef-4903-a111-026968c0918dn@googlegroups.com> <86mta1hpee.fsf@stephe-leake.org>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <103d4957-016a-44a3-a9cb-07d266991f47n@googlegroups.com>
Subject: Re: Bold text (in terminal) from Ada?
From: reinkor@gmail.com (reinert)
Injection-Date: Wed, 12 Oct 2022 04:36:41 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 1727
 by: reinert - Wed, 12 Oct 2022 04:36 UTC

No partly general solution?

reinert

onsdag 12. oktober 2022 kl. 02:11:25 UTC+2 skrev Stephen Leake:
> reinert <rei...@gmail.com> writes:
>
> > Any simple way to print out bold text from an Ada program?
> > In case, how?
> Totally depends on what device you are printing to.
>
> Others have posted solutions for terminals that respect certain control
> codes.
>
> If you are printing to paper or a pdf file, you'll need to use some
> typesetting program like latex or Open Office document.
>
> > Assume linux.
>
> Not enough information.
>
> --
> -- Stephe

Re: Bold text (in terminal) from Ada?

<4186b061-b291-4017-b771-84cc256fcec2n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=8904&group=comp.lang.ada#8904

  copy link   Newsgroups: comp.lang.ada
X-Received: by 2002:a05:620a:290d:b0:6b5:cecc:1cab with SMTP id m13-20020a05620a290d00b006b5cecc1cabmr18953596qkp.465.1665555446556;
Tue, 11 Oct 2022 23:17:26 -0700 (PDT)
X-Received: by 2002:a37:a996:0:b0:6ec:59da:a72 with SMTP id
s144-20020a37a996000000b006ec59da0a72mr10840228qke.676.1665555446389; Tue, 11
Oct 2022 23:17:26 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!1.us.feeder.erje.net!feeder.erje.net!border-1.nntp.ord.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.ada
Date: Tue, 11 Oct 2022 23:17:26 -0700 (PDT)
In-Reply-To: <103d4957-016a-44a3-a9cb-07d266991f47n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2a01:e0a:810:89e0:80e2:979f:ef17:b2d8;
posting-account=6yLzewoAAABoisbSsCJH1SPMc9UrfXBH
NNTP-Posting-Host: 2a01:e0a:810:89e0:80e2:979f:ef17:b2d8
References: <77f28b34-63ef-4903-a111-026968c0918dn@googlegroups.com>
<86mta1hpee.fsf@stephe-leake.org> <103d4957-016a-44a3-a9cb-07d266991f47n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <4186b061-b291-4017-b771-84cc256fcec2n@googlegroups.com>
Subject: Re: Bold text (in terminal) from Ada?
From: briot.emmanuel@gmail.com (Emmanuel Briot)
Injection-Date: Wed, 12 Oct 2022 06:17:26 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 1
 by: Emmanuel Briot - Wed, 12 Oct 2022 06:17 UTC

Another candidate is GNATCOLL.Terminal
It supports the ANSI sequences and the Windows historical terminal (the newer Windows Terminal supports the ANSI sequences)

Re: Bold text (in terminal) from Ada?

<e073cce1-cf02-45e7-a110-ba857c8b7238n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=8907&group=comp.lang.ada#8907

  copy link   Newsgroups: comp.lang.ada
X-Received: by 2002:a0c:9a0d:0:b0:4b1:982e:96d4 with SMTP id p13-20020a0c9a0d000000b004b1982e96d4mr2520242qvd.114.1665715568574;
Thu, 13 Oct 2022 19:46:08 -0700 (PDT)
X-Received: by 2002:a37:a996:0:b0:6ec:59da:a72 with SMTP id
s144-20020a37a996000000b006ec59da0a72mr2340621qke.676.1665715568390; Thu, 13
Oct 2022 19:46:08 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.ada
Date: Thu, 13 Oct 2022 19:46:08 -0700 (PDT)
In-Reply-To: <4186b061-b291-4017-b771-84cc256fcec2n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=80.114.173.245; posting-account=BtkjvAoAAADwEquGb07eykXfyiDMOxfl
NNTP-Posting-Host: 80.114.173.245
References: <77f28b34-63ef-4903-a111-026968c0918dn@googlegroups.com>
<86mta1hpee.fsf@stephe-leake.org> <103d4957-016a-44a3-a9cb-07d266991f47n@googlegroups.com>
<4186b061-b291-4017-b771-84cc256fcec2n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <e073cce1-cf02-45e7-a110-ba857c8b7238n@googlegroups.com>
Subject: Re: Bold text (in terminal) from Ada?
From: denkpadje@gmail.com (onox)
Injection-Date: Fri, 14 Oct 2022 02:46:08 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 1416
 by: onox - Fri, 14 Oct 2022 02:46 UTC

If you're using Alire, try Mosteo's ansiada crate. Add it to your own project with `alr with ansiada`. See https://ada-lang.io/ to get started.


devel / comp.lang.ada / Re: Bold text (in terminal) from Ada?

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor