comp.lang.ada
 help / color / mirror / Atom feed
From: ak@muc.de
Subject: Re: Buffered I/O with GNAT on Linux
Date: 1998/06/14
Date: 1998-06-14T00:00:00+00:00	[thread overview]
Message-ID: <m3pvgcukhj.fsf@fred.muc.de> (raw)
In-Reply-To: dewar.897825854@merv


dewar@merv.cs.nyu.edu (Robert Dewar) writes:

> Markus comments on the buffering in GNAT. This is totally under control
> of the user, as documented in the GNAT manual. THe default for a non-regular
> file is buffering off, which is what most people want as a default!

This looks like a lousy default. How about doing a isatty(1)[1] first like
C stdio does?  If it is a terminal turn buffering off (or turn it into
line buffering), when it is no terminal turn it on. 

This would make writing unix-style filters in GNAT more efficient.

-Andi

[1] Actually glibc 2.0 under Linux does fstat(1, ..) and checks st_rdev,
but that should be equivalent.




      parent reply	other threads:[~1998-06-14  0:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-06-14  0:00 Buffered I/O with GNAT on Linux Markus Kuhn
1998-06-14  0:00 ` Robert Dewar
1998-06-14  0:00   ` Markus Kuhn
1998-06-15  0:00     ` Tarjei T. Jensen
1998-06-15  0:00     ` Tarjei T. Jensen
1998-06-14  0:00   ` ak [this message]
replies disabled

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