From: Adam Beneschan <adam@irvine.com>
Subject: Re: GNAT: no more exception raised on illformed text file?
Date: Mon, 6 Feb 2012 11:45:05 -0800 (PST)
Date: 2012-02-06T11:45:05-08:00 [thread overview]
Message-ID: <3d23974f-fc09-4a71-a021-135259e66709@f30g2000yqh.googlegroups.com> (raw)
In-Reply-To: 8801c492-52d4-47be-a976-06f10de5c1df@18g2000yqe.googlegroups.com
On Feb 6, 11:04 am, Shark8 <onewingedsh...@gmail.com> wrote:
> On Feb 6, 1:08 am, Yannick Duchêne (Hibou57)
>
> <yannick_duch...@yahoo.fr> 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 file
> > 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
next prev parent reply other threads:[~2012-02-06 19:47 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-06 7:08 GNAT: no more exception raised on illformed text file? Yannick Duchêne (Hibou57)
2012-02-06 15:33 ` J-P. Rosen
2012-02-06 16:03 ` Yannick Duchêne (Hibou57)
2012-02-06 16:27 ` Adam Beneschan
2012-02-06 19:04 ` Shark8
2012-02-06 19:45 ` Adam Beneschan [this message]
2012-02-07 6:47 ` J-P. Rosen
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox