Subject: [Fwd: serial port and unwanted NL -> CR/LF tranlastion]
From: Bruce Edge <[email-masked]>
To: cygwin support <[email-masked]>
Date: Mon, 27 Nov 2000 14:12:29 -0800

Just for the record, I fixed this by clearing ONLCR. It was being set by some
code written for a Posix environment rather than a BSD one.

Thanks for all the help.

- Bruce.

Christopher Faylor wrote:
> 
> On Thu, Nov 23, 2000 at 09:58:19AM +0300, Andrej Borsenkow wrote:
> >LF -> CR-LF translation is normal when you output to terminal and is done by
> >tty driver (onlcr mode). Is it possible that COM driver is actually tty in
> >disguise on Cygwin? In this case you could use termios functions to turn onlcr
> >off.
> 
> Bingo.  I kept meaning to research this to see if it was true.
> 
> You are right.  This is controlled by tcsetattr.
> 
> cgf
> 
> >> -----Original Message-----
> >> From: [email-masked]
> >> [mailto:[email-masked]]On Behalf Of Bruce Edge
> >> Sent: Thursday, November 23, 2000 2:52 AM
> >> To: cygwin support
> >> Subject: Re: serial port and unwanted NL -> CR/LF tranlastion
> >>
> >>
> >> Hi Corinna, thanks for the prompt response.
> >>
> >> I tried this and it had no effect.
> >> I added the O_BINARY and linked with /lib/binmode.
> >>
> >> Is there some other library I should now exclude? I ask as since
> >> there were no
> >> unresolved symbols before I added /lib/binmode.o, the link is picking up
> >> whatever symbols are in binmode.o from somewhere else.
> >>
> >> -Bruce.
> >>
> >> Corinna Vinschen wrote:
> >> >
> >> > Bruce Edge wrote:
> >> > >
> >> > > I opened /dev/com1 using:
> >> > >         open( name, O_RDWR | O_NOCTTY | O_NONBLOCK )
> >> > > and when I write to it using:
> >> > >         write( fd, buf, len );
> >> > > any 0x0a bytes are getting translated into 0x0d 0x0a pairs.
> >> > >
> >> > > How can I stop this?
> >> >
> >> > Try
> >> >           open( name, O_RDWR | O_NOCTTY | O_NONBLOCK | O_BINARY)
> >> >
> >> > or link your application with /lib/binmode.o
> >>
> >> --
> >> Want to unsubscribe from this list?
> >> Send a message to [email-masked]
> >>
> >>
> >
> >
> >--
> >Want to unsubscribe from this list?
> >Send a message to [email-masked]
> 
> --
> [email-masked]                        Red Hat, Inc.
> http://sources.redhat.com/            http://www.redhat.com/
> 
> --
> Want to unsubscribe from this list?
> Send a message to [email-masked]

-- 
A right is not what someone gives you; it's what no one can take from you.
		-- Ramsey Clark

--
Want to unsubscribe from this list?
Send a message to [email-masked]