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.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII X-Google-Thread: 103376,7ae711c481a7059 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-11-06 16:44:54 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!news-stob.telia.net!telia.net!194.22.194.4.MISMATCH!masternews.telia.net.!newsb.telia.net.POSTED!not-for-mail From: Bj�rn Persson Newsgroups: comp.lang.ada Subject: Re: Can I treat Current_Output as a file of bytes? Message-ID: <20021107014453.6774d605.bjorn_persson.spam-is-evil@sverige.nu> References: <20021104233454.2042ef78.bjorn_persson.spam-is-evil@sverige.nu> <4519e058.0211050630.7eb31354@posting.google.com> <20021105170130.2684e53f.bjorn_persson.spam-is-evil@sverige.nu> <4519e058.0211051427.48557033@posting.google.com> X-Newsreader: Sylpheed version 0.5.0 (GTK+ 1.2.10; i386-redhat-linux) Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Date: Thu, 07 Nov 2002 00:44:53 GMT NNTP-Posting-Host: 213.64.50.193 X-Complaints-To: abuse@telia.com X-Trace: newsb.telia.net 1036629893 213.64.50.193 (Thu, 07 Nov 2002 01:44:53 CET) NNTP-Posting-Date: Thu, 07 Nov 2002 01:44:53 CET Organization: Telia Internet Xref: archiver1.google.com comp.lang.ada:30494 Date: 2002-11-07T00:44:53+00:00 List-Id: On 5 Nov 2002 14:27:39 -0800 dennison@telepath.com (Ted Dennison) wrote: > Bj rn Persson wrote in message >news:<20021105170130.2684e53f.bjorn_persson.spam-is-evil@sverige.nu>... > > On 5 Nov 2002 06:30:59 -0800 > > dennison@telepath.com (Ted Dennison) wrote: > > > Supposedly, that's what Ada.Text_IO.Text_Streams is there for (see > > > > Hmm, I didn't try that because I assumed that it would write through the > > usual Standard_Output, and so the line break would be added anyways, but > > maybe I should give it a try. > > That's my worry too. Tell us how it works. :-) It seems to work well for output, but I've run into problems with input. 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.) Bj�rn Persson