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=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: "Jeffrey R. Carter" Newsgroups: comp.lang.ada Subject: Re: Problem with Unbounded Strings Date: Fri, 4 Dec 2015 16:59:33 -0700 Organization: Also freenews.netfront.net; news.tornevall.net; news.eternal-september.org Message-ID: References: <274dc49b-b7cd-4eef-b333-34bae665c992@googlegroups.com> <1957dd23-1034-43fb-b933-c74a7d694207@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Injection-Date: Fri, 4 Dec 2015 23:57:09 -0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="caa759af2a9c666aec02942f6fe5abd6"; logging-data="5939"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1//kX93QYSOZqEuzAmiv0BUIhPMzqNFXCI=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 In-Reply-To: <1957dd23-1034-43fb-b933-c74a7d694207@googlegroups.com> Cancel-Lock: sha1:5P0O0HfQHktvCoKWs3zX2kVDzuA= X-Enigmail-Draft-Status: N1110 Xref: news.eternal-september.org comp.lang.ada:28652 Date: 2015-12-04T16:59:33-07:00 List-Id: On 12/04/2015 04:35 PM, Laurent wrote: > > Is there no function in the text io libraries to check which line endings are used? Afraid not. If you're processing files from several platforms, you can check for and trim off a CR at the end. This will work with files from either platform. However, all bets are off if you might get a file with the old Mac CR line terminators. I worked on a system that used the Get_Line function and dealt with CRs as above since many of the files we processed were produced on Windows systems. One day we got a 5-MB file saved with CRs for line terminators. Get_Line attempted to read a 5-MB line. That was not pretty. -- Jeff Carter "Well, a gala day is enough for me. I don't think I can handle any more." Duck Soup 93