From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,7ae711c481a7059 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-11-07 02:51:04 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!fr.usenet-edu.net!usenet-edu.net!enst.fr!not-for-mail From: "Grein, Christoph" Newsgroups: comp.lang.ada Subject: Re: Can I treat Current_Output as a file of bytes? Date: Thu, 7 Nov 2002 07:28:46 +0100 (MET) Organization: ENST, France Sender: comp.lang.ada-admin@ada.eu.org Message-ID: Reply-To: comp.lang.ada@ada.eu.org NNTP-Posting-Host: marvin.enst.fr Mime-Version: 1.0 Content-Type: TEXT/plain; charset=us-ascii X-Trace: avanie.enst.fr 1036666263 80491 137.194.161.2 (7 Nov 2002 10:51:03 GMT) X-Complaints-To: usenet@enst.fr NNTP-Posting-Date: Thu, 7 Nov 2002 10:51:03 +0000 (UTC) Return-Path: X-Authentication-Warning: mail.eurocopter.com: uucp set sender to using -f Content-MD5: o8EVJuTjR0blh0z6vdPKGQ== X-Mailer: dtmail 1.2.1 CDE Version 1.2.1 SunOS 5.6 sun4u sparc Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org X-Mailman-Version: 2.0.13 Precedence: bulk X-Reply-To: "Grein, Christoph" List-Unsubscribe: , List-Id: comp.lang.ada mail<->news gateway List-Post: List-Help: List-Subscribe: , Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org Xref: archiver1.google.com comp.lang.ada:30515 Date: 2002-11-07T07:28:46+01:00 > X-Trace: newsb.telia.net 1036629893 213.64.50.193 (Thu, 07 Nov 2002 01:44:53 CET) > Date: Thu, 07 Nov 2002 00:44:53 +0000 (GMT) > I want to read as much data as is available, and then process that before > I wait for more. I thought I had solved that with Get_Immediate, but it > turns out that Get_Immediate (or rather some underlying C routine) > translates CR LF to a single LF when running in Windows, and I can't find > any other way to check if input is available. Neither can I push back what > I've read with Get_Immediate to read it again with Character'Read. > > (I'm using Gnat 3.14p in Windows and 3.13p in Redhat.) There are two forms of Get_Immediate: One blocking until data is available, the other not blocking and returning a boolean to indicate whether data is available. There is also a look-ahead.