comp.lang.ada
 help / color / mirror / Atom feed
* plain Ada streams with Windows(TM)
@ 2006-05-02  1:24 Georg Bauhaus
  2006-05-02 21:03 ` Randy Brukardt
  0 siblings, 1 reply; 4+ messages in thread
From: Georg Bauhaus @ 2006-05-02  1:24 UTC (permalink / 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 







^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-05-05  2:27 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-05-02  1:24 plain Ada streams with Windows(TM) Georg Bauhaus
2006-05-02 21:03 ` Randy Brukardt
2006-05-03 14:43   ` Georg Bauhaus
2006-05-05  2:27     ` Craig Carey <research@ijs.co.nz>

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