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=unavailable autolearn_force=no version=3.4.4 X-Received: by 2002:a02:4f03:: with SMTP id c3mr5279951jab.13.1542584488987; Sun, 18 Nov 2018 15:41:28 -0800 (PST) X-Received: by 2002:a9d:bd5:: with SMTP id 79mr220915oth.7.1542584488851; Sun, 18 Nov 2018 15:41:28 -0800 (PST) Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!news.gegeweb.eu!gegeweb.org!usenet-fr.net!proxad.net!feeder1-2.proxad.net!209.85.166.216.MISMATCH!g188-v6no2939110itg.0!news-out.google.com!t123-v6ni2095itb.0!nntp.google.com!z5-v6no2924231ite.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Sun, 18 Nov 2018 15:41:28 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=68.191.223.106; posting-account=IkfcKQoAAACG1YkW43S7OnbnVk_y5n_N NNTP-Posting-Host: 68.191.223.106 References: <93200914-ef2d-4cb1-8b45-76819db2a8e0@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <18ca8cb0-425d-4d11-abed-abd77dd17bbd@googlegroups.com> Subject: Re: Text IO for files not using the standard line termination for the OS From: jdgressett@hotmail.com Injection-Date: Sun, 18 Nov 2018 23:41:28 +0000 Content-Type: text/plain; charset="UTF-8" Xref: reader01.eternal-september.org comp.lang.ada:54842 Date: 2018-11-18T15:41:28-08:00 List-Id: On Sunday, November 18, 2018 at 3:26:31 AM UTC-6, Jeffrey R. Carter wrote: > On 11/18/18 4:44 AM, Shark8 wrote: > > > > I think you have to do it character-by-character in this case. > > There's a library called PragmaARC (IIRC) that has Text_IO packages for non-native text, you might want to take a look there. > > These are the PragmAda Reusable Components. Package PragmARC.Text_IO handles > files with 3 kinds of line terminators: > > type EOL_ID is (DOS_Windows_EOL, Mac_EOL, Unix_EOL); > -- Used to specify what line terminator to use on output > -- DOS_Windows_EOL = CR-LF > -- Mac_EOL = CR > -- Unix_EOL = LF > > For reading, it automatically handles EOLs of all 3 kinds, which may be mixed in > the same file (though I've never encountered this). For output, when the files > is created/opened, the desired EOL kind is specified. > > The PragmARCs are at > > https://github.com/jrcarter/PragmARC > > HTH > > -- > Jeff Carter > "Ditto, you provincial putz?" > Blazing Saddles > 86 That is what I need - thanks.