This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: make, bash, or cygwin bug?


On 22 Oct 99, at 5:42, Earnie Boyd wrote:

> --- Kai Henningsen <kai@cats.ms> wrote:
> > On 12 Oct 99, at 7:28, Earnie Boyd wrote:
> >
> > > The problem with this is, if a ^Z|C-z|Ctrl-Z is read then a superfluous
> > > END-OF-FILE is indicated. :-(
> >
> > This should really not be done, unless it's input from a terminal.
> > Nearly all Win textfiles do NOT end in ^Z anyway. This convention
> > is extremely obsolete.
>
> I wasn't suggesting ending a text file with a ^Z, I was refering to processing
> binary data which could contain a ^Z causing a premature end of file.  It isn't
> so obsolete that it doesn't cause the fuctions to flag an end-of-file.

Well yes, and I was suggesting that this is a bad idea - maybe
even an outright bug.

There are two conditions under which ^Z processing makes sense:

1. While reading from a terminal (incidentally, the only situation
where Unix processes ^D)

2. When handling a text file, *AND* the ^Z in question is the very
last byte of the file - except that even this case is very rare, and not
really worth the bother.

In all other situations, a ^Z should not be associated with EOF.
(And ^D should only be associated with EOF in case 1.)



Regards - Kai Henningsen

--
http://www.cats.ms
Spuentrup CTI       Fon: +49 251 322311 0
Windbreede 12       Fax: +49 251 322311 99
D-48157 Münster     Mob: +49 161 3223111
Germany             GSM: +49 171 7755060

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]