comp.lang.ada
 help / color / mirror / Atom feed
From: Georg Bauhaus <bauhaus@futureapps.de>
Subject: plain Ada streams with Windows(TM)
Date: Tue, 02 May 2006 03:24:07 +0200
Date: 2006-05-02T03:23:32+02:00	[thread overview]
Message-ID: <1146533046.9010.38.camel@localhost.localdomain> (raw)

Hello, for a Windows console application using
only plain Ada, is there a way to open standard
input/output using Stream_IO.Open, but not using
Text_Streams? [*]

I have been trying

  open(f, In_File, "CONIN$");

However, this seems to tie input to the console
buffer, i.e., redirected or piped input to my program
doesn't come in. (Besides, the SDK docs say I have to
open shared. A Form string is not supported by
one of the Ada implementations I have, AFAICS.)

The UNIX equivalent (or so I thought)

  open(f, In_File, "/dev/stdin");

works well (with a GNU/Linux system).

Is there a way out, or will I have to write my own
stream? (for a small free software tool, actually.)


[*] Different implementations of Text_IO.Text_Streams,
and in particular Wide_Text_IO.Text_Streams, seem to have
some problems.  Being twice as slow as Stream_IO (GNAT)
is a minor one.
GNAT writes characters not requested when creating a new
stream/file. I find this puzzling (Is this correct?).
Wide_Text_IO.Text_Streams is not working, really, in
OA and hence not an option, obviously.

-- Georg 







             reply	other threads:[~2006-05-02  1:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-02  1:24 Georg Bauhaus [this message]
2006-05-02 21:03 ` plain Ada streams with Windows(TM) Randy Brukardt
2006-05-03 14:43   ` Georg Bauhaus
2006-05-05  2:27     ` Craig Carey <research@ijs.co.nz>
replies disabled

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