www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-developers/1999/03/26/19:17:12

Mailing-List: contact cygwin-developers-help AT sourceware DOT cygnus DOT com; run by ezmlm
Sender: cygwin-developers-owner AT sourceware DOT cygnus DOT com
Delivered-To: mailing list cygwin-developers AT sourceware DOT cygnus DOT com
Date: Fri, 26 Mar 1999 19:18:14 -0500
From: Chris Faylor <cgf AT cygnus DOT com>
To: Corinna Vinschen <corinna DOT vinschen AT cityweb DOT de>
Cc: Sergey Okhapkin <sos AT prospect DOT com DOT ru>,
cygwin-developers AT sourceware DOT cygnus DOT com
Subject: Re: My console rewrite is finally available
Message-ID: <19990326191814.A756@cygnus.com>
References: <01BE775B DOT DFB62CA0 AT sos> <36FC1ED0 DOT 281F104B AT cityweb DOT de>
Mime-Version: 1.0
X-Mailer: Mutt 0.95.3i
In-Reply-To: <36FC1ED0.281F104B@cityweb.de>; from Corinna Vinschen on Sat, Mar 27, 1999 at 12:57:04AM +0100

On Sat, Mar 27, 1999 at 12:57:04AM +0100, Corinna Vinschen wrote:
>Sergey Okhapkin wrote:
>> Corinna Vinschen wrote:
>> > Unfortunately, your patch doesn't work together with Sergeys
>> > remote package. Setting: CYGWIN=binmode ntea tty
>> >
>> > The following happens:
>> >
>> >       Open Connection,
>> >       telnetd starts `login.exe'...
>> >       ... which displays  "login:"
>> >       I enter the login and press return...
>> >       the cursor jumps to the beginning of the _same_ line,
>> >       instead of to the next line and now, login.exe hangs.
>> 
>> Login reads username using the following loop (the code derived from linux login):
>> 
>>                 printf("login: ");
>>                 for (p = nbuf; (ch = getchar()) != '\n'; ) {
>>                         if (ch == EOF) {
>>                                 badlogin(username);
>>                                 exit(0);
>>                         }
>>                         if (p < nbuf + UT_NAMESIZE)
>>                                 *p++ = ch;
>>                 }
>> 
>> Looks like getchar() returns \r instead of \n now.
>
>Seems to be a general binmode problem: If using a NT console window with
>CYGWIN="binmode notty", the newline is only LF, instead of CR/LF. If not
>in binmode, anything looks nice.

Can you give me an explicit example?  I don't see difference in
behavior with "binmode notty" or "nobinmode notty".  When I do a
cat > file

I see the lines ending in LF in both cases.

cgf

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019