comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: reading from a pipe
Date: Wed, 27 Feb 2013 20:39:11 +0100
Date: 2013-02-27T20:39:11+01:00	[thread overview]
Message-ID: <1uyugjda6ajzz$.sn0mr1zhw5ws$.dlg@40tude.net> (raw)
In-Reply-To: 8975ebc3-3198-43e6-be68-f3e2ee84bc37@googlegroups.com

On Wed, 27 Feb 2013 09:36:32 -0800 (PST), milouz wrote:

> I'd like to know how to read some bytes from a pipe or some other
> non-regular file such as device. I had a look at streams_io, direct_io,
> etc. but was not able to code something working.
> 
> How do we do that in Ada ?

There is no Ada way of doing that, because such operations are OS-specific.

Otherwise, you use the services provided by the OS at hand. E.g. under
Windows you call CreateFile, then do ReadFile. These are provided by
Win32Ada bindings.

There are also some libraries available that provide some layer of OS
abstraction, e.g. Glib. For these there exist Ada bindings as well.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de



  parent reply	other threads:[~2013-02-27 19:39 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-27 17:36 reading from a pipe milouz
2013-02-27 19:22 ` Eryndlia Mavourneen
2013-02-27 19:39 ` Dmitry A. Kazakov [this message]
2013-02-28  2:59 ` ytomino
2013-02-28 12:00   ` milouz
replies disabled

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