public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Troubles with ctrl Z and intl/loadmsgcat.c
@ 1999-01-31 23:52 Christine pourcelot
  1999-02-02 22:43 ` Michael Hirmke
  0 siblings, 1 reply; 3+ messages in thread
From: Christine pourcelot @ 1999-01-31 23:52 UTC (permalink / raw)
  To: gnu-win32

Hi,

I've some (= a lots of) troubles while porting a software from
unix/linux to Windows NT. My last problem is I have to handle files that
may contain ^Z characters. Unfortunately, cygwin seems to act like MSDOS
and treats this character as an EOF :-(
I'm also using some gettext tools and I saw something that seems to me
to be wrong in src/intl/loadmsgcat.c :
the "read" system call return 0 when he meets some ctrl-Z, but ... as
you can see, when nb= 0, you'll get an endless loop :-((

***************************************************************
 if (data == (struct mo_file_header *) -1)
    {
      off_t to_read;
      char *read_ptr;
      data = (struct mo_file_header *) malloc (st.st_size);
      if (data == NULL)
	return;
      to_read = st.st_size;
      read_ptr = (char *) data;
      do
	{
	  long int nb = (long int) read (fd, read_ptr, to_read);
	  if (nb == -1)
	    {
	      close (fd);
	      return;
	    }
	  read_ptr += nb;
	  to_read -= nb;
	}
      while (to_read > 0);
      close (fd);
    }

********************************************************************

Got any Idea ???

Regards,
Christine
-- 
Christine Pourcelot
Stagiaire projet CODES
INRIA ROCQUENCOURT
tel : 01 39 63 57 70
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Troubles with ctrl Z and intl/loadmsgcat.c
  1999-01-31 23:52 Troubles with ctrl Z and intl/loadmsgcat.c Christine pourcelot
@ 1999-02-02 22:43 ` Michael Hirmke
  1999-02-28 23:02   ` Michael Hirmke
  0 siblings, 1 reply; 3+ messages in thread
From: Michael Hirmke @ 1999-02-02 22:43 UTC (permalink / raw)
  To: gnu-win32

Hi Christine,

>Hi,
>
>I've some (= a lots of) troubles while porting a software from
>unix/linux to Windows NT. My last problem is I have to handle files that
>may contain ^Z characters. Unfortunately, cygwin seems to act like MSDOS
>and treats this character as an EOF :-(

If you set CYGWIN=tty, you could avoid that behaviour.

Bye.
Michael.
--
Michael Hirmke           | Telefon +49 (911) 557999
Georg-Strobel-Strasse 81 | FAX     +49 (911) 557664
90489 Nuernberg          | E-Mail  mailto:mh@mike.franken.de
                         | WWW     http://aquarius.franken.de/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Troubles with ctrl Z and intl/loadmsgcat.c
  1999-02-02 22:43 ` Michael Hirmke
@ 1999-02-28 23:02   ` Michael Hirmke
  0 siblings, 0 replies; 3+ messages in thread
From: Michael Hirmke @ 1999-02-28 23:02 UTC (permalink / raw)
  To: gnu-win32

Hi Christine,

>Hi,
>
>I've some (= a lots of) troubles while porting a software from
>unix/linux to Windows NT. My last problem is I have to handle files that
>may contain ^Z characters. Unfortunately, cygwin seems to act like MSDOS
>and treats this character as an EOF :-(

If you set CYGWIN=tty, you could avoid that behaviour.

Bye.
Michael.
--
Michael Hirmke           | Telefon +49 (911) 557999
Georg-Strobel-Strasse 81 | FAX     +49 (911) 557664
90489 Nuernberg          | E-Mail  mailto:mh@mike.franken.de
                         | WWW     http://aquarius.franken.de/

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~1999-02-28 23:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-01-31 23:52 Troubles with ctrl Z and intl/loadmsgcat.c Christine pourcelot
1999-02-02 22:43 ` Michael Hirmke
1999-02-28 23:02   ` Michael Hirmke

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).