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:a24:1882:: with SMTP id 124mr3537028itr.0.1542506504318; Sat, 17 Nov 2018 18:01:44 -0800 (PST) X-Received: by 2002:aca:5803:: with SMTP id m3-v6mr98306oib.4.1542506504233; Sat, 17 Nov 2018 18:01:44 -0800 (PST) Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!weretis.net!feeder4.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.166.215.MISMATCH!z5-v6no2030278ite.0!news-out.google.com!t123-v6ni1343itb.0!nntp.google.com!g188-v6no2035172itg.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Sat, 17 Nov 2018 18:01:44 -0800 (PST) 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 User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Text IO for files not using the standard line termination for the OS From: jdgressett@hotmail.com Injection-Date: Sun, 18 Nov 2018 02:01:44 +0000 Content-Type: text/plain; charset="UTF-8" Xref: reader01.eternal-september.org comp.lang.ada:54837 Date: 2018-11-17T18:01:44-08:00 List-Id: I use Ada 2012 to write Windows programs; my usual compiler is 32-bit TDM-gcc which implements the gcc-5.1.0 version of the Ada compiler. My problem is a simple one: i need to produce a program which reads lines from a text file; if a line meets a requirement, it is written to an output file; if it does not meet the requirement it is not written to the output file. The annoyance that I must deal with is the fact that the files are not Windows text files, which use the convention to terminate text lines. The files use a single as the line terminator. Is there a way to get Ada.Text_IO to use a line terminator that is not the default for the operation system on which the program runs?