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 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII X-Google-Thread: 103376,87f589d0052c40b3 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-09-29 07:21:43 PST Path: news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!news-FFM2.ecrc.net!news.iks-jena.de!not-for-mail From: Lutz Donnerhacke Newsgroups: comp.lang.ada Subject: Re: procedure Create(file : in out File_Type; from : in Stream_Access); ? Date: Mon, 29 Sep 2003 14:21:43 +0000 (UTC) Organization: IKS GmbH Jena Message-ID: References: NNTP-Posting-Host: taranis.iks-jena.de Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: branwen.iks-jena.de 1064845303 20335 217.17.192.37 (29 Sep 2003 14:21:43 GMT) X-Complaints-To: usenet@iks-jena.de NNTP-Posting-Date: Mon, 29 Sep 2003 14:21:43 +0000 (UTC) User-Agent: slrn/0.9.7.4 (Linux) Xref: news1.google.com comp.lang.ada:162 Date: 2003-09-29T14:21:43+00:00 List-Id: * sk wrote: > lutz@iks-jena.de: > > Knows anybody out there a way to create a File_Type (for > > Ada.Text_IO) from a Ada.Streams.Root_Type derivate? > > Without knowing exactly what you are aiming at : You got the point exactly enough. I'd like to apply Text_IO procedures to a Stream (i.e. from GNAT.Sockets). > 1) Cut'n'paste File_Type into your code; manually > hook the stream in; UC it into and Ada.Text_Io file type. > > 2) If possible (using GNAT 3.15p packages) try using > the package Ada.Text_Io.C_Streams which can hook up > a "C" style stream to an Ada.Text_Io.File_Type. Found both yesterday, but: 1) is very implementation dependant. 2) requires an non portable way to convert GNAT.Sockets.Streams into C_Streams. > Not much help, but I vaguely recall that the 2nd method > (Ada.Text_Io.C_Streams.Open) can be very useful in that > one can use Text_Io to do the parsing instead of having > to reimplement parsers to look for "CRLF" or "LF" etc > for oneself. Exactly. I'm looking f�r CRLF in the stream. Now I wrote a Get_Line myself. :-/