Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sourceware DOT cygnus DOT com Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com Message-ID: <38180BB2.CEB29CD3@col.bsf.alcatel.fr> Date: Thu, 28 Oct 1999 10:39:14 +0200 From: Pascal Vittone X-Mailer: Mozilla 4.51 [en] (X11; I; SunOS 5.5.1 sun4u) X-Accept-Language: fr MIME-Version: 1.0 To: cygwin users Subject: Re: make, bash, or cygwin bug? Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Chris Faylor wrote: > > Well, I guess that shows how things work with Visual C. I think that > that means that Cygwin can't change it's behavior. > > Thanks very much for doing this. Would you mind posting your findings to > the cygwin mailing list? > > -chris > > On Wed, Oct 27, 1999 at 10:01:53AM +0200, Pascal Vittone wrote: > >Chris Faylor wrote: > >> I'm looking for actual code which demonstrates a behavior under > >> VC++. > >> > >> Can anyone supply this? > >> > >>cgf > > > > Attached file contains test code. I compiled it with VC++ 6.0 on NT4.0 SP 4. It > >seems that ctrl-Z is processed as end-of-file for text files. > > > > Regards. > > > > Pascal > > > >-- > > ________________ > >____________________________________________________\ /_______ > >Pascal Vittone ESD/EBU/LSD/R&D > >mailto:Pascal DOT Vittone AT col DOT bsf DOT alcatel DOT fr Alcatel Business Systems > >Tel: +33 (0)1 55 66 56 77 54, av. Jean Jaures > >Fax: +33 (0)1 55 66 54 24 F-92700 Colombes > >_________________________________________________________\ /____________ The program hereafter displays "End of file" when it reads character ctrl-Z in myfile.txt. I compiled it with VC++ 6.0 with default libraries. Consequently, ctrl-Z is processed as end-of-file for text files. Regards, Pascal // ctrlZtest.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include "stdio.h" #include "stdlib.h" int main(int argc, char* argv[]) { FILE *pF; int i; pF = fopen ("myfile.txt", "w"); for (i = 0; i < 127; i++) fwrite (& i, 1, 1, pF); fclose (pF); pF = fopen ("myfile.txt", "r"); for (i = 0; i < 127; i++) { char j; if (fread (& j, 1, 1, pF) == 0) { if (feof (pF)) fprintf (stderr, "End of file\n"); else fprintf (stderr, "read error\n"); exit (-1); } printf ("Value is %d\n", j); } return 0; } -- ________________ ____________________________________________________\ /_______ Pascal Vittone ESD/EBU/LSD/R&D mailto:Pascal DOT Vittone AT col DOT bsf DOT alcatel DOT fr Alcatel Business Systems Tel: +33 (0)1 55 66 56 77 54, av. Jean Jaures Fax: +33 (0)1 55 66 54 24 F-92700 Colombes _________________________________________________________\ /____________ \ / \/ -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com