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-Thread: 103376,ccd337934e964b6a X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Received: by 10.68.222.71 with SMTP id qk7mr11958074pbc.1.1328557629669; Mon, 06 Feb 2012 11:47:09 -0800 (PST) Path: lh20ni267874pbb.0!nntp.google.com!news2.google.com!postnews.google.com!f30g2000yqh.googlegroups.com!not-for-mail From: Adam Beneschan Newsgroups: comp.lang.ada Subject: Re: GNAT: no more exception raised on illformed text file? Date: Mon, 6 Feb 2012 11:45:05 -0800 (PST) Organization: http://groups.google.com Message-ID: <3d23974f-fc09-4a71-a021-135259e66709@f30g2000yqh.googlegroups.com> References: <8801c492-52d4-47be-a976-06f10de5c1df@18g2000yqe.googlegroups.com> NNTP-Posting-Host: 66.126.103.122 Mime-Version: 1.0 X-Trace: posting.google.com 1328557629 11768 127.0.0.1 (6 Feb 2012 19:47:09 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Mon, 6 Feb 2012 19:47:09 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: f30g2000yqh.googlegroups.com; posting-host=66.126.103.122; posting-account=duW0ogkAAABjRdnxgLGXDfna0Gc6XqmQ User-Agent: G2/1.0 X-Google-Web-Client: true X-Google-Header-Order: ARLUEHNKC X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; WOW64; Trident/4.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.5.21022; .NET CLR 3.5.30729; .NET CLR 3.0.30618; .NET4.0C),gzip(gfe) Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Date: 2012-02-06T11:45:05-08:00 List-Id: On Feb 6, 11:04=A0am, Shark8 wrote: > On Feb 6, 1:08 am, Yannick Duch=EAne (Hibou57) > > wrote: > > Hi all, > > > Seems my FSF GNAT (*) does not raise an exception anymore when > > encountering the last line of a malformed text file; that is, a text fi= le > > whose last line is not terminated with an end-of-line. > > Such a file is NOT a malformed text-file; that definition is a UNIX- > ism and therefore applicable ONLY to the UNIX/LINUX world. In Windows, > for example, a user in Notepad (or wordpad, or any other editor) can > save a text-file without such a termination (as Adam points out) and > it IS a valid text-file precisely because Windows does not define a > text-file in that manner. (IIRC all that Windows needs is the ASCII > EOF character.) I don't even think it needs an EOF character, based on a test I just ran; if it's stored on disk (or other storage), the file size is enough to determine where the end of the file is. Of course that may not apply to files input over a serial line. Also, I'm not even sure if the "malformed" definition applies in the Unix/Linux worlds; I'd think users would still expect things to work "correctly" even if the line terminator is missing. -- Adam