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: border1.nntp.ams.giganews.com!nntp.giganews.com!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Jeffrey Carter Newsgroups: comp.lang.ada Subject: Re: Will Ada-95 Programs Written in MS Windows Run in MacOS and Linux Without Some Tweaking. Date: Sun, 08 Dec 2013 11:17:39 -0700 Organization: Also freenews.netfront.net; news.tornevall.net Message-ID: References: <1d445f04-b670-444f-9858-55da271fe17a@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Sun, 8 Dec 2013 18:17:41 +0000 (UTC) Injection-Info: mx05.eternal-september.org; posting-host="d716681e5561c3b384255e38d5f024ca"; logging-data="14521"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19IyxnUNHhMeH3c1WTp1+jW7esRw0WVZK8=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.0 In-Reply-To: Cancel-Lock: sha1:KYlAVMfebf0DkeXGyTce9PPj0+8= Xref: number.nntp.dca.giganews.com comp.lang.ada:184141 Date: 2013-12-08T11:17:39-07:00 List-Id: On 12/08/2013 10:17 AM, Simon Wright wrote: > > I'm not sure of the best way to get an Ada program not to care what sort > of input line terminators it's reading. You read the file using something like Sequential_IO and handle line terminators yourself. I found that on Linux one can handle Windows line terminators by using Text_IO and checking if the last character is a CR. However, files in "Mac format" (CR for line terminator) don't work with Text_IO under Linux. -- Jeff Carter "Spam! Spam! Spam! Spam! Spam! Spam! Spam! Spam!" Monty Python's Flying Circus 53